Date: Wed, 29 Jun 2005 16:15:56 +0200 From: Ulrich Spoerlein <spoerlein@informatik.uni-wuerzburg.de> To: =?iso-8859-15?Q?Bj=F6rn_K=F6nig?= <bkoenig@cs.tu-berlin.de> Cc: current@freebsd.org Subject: Re: bsd.cpu.mk confusion Message-ID: <20050629141556.GD1091@galgenberg.net> In-Reply-To: <42C29C4C.2030301@cs.tu-berlin.de> References: <20050629105052.GC1091@galgenberg.net> <42C29C4C.2030301@cs.tu-berlin.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--32u276st3Jlj2kUU Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 29.06.2005 at 15:04:12 +0200, Bj=F6rn K=F6nig wrote: > Ulrich Spoerlein wrote: >=20 > >[...] > >Here's a minimal Makefile > >CPUTYPE=3Dpentium-m > >CC=3D icc > >.include <bsd.prog.mk> > >.include <bsd.cpu.mk> > >Then > >% make -V CFLAGS > >-O2 -fno-strict-aliasing -pipe -march=3Dpentium-m -tpp6 -xiMK >=20 > You have overlooked that sys.mk will be processed "before any other=20 > file, including makefile and Makefile" (make(1)). /usr/share/mk/sys.mk=20 > includes already bsd.cpu.mk once at a time where CC has not been set to= =20 > 'icc'. Therefore ${_CPUCFLAGS} will be added to CFLAGS in bsd.cpu.mk.=20 > Afterwards you include bsd.cpu.mk twice. Hmm, but since CPUTYPE isn't set at that time too, there shouldn't be the gcc-only -march flag, no? Or is it the late macro expansion, that always confuses me. Anyway, putting CC and CPUTYPE into make.conf solves my problems. But the thing is, I only want these flags on some specific programs, not all (especially CC=3Dicc). Looking at MAKEFILE_LIST, it looks like I'm SOL % make -V .MAKEFILE_LIST|tr ' ' \\n|sed '/\.\./d' /usr/share/mk/sys.mk /etc/make.conf /usr/share/mk/bsd.compat.mk /usr/share/mk/bsd.cpu.mk Makefile /usr/share/mk/bsd.prog.mk /usr/share/mk/bsd.init.mk /usr/share/mk/bsd.compat.mk /usr/share/mk/bsd.own.mk /usr/share/mk/bsd.libnames.mk /usr/share/mk/bsd.nls.mk /usr/share/mk/bsd.files.mk /usr/share/mk/bsd.incs.mk /usr/share/mk/bsd.links.mk /usr/share/mk/bsd.man.mk /usr/share/mk/bsd.dep.mk /usr/share/mk/bsd.obj.mk /usr/share/mk/bsd.own.mk /usr/share/mk/bsd.subdir.mk /usr/share/mk/bsd.init.mk /usr/share/mk/bsd.sys.mk Well, I could delete CFLAGS and force loading bsd.cpu.mk again, so this Makefile kinda works: CFLAGS=3D CC=3Dicc CPUTYPE=3Dpentium-m =2Einclude <bsd.prog.mk> =2Einclude <bsd.cpu.mk> % make -V CFLAGS -tpp6 -xiMK % make -V .MAKEFILE_LIST|tr ' ' \\n|sed '/\.\./d' /usr/share/mk/sys.mk /etc/make.conf /usr/share/mk/bsd.compat.mk /usr/share/mk/bsd.cpu.mk Makefile /usr/share/mk/bsd.prog.mk /usr/share/mk/bsd.init.mk /usr/share/mk/bsd.compat.mk /usr/share/mk/bsd.own.mk /usr/share/mk/bsd.libnames.mk /usr/share/mk/bsd.nls.mk /usr/share/mk/bsd.files.mk /usr/share/mk/bsd.incs.mk /usr/share/mk/bsd.links.mk /usr/share/mk/bsd.man.mk /usr/share/mk/bsd.dep.mk /usr/share/mk/bsd.obj.mk /usr/share/mk/bsd.own.mk /usr/share/mk/bsd.subdir.mk /usr/share/mk/bsd.init.mk /usr/share/mk/bsd.sys.mk /usr/share/mk/bsd.cpu.mk Am I asking for trouble using this construct? Thanks anyway for pointing me to make(1), d'oh! Ulrich Spoerlein --=20 PGP Key ID: F0DB9F44 Encrypted mail welcome! Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn." didn't you understand? --32u276st3Jlj2kUU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCwq0cmArGtfDbn0QRAsMRAKDJ5lakPJlGYTJLr4fpigV6I09CkACghrqI FeKydsOVd+7F9xRn3xT+ags= =gXzO -----END PGP SIGNATURE----- --32u276st3Jlj2kUU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050629141556.GD1091>