From owner-cvs-all Sat Sep 29 6:28:59 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 1F3D937B411; Sat, 29 Sep 2001 06:27:16 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id f8TDR9O73939; Sat, 29 Sep 2001 16:27:09 +0300 (EEST) (envelope-from ru) Date: Sat, 29 Sep 2001 16:27:09 +0300 From: Ruslan Ermilov To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src Makefile.inc1 src/secure/lib/libtelnet Makefile src/share/mk bsd.lib.mk src/gnu/usr.bin/perl Makefile Makefile.inc src/gnu/usr.bin/perl/libperl Makefile src/gnu/usr.bin/perl/library Makefile.inc src/gnu/usr.bin/perl/miniperl Makefile ... Message-ID: <20010929162709.A73075@sunbay.com> References: <200109291317.f8TDHt444684@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109291317.f8TDHt444684@freefall.freebsd.org>; from ru@FreeBSD.org on Sat, Sep 29, 2001 at 06:17:55AM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Not fixed in this commit: 1. MACHINE_ARCH should be constant, it's the architecture of the building machine. It should always be equal to hw.machine_arch. We SHOULD NOT override its value even for ${WMAKE} stages of buildworld, but we still do this because /usr/src makefiles (ab)use MACHINE_ARCH and MACHINE to descend into the architecture dependant subdirectories. This is bogus, and the next step of cleanup will be to fix makefiles to use TARGET_ARCH instead, and to define ``TARGET_ARCH?= ${MACHINE_ARCH}'' in sys.mk. The same should be done for MACHINE. The plan is to introduce TARGET_MACHINE (defaulting to MACHINE), and use that instead. 2. -I${DESTDIR}/usr/include and -I${DESTDIR}/usr/include/g++ hacks from bsd.prog.mk and bsd.lib.mk should migrate into Makefile.inc1. An attempt was made to do this, but it failed because the change reversed the order of -I's, and at least two libraries, libbind and libpam are broken with this change. The libraries' builds should be fixed first. On Sat, Sep 29, 2001 at 06:17:55AM -0700, Ruslan Ermilov wrote: > ru 2001/09/29 06:17:55 PDT > > Modified files: > . Makefile.inc1 > secure/lib/libtelnet Makefile > share/mk bsd.lib.mk > gnu/usr.bin/perl Makefile Makefile.inc > gnu/usr.bin/perl/libperl Makefile > gnu/usr.bin/perl/library Makefile.inc > gnu/usr.bin/perl/miniperl Makefile > gnu/usr.bin/perl/pod Makefile.inc > gnu/usr.bin/perl/x2p Makefile.inc > Log: > Fix cross-building, etc: > > 1. To cross-build, one now needs to set TARGET_ARCH, and not the > MACHINE_ARCH. MACHINE_ARCH should never be changed manually! > > 2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools, > and cross-tools stages. This fixes broken header and library > dependencies problem. We build them in the host environment, > and obviously want them to depend on host headers and libraries. > The problem with broken header dependencies for bootstrap-tools > and cross-tools was already partially solved (see BOOTSTRAPPING > tests in bsd.prog.mk and bsd.lib.mk), but it was still there for > build-tools if the user ran "make world DESTDIR=/foo". Also, > for all of these stages, the library dependencies were broken > because of how bsd.libnames.mk define DPADD members. > > We still provide a glue to install bootstrap- and cross-tools > under the ${WORLDTMP}. > > Removed PATH overrides for bootstrap-, build-, and cross-tools > stages. There is just no reason why we would need to override > it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN > case are no longer needed with fixes from this step. > > That is, we now never use ${WORLDTMP} headers and libraries, > and we don't use any ${WORLDTMP} installed binaries during > these stages. Again, these stages depend solely on the host > environment, including compiler, headers, and libraries. > > 3. Moved "miniperl" back from cross-tools (it has nothing to do > with a cross-compiler) to build-tools where it belongs. The > change from step 1 let to do this. Also, to make this work, > build-tools targets of "cc_tools" and "miniperl" were modified > to call "depend". Here follow the detailed explanations. > > There are two categories of build tools, for now. In the first > category there are "cc_tools" and "miniperl". They occupy the > whole (sub)directory, and nothing needs to be done in this > subdirectory later during the "all" stage. They are also > constructed using system makefiles. We must build the .depend > early in the build-tools stage because: > > 1) They use (and depend on) the host environment. > > 2) If we don't do this in build-tools, the "depend" stage of > buildworld will do this for us; wrong library and header > dependencies will be recorded (DESTDIR=${WORLDTMP}) and, > what's worse, the "all" stage may then clobber the > build-architecture format tools (that we built in the > build-tools stage) with the target-architecture format > ones, breaking cross build. > > In the second category there are all other build-tools. They > share their directory with the "main" module that needs them > in the "all" stage, and they don't show up themselves in the > .depend file. The portion of this fix was already committed > in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52. > > 4. "libperl" is no longer a build tool, and "miniperl" is the > stand-alone application. I had to make this change because > build-tools and "all" stages share the same object directory. > Without this change, if we cross compile, libperl.a is first > built for the build architecture during the build-tools stage > (for the purposes of immediate linkage with "miniperl"). > Later on, the "all" stage sees this library as up-to-date, > and doesn't rebuild it. The effect is that the wrong format > static libperl library is installed with installworld. > > 5. Fixed "includes" to install secure/lib/libtelnet headers if > required. > > Reviewed by: bde > > Revision Changes Path > 1.219 +37 -56 src/Makefile.inc1 > 1.17 +2 -18 src/gnu/usr.bin/perl/Makefile > 1.26 +7 -2 src/gnu/usr.bin/perl/Makefile.inc > 1.16 +1 -4 src/gnu/usr.bin/perl/libperl/Makefile > 1.8 +1 -2 src/gnu/usr.bin/perl/library/Makefile.inc > 1.19 +16 -17 src/gnu/usr.bin/perl/miniperl/Makefile > 1.5 +1 -2 src/gnu/usr.bin/perl/pod/Makefile.inc > 1.8 +1 -2 src/gnu/usr.bin/perl/x2p/Makefile.inc > 1.26 +10 -6 src/secure/lib/libtelnet/Makefile > 1.99 +2 -2 src/share/mk/bsd.lib.mk -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message