Date: Mon, 19 May 2003 15:24:39 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Kris Kennaway <kris@obsecurity.org> Cc: ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/devel/avr-libc Makefile Message-ID: <20030519122439.GA28176@sunbay.com> In-Reply-To: <20030519121239.GA6087@rot13.obsecurity.org> References: <200305190828.h4J8S8l0069634@repoman.freebsd.org> <20030519094115.GC1035@sunbay.com> <20030519115435.C2937@uriah.heep.sax.de> <20030519104604.GB17366@sunbay.com> <20030519125334.D2937@uriah.heep.sax.de> <20030519114332.GG17366@sunbay.com> <20030519115339.GI17366@sunbay.com> <20030519121239.GA6087@rot13.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 19, 2003 at 05:12:39AM -0700, Kris Kennaway wrote: > On Mon, May 19, 2003 at 02:53:40PM +0300, Ruslan Ermilov wrote: >=20 > > # Work around the braind*** introduced by <bsd.cpu.mk> in freebsd-curr= ent. > > MAKE_ENV=3D NO_CPU_CFLAGS=3Dtrue > > +# Prevent bsd.port.mk from setting CFLAGS/CXXFLAGS to unfriendly value= s. > > +CFLAGS=3D -O -pipe > > +CXXFLAGS=3D -O -pipe >=20 > Hmm. I see the problem - essentially it boils down to using the host > compiler CFLAGS when running the cross-compiler, and has nothing to do > with bsd.cpu.mk. >=20 Nice, so all parties agree that bsd.cpu.mk is not guilty (that speaks the share/mk/ maintainer ;-). > Let's suppose for the sake of argument that we lived in joerg's ideal > world where bsd.cpu.mk did not exist. A user wishing to specify > CPU-specific gcc optimizations for their native binaries would set > CFLAGS=3D"-O -pipe -march=3Dwhatever" in /etc/make.conf. This would then > be picked up by bsd.port.mk and passed into the port build environment > as you demonstrated. The cross-compiler would then fail in exactly > the same place when it encounters the invalid -march. >=20 > The bug here appears to be that the cross-gcc binary is using the host > gcc CFLAGS entry in the first place, instead of a default, safe CFLAGS > (like "-O -pipe"). >=20 Yes, precisely so. I'm not even sure if NO_CPU_CFLAGS is really necessary after my patch, but I can't check it easily. I've looked in the CVS history, and we appear to set CFLAGS in MAKEENV only to make gmake(1) happy, to make it use optimized CFLAGS, which is good. Perhaps then, bsd.port.mk could be fixed to not add CFLAGS and CXXFLAGS to environment, if specifically asked not to, like in this case. Or perhaps this port should set CFLAGS to -O -pipe -mavr, if such thing ever exists. ;) Cheers, --=20 Ruslan Ermilov Sysadmin and 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 --jI8keyz6grp/JLjh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+yM0HUkv4P6juNwoRAoZHAJwIL3bm51KR8d8GGDU5Qa4vHlZwRgCfVeT2 SEKe6XVWyeDSQD9v4iaOdC4= =18WR -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030519122439.GA28176>