From owner-freebsd-stable@FreeBSD.ORG Sat Mar 22 15:40:39 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB5DE106566C for ; Sat, 22 Mar 2008 15:40:39 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id C70E18FC15 for ; Sat, 22 Mar 2008 15:40:39 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 839A81CC06C; Sat, 22 Mar 2008 08:40:39 -0700 (PDT) Date: Sat, 22 Mar 2008 08:40:39 -0700 From: Jeremy Chadwick To: TooMany Secrets Message-ID: <20080322154039.GA33018@eos.sc1.parodius.com> References: <20080322144243.GB31702@eos.sc1.parodius.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-stable Subject: Re: Error compiling buildworld X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2008 15:40:40 -0000 On Sat, Mar 22, 2008 at 04:19:31PM +0100, TooMany Secrets wrote: > On Sat, Mar 22, 2008 at 3:42 PM, Jeremy Chadwick wrote: > > > My make.conf flags: > > > CPUTYPE?=prescott > > > CFLAGS= -O -pipe > > > CXXFLAGS+= -O -DNO_MALLOC_EXTRAS > > > COPTFLAGS= -O -pipe > > > #CCACHE > > > CC=/usr/local/libexec/ccache/world-cc > > > CXX=/usr/local/libexec/ccache/world-c++ > > > (I try with and without ccache). > > I'm willing to bet that the compiler tinkering you've done is causing > > said problem. It would indicate whatever compiler is being used > > ("world-cc") is acting as if it doesn't understand the compiler flag > > specified. I can assure you that gcc does support this option. > > It is the gcc of the system! How is possible that gcc from fbsd 7.0 > doesn't understand a compiler flag from fbsd 7.0 sources? Excuse, but > I'm a bit newbie... No, because the flag in question works fine RELENG_6 and RELENG_7, using the stock (base system) gcc: $ uname -mnrs FreeBSD eos.sc1.parodius.com 6.3-PRERELEASE i386 $ gcc -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.4.6 [FreeBSD] 20060305 $ echo 'int main(void) { return 0; }' > tmp.c $ gcc -Wchar-subscripts -o x tmp.c $ $ uname -mnrs FreeBSD icarus.home.lan 7.0-STABLE amd64 $ gcc -v Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 4.2.1 20070719 [FreeBSD] $ echo 'int main(void) { return 0; }' > tmp.c $ gcc -Wchar-subscripts -o x tmp.c $ > > It would be useful to see see the buildworld output with CXXFLAGS, > > COPTFLAGS, CC, and CXX disabled in your make.conf. I realise you said > > "I get the same error without this stuf", but you should've sent *that* > > buildworld output. :-) > > Is the same output. It can't be. You're redefining CC in make.conf, for example, so this output would not be the same: CC='/usr/local/libexec/ccache/world-cc' {...} /usr/local/libexec/ccache/world-cc {...} I don't mean to sound anal about it, but there's definitely something unique your system which is causing this; choosing a separate compiler or compiler wrapper is the most obvious cause. > > Also, you really should be using "?=" operators on those optimisation > > flags, in case something else overrides them. Yes, I know what the > > documentation in share/examples/etc/make.conf says, but I still > > recommend doing what I said. > > Hummm... while you, or anybody, could say me anything about this, I > try with the "?=" operator, but if without operators doesn't > compile... I should note that use of ?= won't fix your reported problem with -Wchar-subscripts. I was just pointing out that you should use it to allow programs to override your settings -- because there are many cases where programs use specific CFLAGS to build things correctly. Overriding them can break that. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |