This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with Gcc-3.0.3 cross-compile

>/cross-compile/gcc-build/gcc/xgcc -B/cross-compile/gcc-build/gcc/
>-B=/home/cross-tools-ia64//ia64-pc-linux-gnu/lib/ -isystem
>=/home/cross-tools-ia64//ia64-pc-linux-gnu/include -c -o crtbegin.o -x
>assembler-with-cpp ../../gcc-3.1-beta/gcc/config/ia64/crtbegin.asm
>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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]