This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How can I build gcc for arm on a x86_64 machine?
- From: YueGuang <ygxyvesuvius at gmail dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 29 Oct 2008 19:06:02 +0800
- Subject: Re: How can I build gcc for arm on a x86_64 machine?
- References: <1225269849.23215.16.camel@debian-YG> <490835B8.4090703@redhat.com>
- Reply-to: ygxyvesuvius at gmail dot com
å 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.