Error compiling buildworld
Jeremy Chadwick
koitsu at freebsd.org
Sat Mar 22 08:40:40 PDT 2008
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 at 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 |
More information about the freebsd-stable
mailing list