[uClibc] buildroot fails to build the cross-toolchain

Michael Hunold hunold at linuxtv.org
Mon Jun 13 17:19:25 UTC 2005


Carl Miller writes: 

> I suspect that it's running your native host's as, rather than the
> recently generated mips-linux-uclibc-as.  You could tell for sure by
> adding a -v to that gcc command line that's failing.  

Thank your for that hint. Here is the output:
 -------------------------schnipp-----------------------------------
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/xgc 
c 
 -B/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/ 
 -B/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin 
/ 
 -B/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/lib 
/ -isystem 
/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/inclu 
de -isystem 
/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/sys-i 
nclude -v -O2 -DIN_GCC -DCROSS_COMPILE  -DUSE_UCLIBC -W -Wall 
 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
 -Wold-style-definition  -isystem ./include  -I. -I. 
 -I/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc 
 -I/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/. 
 -I/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/../includ 
e   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions 
 -fno-zero-initialized-in-bss -fno-unit-at-a-time  \
  -c 
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/crtstuff.c 
 -DCRT_BEGIN \
 -o crtbegin.o
Reading specs from 
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/spe 
cs
Configured with: 
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/configure 
 --prefix=/home/mhu/buildroot/buildroot/build_mips/staging_dir 
 --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu 
 --target=mips-linux-uclibc --enable-languages=c --disable-shared 
 --with-sysroot=/home/mhu/buildroot/buildroot/toolchain_build_mips/uClibc_dev 
/ --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld 
 --disable-nls --enable-multilib
Thread model: posix
gcc version 3.4.2
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/cc1 
 -quiet -v -I. -I. 
 -I/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc 
 -I/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/. 
 -I/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/../includ 
e -iprefix 
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/../ 
lib/gcc/mips-linux-uclibc/3.4.2/ -isystem 
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/inc 
lude -isystem 
/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin/i 
nclude -isystem 
/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/lib/i 
nclude -DIN_GCC -DCROSS_COMPILE -DUSE_UCLIBC -DCRT_BEGIN -isystem 
/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/inclu 
de -isystem 
/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/sys-i 
nclude -isystem ./include 
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/crtstuff.c 
 -quiet -dumpbase crtstuff.c -auxbase-strip crtbegin.o -g0 -O2 -W -Wall 
 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
 -Wold-style-definition -version -finhibit-size-directive 
 -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss 
 -fno-unit-at-a-time -o /tmp/ccSaZwia.s
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin/ 
include"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/lib/ 
include"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/incl 
ude"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/sys- 
include"
ignoring duplicate directory "./include"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/.. 
/lib/gcc/mips-linux-uclibc/3.4.2/include"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/.. 
/lib/gcc/mips-linux-uclibc/3.4.2/../../../../mips-linux-uclibc/include"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/toolchain_build_mips/uClibc_dev//usr/local/in 
clude"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/build_mips/staging_dir/lib/gcc/mips-linux-ucl 
ibc/3.4.2/include"
ignoring nonexistent directory 
"/home/mhu/buildroot/buildroot/build_mips/staging_dir/lib/../mips-linux-ucli 
bc/include"
ignoring duplicate directory "."
ignoring duplicate directory 
"/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/."
#include "..." search starts here:
#include <...> search starts here:
.
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/gcc/../include
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc/inc 
lude
/home/mhu/buildroot/buildroot/toolchain_build_mips/uClibc_dev//usr/include
End of search list.
GNU C version 3.4.2 (mips-linux-uclibc)
	compiled by GNU C version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64463
as -EB -O2 -g0 -no-mdebug -32 -v -KPIC -o crtbegin.o /tmp/ccSaZwia.s
as: unrecognized option `-EB'
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory 
`/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory 
`/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial'
make: *** 
[/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2-initial/.compi 
led] Error 2
 -------------------------schnipp----------------------------------- 

So it seems that it indeed calls the mips-linux-uclibc binary, isn't it? 

> Is there an as
> binary in
> /home/mhu/buildroot/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin
> ?

There isn't, but if I understand the process of building a toolchain 
correctly, then it is calling the initial gcc called xgcc which is acting 
like "as", too. But I'm not sure at all. 

So this is "/toolchain_build_mips/gcc-3.4.2-initial/gcc/xgcc -v".
 -------------------------schnipp-----------------------------------
mhu buildroot% ./toolchain_build_mips/gcc-3.4.2-initial/gcc/xgcc -v
Using built-in specs.
Configured with: 
/home/mhu/buildroot/buildroot/toolchain_build_mips/gcc-3.4.2/configure 
 --prefix=/home/mhu/buildroot/buildroot/build_mips/staging_dir 
 --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu 
 --target=mips-linux-uclibc --enable-languages=c --disable-shared 
 --with-sysroot=/home/mhu/buildroot/buildroot/toolchain_build_mips/uClibc_dev 
/ --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld 
 --disable-nls --enable-multilib
Thread model: posix
gcc version 3.4.2
 -------------------------schnipp----------------------------------- 

> If not, then something might have gone wrong with your cross-binutils
> install.

I'm pretty much lost here, so any help is appreciated. 

CU
Michael. 




More information about the uClibc mailing list