RE: Trying to build a toolchain for SH4, failed to compile final GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, you're right. I did keep on searching for the solution and discovered those changes since GCC 4.2 (if my memory is good) about --sysroot option.
Si I removed the local-prefix and changed to sysroot and now libgcc is linked properly with glibc 2.7 compiled with the bootstrap compiler.

I now fail on another problem : psignal seem's to be defined several times both in libiberty and system files for libgomp :

:
:
:
make[4]: quittant le répertoire « /home/sandbox/cdks/test/cdk/build/sh4-unknown-linux-gnu/libgcc »
make[3]: quittant le répertoire « /home/sandbox/cdks/test/cdk/build/sh4-unknown-linux-gnu/libgcc »
Checking multilib configuration for libgomp...
Configuring in sh4-unknown-linux-gnu/libgomp
:
:
:
/home/sandbox/cdks/test/cdk/build/./gcc/xgcc -B/home/sandbox/cdks/test/cdk/build/./gcc/ -B/home/sandbox/cdks/test/output/cdk/sh4-unknown-linux-gnu/bin/ -B/home/sandbox/cdks/test/output/cdk/sh4-unknown-linux-gnu/lib/ -isystem /home/sandbox/cdks/test/output/cdk/sh4-unknown-linux-gnu/include -isystem /home/sandbox/cdks/test/output/cdk/sh4-unknown-linux-gnu/sys-include -c -DHAVE_CONFIG_H -g -Os    -I. -I../../../gcc-4.4.4/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../../../gcc-4.4.4/libiberty/strsignal.c -o strsignal.o
../../../gcc-4.4.4/libiberty/strsignal.c:554: error: conflicting types for 'psignal'
/home/sandbox/cdks/test/output/cdk/sh4-unknown-linux-gnu/include/signal.h:141: note: previous declaration of 'psignal' was here
make[3]: *** [strsignal.o] Erreur 1
make[3]: quittant le répertoire « /home/sandbox/cdks/test/cdk/build/sh4-unknown-linux-gnu/libiberty »

New clue for me...at line 554 of strsignal.c I can find :

#ifndef HAVE_PSIGNAL

void
psignal (int signo, char *message)
{

This psignal code should only be compile when #ifndef HAVE_PSIGNAL is true, which mean that (if my guess is the good one), configure have not found it elsewhere in the system headers...

When I check into config.h generated into build directory of libiberty I can see :

/* Define to 1 if you have the `psignal' function. */
#define HAVE_PSIGNAL 1

So the psignal should not be compiled into the strsignal.c     

8-(



-----Message d'origine-----
De : Ian Lance Taylor [mailto:iant@xxxxxxxxxx]
Envoyé : mardi 18 mai 2010 16:38
À : Sébastien GRENIER
Cc : gcc-help@xxxxxxxxxxx
Objet : Re: Trying to build a toolchain for SH4, failed to compile final
GCC


Sébastien GRENIER <sebastien.grenier7@xxxxxxx> writes:

> /home/sandbox/cdks/test/output/cdk/bin/sh4-unknown-linux-gnu-ld: skipping
> incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
> /home/sandbox/cdks/test/output/cdk/bin/sh4-unknown-linux-gnu-ld: cannot find
> /lib/libc.so.6

If I understand correct, you are trying to build a cross-compiler.
/lib/libc.so.6 is going to be a host library, so you don't want to
link against it.  The reference is probably coming from the libc.so
linker script.  You probably need to use --sysroot when you run
configure.

Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux