Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2008 10:20:37 -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:  <20080322172037.GA35505@eos.sc1.parodius.com>
In-Reply-To: <e8b5dfd50803220908j1223294ey5962c3208f63761e@mail.gmail.com>
References:  <e8b5dfd50803220609w3d47d3c3qd4100c546a69fe9f@mail.gmail.com> <20080322144243.GB31702@eos.sc1.parodius.com> <e8b5dfd50803220819m1288b82ck16ba2bab3436ea49@mail.gmail.com> <20080322154039.GA33018@eos.sc1.parodius.com> <e8b5dfd50803220908j1223294ey5962c3208f63761e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 22, 2008 at 05:08:57PM +0100, TooMany Secrets wrote:
> >  $ echo 'int main(void) { return 0; }' > tmp.c
> >  $ gcc -Wchar-subscripts -o x tmp.c
> 
> This works fine under a normal user. Under root... also!!!
> (note that I really make a strong verification about ccache use;
> deleted from make.conf, deleted from .cshrc's root and deleted port
> ccache).

Then it's something that's happening in the buildworld framework.

You might have some weirder stuff in /etc/make.conf, or /etc/src.conf.
The src.conf stuff would affect your buildworld capabilities.

> One thing I don't know about it, is the "cc1"... There isn't any "cc1"
> in the system, and also anything about ccache with it (sorry for my
> bad english).

If I remember correctly, cc1 is the name of the temporary compiler (it's
gcc) built in /usr/obj.  buildworld builds gcc, and uses that copy of
gcc to compile world, rather than /usr/bin/gcc.

> I'm trying to make a buildworld now, and at the moment... But here it
> is; without ccache and only with system's gcc:
> 
> ===> lib/csu/i386-elf (obj,depend,all,install)
> rm -f .depend
> mkdep -f .depend -a    -I/usr/src/lib/csu/i386-elf/../common
> -I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i38
> 6-elf/crt1.c /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S
> cc -O2 -fno-strict-aliasing -pipe -march=prescott
> -I/usr/src/lib/csu/i386-elf/../common
> -I/usr/src/lib/csu/i386-elf/../../libc/
> include -Wsystem-headers -Wall -Wno-format-y2k -W
> -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
> -Wpointer-arith
>  -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow
> -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested
> -externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1.c
> cc1: error: unrecognized command line option "-Wchar-subscripts"

I can't explain what's going on here.  I don't have this problem.

FWIW, there's some historic reports of this kind of issue, with
different issues.  Some are due to users dotfiles, others are due to
mixed gcc versions on the system (users trying to use gcc 3.4 with gcc
4.x flags like -Wno-pointer-sign), and others are due to CFLAGS
modifications.

http://groups.google.com/group/comp.unix.bsd.freebsd.misc/browse_thread/thread/a0af29b813232cd1/a1082e5d4200d10a?hl=en&lnk=st&q=gcc+unrecognized+command+line+option+freebsd#a1082e5d4200d10a

http://groups.google.com/group/mailing.freebsd.ports/browse_thread/thread/15e5e69b5a93413a/ca03b7c3e08c01a2?hl=en&lnk=st&q=gcc+unrecognized+command+line+option#ca03b7c3e08c01a2

-- 
| 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?20080322172037.GA35505>