Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2008 08:40:39 -0700
From:      Jeremy Chadwick <koitsu@freebsd.org>
To:        TooMany Secrets <toomany@toomany.net>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: Error compiling buildworld
Message-ID:  <20080322154039.GA33018@eos.sc1.parodius.com>
In-Reply-To: <e8b5dfd50803220819m1288b82ck16ba2bab3436ea49@mail.gmail.com>
References:  <e8b5dfd50803220609w3d47d3c3qd4100c546a69fe9f@mail.gmail.com> <20080322144243.GB31702@eos.sc1.parodius.com> <e8b5dfd50803220819m1288b82ck16ba2bab3436ea49@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 22, 2008 at 04:19:31PM +0100, TooMany Secrets wrote:
> On Sat, Mar 22, 2008 at 3:42 PM, Jeremy Chadwick <koitsu@freebsd.org> 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 |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080322154039.GA33018>