From owner-cvs-ports@FreeBSD.ORG Mon May 19 05:24:59 2003 Return-Path: Delivered-To: cvs-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BA8537B401; Mon, 19 May 2003 05:24:59 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DBA343F85; Mon, 19 May 2003 05:24:53 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h4JCOeEd030730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 May 2003 15:24:43 +0300 (EEST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h4JCOduB030725; Mon, 19 May 2003 15:24:39 +0300 (EEST) (envelope-from ru) Date: Mon, 19 May 2003 15:24:39 +0300 From: Ruslan Ermilov To: Kris Kennaway Message-ID: <20030519122439.GA28176@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> <20030519121239.GA6087@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <20030519121239.GA6087@rot13.obsecurity.org> User-Agent: Mutt/1.5.4i cc: Joerg Wunsch cc: cvs-ports@FreeBSD.org cc: Kris Kennaway cc: cvs-all@FreeBSD.org cc: ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/devel/avr-libc Makefile X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2003 12:25:00 -0000 --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 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--