From owner-cvs-all@FreeBSD.ORG Mon May 19 05:12:45 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 867DD37B401; Mon, 19 May 2003 05:12:45 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-67-115-75-172.dsl.lsan03.pacbell.net [67.115.75.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D3B343FAF; Mon, 19 May 2003 05:12:40 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id 0516066B9B; Mon, 19 May 2003 05:12:40 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id C1BA54BB; Mon, 19 May 2003 05:12:39 -0700 (PDT) Date: Mon, 19 May 2003 05:12:39 -0700 From: Kris Kennaway To: Ruslan Ermilov Message-ID: <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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <20030519115339.GI17366@sunbay.com> User-Agent: Mutt/1.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-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2003 12:12:45 -0000 --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 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--