From owner-freebsd-current Tue Aug 14 23:54:54 2001 Delivered-To: freebsd-current@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 814D137B407 for ; Tue, 14 Aug 2001 23:54:45 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f7F6sOp49812; Wed, 15 Aug 2001 09:54:24 +0300 (EEST) (envelope-from ru) Date: Wed, 15 Aug 2001 09:54:24 +0300 From: Ruslan Ermilov To: Bruce Evans Cc: current@FreeBSD.ORG, Mark Peek , Warner Losh Subject: Re: Cross builds and upgrade path from 4.x are broken in usr.bin/file Message-ID: <20010815095424.A47417@sunbay.com> References: <20010814203045.A60765@sunbay.com> <20010815120844.C17139-100000@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010815120844.C17139-100000@besplex.bde.org>; from bde@zeta.org.au on Wed, Aug 15, 2001 at 12:40:19PM +1000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Aug 15, 2001 at 12:40:19PM +1000, Bruce Evans wrote: [...] > > > +mkmagic: apprentice.c print-hacked.c > > > + ${HOST_CC} -o mkmagic -DHAVE_CONFIG_H -DCOMPILE_ONLY \ > > > + -I${.CURDIR} -I${SRCDIR} ${.ALLSRC} > > > > > Whoa, cool! > > > > That's what I wanted from the very beginning (-DCOMPILE_ONLY knob). > > It then fits just nicely into the `build-tools' concept. And we > > don't need this ugly HOST_CC hack for Makefile.inc1, as ${CC} is > > set correctly during the `build-tools' stage. Let's don't reinvent > > the wheel, and please try the attached patch instead. > > I agree (except the build-tools concept is a hack to work around > build-tools binaries not being buildable and installable in the usual > way (with 1 binary per Makefile)). > It seems pretty easy to add src/tools/build-tools/, and move all the build-tools there. What do you say? [...] > See sh/Makefile for other tweaks (depend on .o instead of .c ...). Other > probems with this (generally shared with all build-tools binaries): > - CFLAGS for the main binary may be inappropriate for the tools > - missing dependencies on headers. > Dependency of a build-tool on .o instead of .c is bad if: 1) build-tools are built in the same ${.OBJDIR} as the main ${PROG} (this is always true) 2) objects for a build-tool are created for the host arch 3) objects for a ${PROG} are created for a different arch 4) ${PROG} and build-tool share one or more object files This is not the case for bin/sh, but it's true for usr.bin/file. Cheers, -- 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 freebsd-current" in the body of the message