This is the mail archive of the
mailing list for the GCC project.
Re: Help with Gcc-3.0.3 cross-compile
- From: Jim Wilson <wilson at redhat dot com>
- To: "Shureih, Tariq" <tariq dot shureih at intel dot com>
- Cc: "'Steve Christiansen'" <smc at us dot ibm dot com>, "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Sat, 09 Feb 2002 00:33:21 -0800
- Subject: Re: Help with Gcc-3.0.3 cross-compile
>=/home/cross-tools-ia64//ia64-pc-linux-gnu/include -c -o crtbegin.o -x
>as: unrecognized option `-x'
This is an assembler error, which means the cross-gcc is probably trying
to run the native assembler instead of the cross-assembler. If you
build and install binutils using the same prefix, or build gcc and binutils
together in the same tree, then you should not see this problem. Otherwise,
you can try to work around it by creating a link called as in the
/cross-compile/gcc-build/gcc directory, which points at the cross-as.
You will also need to do the same for the cross ld, using a link name of
>../../gcc-3.1-beta/gcc/config/ia64/linux.h:67:20: signal.h: No such file or
>../../gcc-3.1-beta/gcc/config/ia64/linux.h:68:26: sys/ucontext.h: No such
>file or directory
Your cross compiler is missing the cross libraries and cross headers.
The normal procedure for building a cross compiler assumes you have a
working target system with headers and libraries. You need to provide these
to the cross gcc build, so that the cross gcc can build its own libraries
like libstdc++. So the full cross gcc build process is something like
1) Copy /usr/include and /usr/lib from the target to the host.
2) Hack HOST_WIDE_INT for a 32-bit-x-64-bit cross for gcc 3.0.x only.
3) configure, build, and install cross binutils, specifying a prefix.
4) configure gcc, specifying the same prefix as binutils, and specifying
the target headers and libraries. e.g.
../configure --target=ia64-linux --prefix=/cross-compile/install
where the /cross-compile/ia64-linux/include is /usr/include copied from
the target system, and /cross-compile/ia64-linux/libs is /usr/lib copied
from the target system.
If you don't already have a target system, then you need to build gcc
and glibc is parallel. This is much harder to do. I don't know any
easy way to do this. I think it is best to leave this to the experts.