How can I build gcc for arm on a x86_64 machine?
Vladimir Simonov
sv@sw.ru
Wed Oct 29 16:14:00 GMT 2008
YueGuang wrote:
> å¨ 2008-10-29ä¸ç 10:06 +0000ï¼Andrew Haleyåéï¼
> hi,
>> Hmm, you're not building with an ARM sysroot. It's not just the headers
>> you need but the entire tree of the installed target OS. I use this:
>>
>> /home/aph/gcc/trunk/configure --prefix=/home/aph/x-arm/install --target=arm-linux \
>> --with-sysroot=/home/aph/x-arm/chroot-arm/ \
>> --with-headers=/home/aph/x-arm/chroot-arm/usr/include/ \
>> --prefix=/home/aph/x-arm/install2 --disable-libssp --disable-libgomp \
>> --disable-libmudflap --enable-libgcj --disable-multilib --disable-static \
>> --disable-sjlj-exceptions target_alias=arm-linux --enable-languages=c,c++,java
>>
>> Andrew.
>
> I added the --disable-multilib --with-sysroot,like:
> ../gcc-4.3.2/configure --target=arm-linux --prefix=/home/yg/arm/usr
> --with-sysroot=/home/yg/arm/usr/ --disable-multilib
>
> But the problem still there:
>
> -fvisibility=hidden -DHIDE_EXPORTS
> <command-line>: warning: missing whitespace after the macro name
> In file included
> from /home/yg/arm/usr/arm-linux/sys-include/features.h:354,
> from /home/yg/arm/usr/arm-linux/sys-include/stdio.h:28,
> from ../../../gcc-4.3.2/libgcc/../gcc/tsystem.h:90,
> from ../../../gcc-4.3.2/libgcc/../gcc/libgcc2.c:33:
> /home/yg/arm/usr/arm-linux/sys-include/gnu/stubs.h:7:27: error:
> gnu/stubs-32.h: No such file or directory
> make[2]: *** [_muldi3.o] Error 1
> make[2]: Leaving directory `/home/yg/arm/achieve/gcc/arm-linux/libgcc'
> make[1]: *** [all-target-libgcc] Error 2
> make[1]: Leaving directory `/home/yg/arm/achieve/gcc'
> make: *** [all] Error 2
>
>
> I enter the /home/yg/usr/arm-linux/sys-include/gnu/,found only:
> stubs-64.h stubs.h
> so there is no stubs-32.h.My computer is x86_64,and the arm is 32 bit
> system,maybe this is the problem.Or I should recomplie glibc with more
> opinions.I'm confused.
>
> Guang Yue.
>
>
>
Have you tried http://kegel.com/crosstool/?
Build cross tool chain from scratch (with glibc/kernel rebuild)
is quite tricky and crosstool provides most of the tricks.
Say, on some stages it does
touch ...../gnu/stubs-32.h
because the real content is not needed...
Vladimir Simonov
More information about the Gcc-help
mailing list