Cross compiling gcc for mipsel error [as: unrecognized option `-G']

Francois DERMU
Fri Nov 3 20:07:00 GMT 2006

I've compiled and installed the binutils to my /usr/local/ directory
and copied the uClibc and linux headers in there too.

Then I configured my gcc
../gcc-3.4.4/configure --enable-languages="c,c++,java" 
--prefix=/usr/local/majax --target=mipsel i486-linux-gnu
creating cache ./config.cache
checking host system type... i486-pc-linux-gnu
checking target system type... mipsel-unknown-elf
checking build system type... i486-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
      target-libffi target-boehm-gc target-zlib target-libjava 
target-libf2c target-libobjc
     (Any other directories should still work fine.)
checking for i486-linux-gnu-ar... no
checking for ar... ar
checking for i486-linux-gnu-as... no
checking for as... as
checking for i486-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for i486-linux-gnu-ld... no
checking for ld... ld
checking for i486-linux-gnu-nm... no
checking for nm... nm
checking for i486-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i486-linux-gnu-windres... no
checking for windres... windres
checking for i486-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for i486-linux-gnu-objdump... no
checking for objdump... objdump
checking for mipsel-ar... mipsel-ar
checking for mipsel-as... mipsel-as
checking for mipsel-dlltool... no
checking for mipsel-ld... mipsel-ld
checking for mipsel-nm... mipsel-nm
checking for mipsel-ranlib... mipsel-ranlib
checking for mipsel-windres... no
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile

and Make:
echo '#endif' >> fp-bit.c
echo '#define QUIET_NAN_NEGATED' >> fp-bit.c
cat ../../gcc-3.4.4/gcc/config/fp-bit.c >> fp-bit.c
echo '#ifdef __MIPSEL__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
echo '#endif' >> dp-bit.c
echo '#define QUIET_NAN_NEGATED' >> dp-bit.c
cat ../../gcc-3.4.4/gcc/config/fp-bit.c >> dp-bit.c
make \
           CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -pedantic -Wno-long-long  " \
           CONFIG_H="config.h  auto-host.h 
../../gcc-3.4.4/gcc/../include/ansidecl.h" \
           MAKEOVERRIDES= \
           -f all
make[2]: Entering directory 
for d in libgcc; do \
           if [ -d $d ]; then true; else /bin/sh 
../../gcc-3.4.4/gcc/mkinstalldirs $d; fi; \
mkdir -p -- libgcc
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
-B/usr/local/majax/mipsel/bin/ -B/usr/local/majax/mipsel/lib/ -isystem 
/usr/local/majax/mipsel/include -isystem 
/usr/local/majax/mipsel/sys-include -O2  -DIN_GCC -DCROSS_COMPILE   -W 
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include  -G 0 -g  -DIN_LIBGCC2 
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.4.4/gcc 
-I../../gcc-3.4.4/gcc/. -I../../gcc-3.4.4/gcc/../include  -DL_m16addsf3 
-xassembler-with-cpp -c ../../gcc-3.4.4/gcc/config/mips/mips16.S -o 
as: unrecognized option `-G'
make[2]: *** [libgcc/./_m16addsf3.o] Error 1
make[2]: Leaving directory 
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory 
make: *** [all-gcc] Error 2

Do you have any idea why this "-G" option is not recognized ?
Do you think it could come from a bad placement of the headers or the 
library files ?

More information about the Gcc-help mailing list