From owner-freebsd-current@FreeBSD.ORG Sat Jun 13 18:10:47 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0FCE1065745 for ; Sat, 13 Jun 2009 18:10:47 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout017.mac.com (asmtpout017.mac.com [17.148.16.92]) by mx1.freebsd.org (Postfix) with ESMTP id CD3078FC23 for ; Sat, 13 Jun 2009 18:10:45 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from [10.83.191.80] (mobile-032-153-154-222.mycingular.net [32.153.154.222]) by asmtp017.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KL600D07VTS8A80@asmtp017.mac.com>; Sat, 13 Jun 2009 11:10:43 -0700 (PDT) References: Message-id: From: Marcel Moolenaar To: Mark Murray In-reply-to: X-Mailer: iPhone Mail (5H11) Date: Sat, 13 Jun 2009 11:10:35 -0700 Cc: "current@freebsd.org" Subject: Re: Build is polluted by host build environment. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2009 18:10:48 -0000 You need to provide much more details, because use of /use/include during the build is deliberate and more importantly required for correct cross-building -- Marcel (mobile) On Jun 13, 2009, at 10:30 AM, Mark Murray wrote: > Hi folks > > The "buildworld" build is polluted by the build environment. > > Specifically, headers in /user/include/... are used when I believe > they > should not be. This could easily break cross-builds, and may > compromise > upgrades where /usr/include/... contains some damaging ancient > history. > > To see this in action, you need to move /usr/include out of the way > after the build-tools are built, but before the target buid starts for > real. I AM NOT WORRIED ABOUT BUILD-TOOLS OR BOOTSTRAPPING TOOLS! :-) > > This patch achieves the desired result with a dirty hack. NOTE!! You > will need to move your /usr/include.NOTNOW back to /usr/include in the > likely event of a failure. > > After applying this, do a "make cleandir" then "make buildworld". > DON'T > use the "-j N" option to make. > > ------------------------------8<-------------------------------- > Index: Makefile.inc1 > =================================================================== > --- Makefile.inc1 (revision 194122) > +++ Makefile.inc1 (working copy) > @@ -498,6 +501,14 @@ > cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} $ > {.TARGET:S/32$//} > .endif > > +_break_base_dependancies: > + mv /usr/include /usr/include.NOTNOW > + # Something for libraries also? > + > +_fix_base_dependancies: > + mv /usr/include.NOTNOW /usr/include > + # Something for libraries also? > + > WMAKE_TGTS= > .if !defined(SUBDIR_OVERRIDE) > WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools > @@ -506,9 +517,11 @@ > .if !defined(SUBDIR_OVERRIDE) > WMAKE_TGTS+= _cross-tools > .endif > +WMAKE_TGTS+= _break_base_dependancies > WMAKE_TGTS+= _includes _libraries _depend everything > .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" > WMAKE_TGTS+= build32 > +WMAKE_TGTS+= _fix_base_dependancies > .endif > > buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue > > ------------------------------8<-------------------------------- > The first failure that I see is > > ===> gnu/usr.bin/cc/cc_tools (depend) > make: don't know how to make /usr/include/stdarg.h. Stop > *** Error code 2 > > > There are many more if I hack my way past that one. > > I believe that the "_includes _libraries _depend everything build32" > targets should all be in an effective "-nostdinc" environment once the > "real" build gets underway, with only the ${SRC}/include/... and > friends > being visible to the build by explicit -I$FOO options to the build. > > I haven't checked, but libraries may have a similar issue. > > Comments? > > M > -- > Mark R V Murray > Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open) > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org > "