Installing a cross compiler

J-C Louis
Tue Oct 30 06:34:00 GMT 2001

Since two weeks, I try to install a cross-compiler but there
are still erros in the compilation.

I'm building Gcc on a Red hat 7.1 system, Gcc (2.96 version) is
already installed with the distribution
and I would configure Gcc for solaris on the same computer.

I recapitulate my compilation :

First, I configure and build binutils :

    export TARGET=sparc-sun-solaris2.8
    export PREFIX=/opt/i686-pc-linux-gnu/${TARGET}
    export PATH=$PATH:${PREFIX}/bin

    configure --target=${TARGET} --prefix=${PREFIX}
    make all install

Then, I configure Gcc (2.95.3 version) :

    configure --target=${TARGET} --prefix=${PREFIX}
        --without-headers --with-newlib
    make all-gcc install-gcc

The compilation failed. Here is the error message :

    In file included from gthr-default.h:1,
                              from gthr.h:98,
                              from ./libgcc2.c:3034:
    gthr-posix.h:37: pthread.h: No such file or directory

libgcc2 will be built without needing "gthr" (gnu pthreads)
So I add the option -D__gthr_posix_h and -Dinhibit_libc to

After that, there is another error in my compilation :

    ./frame.c:57: parse error before `object_mutex'
    ./frame.c:57: warning: data definition has no type or storage class
    make[1]: *** [libgcc2.a] Error 1

What does that mean ?
I try to compile with another target (arm-elf ) and the compilation
don't failed but with the target Sparc-sun-solaris2.*, there are
I don't understand.

Any help will be very appreciated.


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list