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

Francois DERMU francois@azureus-inc.com
Fri Nov 3 22:22:00 GMT 2006


Sorry my mistake...

First I had my binutils and headers installed in a subdir (majax) of the 
$prefix to be sure not to break anything on my machine (and that really 
helped me !!!)
then I copied the content of it directly to the $prefix
but then on the I forgot to change it on the configuration command:
../gcc-3.4.4/configure --enable-languages="c,c++,java" 
--prefix=/usr/local-->/majax<-- --target=mipsel i486-linux-gnu

But now that it get's further here is my new error:
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
creating libtool
updating cache ./config.cache
configure: loading cache ./config.cache
checking how to run the C++ preprocessor... 
/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
-shared-libgcc 
-B/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/ 
-nostdinc++ 
-L/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/mipsel/libstdc++-v3/src 
-L/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/mipsel/libstdc++-v3/src/.libs 
-B/usr/local//mipsel/bin/ -B/usr/local//mipsel/lib/ -isystem 
/usr/local//mipsel/include -isystem /usr/local//mipsel/sys-include -E
loading cache ./config.cache within ltconfig
checking host system type... mipsel-unknown-elf
checking build system type... i486-pc-linux-gnu
checking for objdir... .libs
checking for 
/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
option to produce PIC... -fPIC -DPIC
checking if 
/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
PIC flag -fPIC -DPIC works... yes
checking if 
/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
static flag -static works... yes
finding the maximum length of command line arguments... (cached) 49153
checking if 
/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
supports -c -o file.o... (cached) yes
checking if 
/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
supports -fno-rtti -fno-exceptions ... yes
checking whether the linker (/usr/local//mipsel/bin/ld) supports shared 
libraries... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... no
checking command to parse /usr/local//mipsel/bin/nm output... ok
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
appending configuration tag "CXX" to libtool
checking for exception model to use... call frame
checking for enabled PCH... yes
checking for compiler with PCH support... no
checking for underlying I/O to use... stdio
checking how to run the C preprocessor... 
/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
-B/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/ 
-B/usr/local//mipsel/bin/ -B/usr/local//mipsel/lib/ -isystem 
/usr/local//mipsel/include -isystem /usr/local//mipsel/sys-include -E
checking for egrep... grep -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking for C locale to use... generic
checking for std::allocator base class to use... new
configure: "C" header strategy set to c_std
checking for ISO C99 support in <math.h>... no
checking for ISO C99 support in <stdio.h>... no
checking for lldiv_t declaration... no
checking for ISO C99 support in <stdlib.h>... no
checking for additional ISO C99 support in <wchar.h>... no
checking for enabled ISO C99 support... no
checking for thread model used by GCC... single
configure: Debug build flags set to -g3 -O0
checking for additional debug build... no
checking for extra compiler flags for building...
configure: WARNING: No native atomic operations are provided for this 
platform.
configure: WARNING: They cannot be faked when thread support is disabled.
configure: WARNING: Thread-safety of certain classes is not guaranteed.
configure: error: No support for this host/target combination.
make: *** [configure-target-libstdc++-v3] Error 1
--
Francois

Francois DERMU wrote:
> 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 libgcc.mk all
> make[2]: Entering directory 
> `/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc' 
> 
> for d in libgcc; do \
>           if [ -d $d ]; then true; else /bin/sh 
> ../../gcc-3.4.4/gcc/mkinstalldirs $d; fi; \
>         done
> mkdir -p -- libgcc
> if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
> /home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/xgcc 
> -B/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc/ 
> -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 
> libgcc/./_m16addsf3.o
> as: unrecognized option `-G'
> make[2]: *** [libgcc/./_m16addsf3.o] Error 1
> make[2]: Leaving directory 
> `/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc' 
> 
> make[1]: *** [stmp-multilib] Error 2
> make[1]: Leaving directory 
> `/home/majax/Work/OpenWRT/BuildRoot-svn/whiterussian/openwrt/toolchain_build_majax/gcc-3.4.4-majax/gcc' 
> 
> 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