From owner-cvs-all@FreeBSD.ORG Mon May 19 05:40:12 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 D08F537B42B; Mon, 19 May 2003 05:40:11 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EF9F43F93; Mon, 19 May 2003 05:40:09 -0700 (PDT) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.9.3/8.9.3) with UUCP id OAA23729; Mon, 19 May 2003 14:40:08 +0200 (CEST) Received: from uriah.heep.sax.de (localhost.heep.sax.de [127.0.0.1]) by uriah.heep.sax.de (8.12.9/8.12.6) with ESMTP id h4JCXQo1009162; Mon, 19 May 2003 14:33:26 +0200 (MET DST) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.12.9/8.12.6/Submit) id h4JCXQQD009161; Mon, 19 May 2003 14:33:26 +0200 (MET DST) (envelope-from j) Date: Mon, 19 May 2003 14:33:25 +0200 From: Joerg Wunsch To: Kris Kennaway Message-ID: <20030519143325.H2937@uriah.heep.sax.de> 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: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030519121239.GA6087@rot13.obsecurity.org>; from kris@obsecurity.org on Mon, May 19, 2003 at 05:12:39AM -0700 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Spam-Status: No, hits=-32.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT version=2.53 X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) cc: cvs-ports@FreeBSD.org cc: Kris Kennaway cc: Ruslan Ermilov 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 Reply-To: Joerg Wunsch 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:40:13 -0000 As Kris Kennaway wrote: > 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. Except that it would not default to this, so the local administrator would knew whom to blame. ;-) > 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"). That's picked up via GNU configure, it seems. However, it's always been doing that way. Nevertheless, the current brokeness must have been introduced recently somehow. On my around 5.0 system, overriding NO_CPU_CFLAGS in the Makefile /did/ help out of the dilemma. Normally, picking up the default optimization/debugging settings in the configure step is considered a desired feature (in the past, many ports didn't do this, so ports maintainers invented their own hacks, and we complained why they didn't use the system's setting). However, the default CFLAGS of the system should not include any compiler or architecture specific stuff that way (just -Osomething -gsomething only). Strictly spoken, not even -pipe would be allowed, because some other cross-compiler, or someone trying to use icc for example, might fall across it. (I don't understand why -pipe hasn't been made the default in gcc.) -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)