This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.1 Linux Cross-Compiler does not build
- From: Bo Thorsen <bo at sonofthor dot dk>
- To: Denis Doehler <ahava_dd at yahoo dot de>, gcc at gcc dot gnu dot org
- Date: Fri, 21 Jun 2002 09:37:03 +0200
- Subject: Re: GCC 3.1 Linux Cross-Compiler does not build
- References: <20020621062755.62433.qmail@web14207.mail.yahoo.com>
On Friday 21 June 2002 08:27, Denis Doehler wrote:
> I am unable to build a Linux cross-compiler using
> version 3.1. I am using
> an Intel RedHat 7.2 build system. I tried
> i386-pc-linux-gnu->i586-pc-linux-gnu, and also
> i586-pc-linux-gnu->powerpc-linux.
>
> $ cd gcc-3.1
> $ mkdir obj
> $ cd obj
> $ ../configure --target=powerpc-linux
> --enable-languages="c" --with-newlib
> --prefix=/opt/fsp/i586-pc-linux-gnu/local
> $ make
>
> The linux kernel headers are in
> /opt/fsp/i586-pc-linux-gnu/local/powerpc-linux/sys-include/{asm,linux}.
>
> Here is the error:
>
> /home/doehler/gcc-3.1/obj/gcc/xgcc
> -B/home/doehler/gcc-3.1/obj/gcc/
> -B/opt/fsp/i586-pc-linux-gnu/local//powerpc-linux/bin/
>
> -B/opt/fsp/i586-pc-linux-gnu/local//powerpc-linux/lib/
> -isystem
> /opt/fsp/i586-pc-linux-gnu/local//powerpc-linux/include
> -O2 -DIN_GCC
> -DCROSS_COMPILE -W -Wall -Wwrite-strings
> -Wstrict-prototypes
> -Wmissing-prototypes -isystem ./include -fPIC -g
> -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
> -I../../gcc -I../../gcc/.
> -I../../gcc/config -I../../gcc/../include -fPIC
> -mstrict-align -DL_muldi3
> -c ../../gcc/libgcc2.c -o libgcc/./_muldi3.o
> In file included from tconfig.h:21,
> from ../../gcc/libgcc2.c:36:
> ../../gcc/config/rs6000/linux.h:81:20: signal.h: No
> such file or directory
> ../../gcc/config/rs6000/linux.h:82:26: sys/ucontext.h:
> No such file or
> directorymake[2]: *** [libgcc/./_muldi3.o] Error 1
> make[2]: Leaving directory
> `/home/doehler/gcc-3.1/obj/gcc'
> make[1]: *** [stmp-multilib] Error 2
> make[1]: Leaving directory
> `/home/doehler/gcc-3.1/obj/gcc'
> make: *** [all-gcc] Error 2
>
> How can I easily circumvent this problem? I am able to
> build it when I have a GLIBC built by a previous GCC
> version installed in the above path.
You have a couple of options. The first one is to install the glibc headers
before compiling anything, the second is to compile gcc with "inhibit_libc"
defined.
Try reading http://www.x86-64.org/documentation_folder/build where I have a
full recipe for building a crosscompiler. You can also check out the
crossbuild cvs archive from cvs.x86-64.org where you will find a set of
scripts to build a crosscompiled linux from scratch. Ask me privately how to
set it up for your architecture.
Bo.
--
Bo Thorsen | Praestevejen 4
Free software developer | 5290 Marslev
SuSE Labs | Denmark