Trouble cross building target libraries

Kai Ruottu kai.ruottu@wippies.com
Tue Sep 3 13:27:00 GMT 2013


3.9.2013 15:02, Christer Solskogen kirjoitti:
> Hi!
>
> I have a gcc cross compiler that at least seems to work (I'm able to
> cross compile binutils) - but I can't seem to be able to cross compile
> gcc properly. The toplevel config.log seems fine:
> configure:3896: checking for x86_64-builder-linux-gnu-gcc
> configure:3912: found /home/ubuntu/obj/ntools/bin/x86_64-builder-linux-gnu-gcc
> configure:3923: result: x86_64-builder-linux-gnu-gcc
> .
> But for instance x86_64-builder-linux-gnu/libstdc++-v3/config.log says
> something that I did not expect:
> configure:3559: checking for x86_64-builder-linux-gnu-gcc
> configure:3586: result: cc
>
> and cc is the compiler from the build system. Not the cross compiler.
> I also see that this happens for libgcc. I guess it happens for all
> target libraries.
>
> The crossed gcc is configured like this:
> /home/ubuntu/src/bin/gcc/configure
> --prefix=/home/ubuntu/obj/btools/usr --host=x86_64-builder-linux-gnu
> --build=x86_64-unknown-linux-gnu --enable-languages=c,c++
> --disable-multilib --with-sysroot=/home/ubuntu/obj/btools
>
> Any hints?
>

What do you think the guessed '--target=<something>' to be?

1. the same as in the '--build=x86_64-unknown-linux-gnu' ?

2. the same as in the '--host=x86_64-builder-linux-gnu' ?

Despite of myself producing many (> 100) crosscompilers, I have no 
thought which
one it could be :(  I have always used all the three '--build=', 
'--host=' and '--target='
in my configures...

So you assume somewhere being a bug although all this could be expected, the
configure guessing that $target = $build  when you didn't tell what it 
should be!



More information about the Gcc-help mailing list