From owner-freebsd-toolchain@freebsd.org Mon Dec 7 21:33:14 2015 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F025C9B7247 for ; Mon, 7 Dec 2015 21:33:14 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-152.reflexion.net [208.70.211.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A41FD11B7 for ; Mon, 7 Dec 2015 21:33:13 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 19053 invoked from network); 7 Dec 2015 21:33:06 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 7 Dec 2015 21:33:06 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Mon, 07 Dec 2015 16:33:06 -0500 (EST) Received: (qmail 716 invoked from network); 7 Dec 2015 21:33:06 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 7 Dec 2015 21:33:06 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 2EA0B1C43C4; Mon, 7 Dec 2015 13:33:02 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: 11.0-CURRENT SRC_ENV_CONF file vs. MAKEOBJDIRPREFIX in the file: they do not mix From: Mark Millard In-Reply-To: <2426.1449521335@chaos> Date: Mon, 7 Dec 2015 13:33:05 -0800 Cc: FreeBSD PowerPC ML , FreeBSD Toolchain , FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: References: <2426.1449521335@chaos> To: "Simon J. Gerraty" X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2015 21:33:15 -0000 > On 2015-Dec-7, at 12:48 PM, Simon J. Gerraty wrote: >=20 > Mark Millard wrote: >> My guess is that it is picking up the >>=20 >> MAKEOBJDIRPREFIX=3D/usr/obj/xtoolchain >=20 > You should use ?=3D if you want this to work. > There are many places in Makefile.inc1 where MAKEOBJDIRPREFIX is = tweaked > in the environment of a sub-make. >=20 > By using =3D above, you break that. That presumes that MAKEOBJDIRPREFIX has not been assigned a default = value before the SRC_ENV_CONF file has been included the first time. If = MAKEOBJDIRPREFIX had been defined already then the ?=3D would do nothing = and the wrong value would be used. I believe that the following trace shows that such an assignment of a = default value does happen first, making ?=3D not work either. /usr/src/Makefile (head/Makefile 29160) has > MAKEOBJDIRPREFIX?=3D /usr/obj at line 145 (used when it is not using targets/Makefile from the = relevant .if/.else/.endif). Line 105 has .include and there no others before the = above assignment. bsd.compiler.mk in turn includes bsd.opt.mk (only), = which in turns includes bsd.mkopt.mk (only). That in turn includes = nothing else. So these files and only these files are the involved files = before that assignment as far as I can tell. None of these get to src.sys.env.mk and so SRC_ENV_CONF use has not = happened yet when=20 > MAKEOBJDIRPREFIX?=3D /usr/obj is executed. So, if I understand right, MAKEOBJDIRPREFIX is already defined before = the code > SRC_ENV_CONF?=3D /etc/src-env.conf > .if !empty(SRC_ENV_CONF) && !target(_src_env_conf_included_) > .-include "${SRC_ENV_CONF}" > _src_env_conf_included_: .NOTMAIN > .endif is executed and so using ?=3D would not be effective in the included = file. Did I miss something? =3D=3D=3D Mark Millard markmi at dsl-only.net