Date: Mon, 19 May 2003 05:12:39 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/devel/avr-libc Makefile Message-ID: <20030519121239.GA6087@rot13.obsecurity.org> In-Reply-To: <20030519115339.GI17366@sunbay.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 19, 2003 at 02:53:40PM +0300, Ruslan Ermilov wrote: > # Work around the braind*** introduced by <bsd.cpu.mk> in freebsd-current. > MAKE_ENV= NO_CPU_CFLAGS=true > +# Prevent bsd.port.mk from setting CFLAGS/CXXFLAGS to unfriendly values. > +CFLAGS= -O -pipe > +CXXFLAGS= -O -pipe 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. 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="-O -pipe -march=whatever" 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. 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"). Kris --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+yMo3Wry0BWjoQKURAozhAKDlsUobUG5GfxgBex+WFge6nHLa6QCgwiC4 WX7WPm2xKOw1cXP/7kVC62g= =fFEP -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030519121239.GA6087>