This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: crosstool-0.38, ppc860, NPTL and gcc4.0.1


Dan Kegel wrote:

Schaefer-Hutter, Peter wrote:

I'm currently struggling with crosstool trying to compile
the subjects' toolchain. The core-gcc seems to miss libiberty.a;
however, libiberty.a is available in $RESULT_TOP/lib.


The one in $RESULT_TOP/lib is probably compiled for
the target; it's not the one the core-gcc needs.

I think I've seen this problem before, but I forget the circumstances.
Maybe gcc is confused, and thinks you're not building a
cross-compiler?
What kind of machine are you building on?

Basically, i applied the 0.37-nptl patch from contrib. I then
had to modify the section in crosstool.sh where pthreadtypes.h
gets copied:

#cp ${GLIBC_DIR}/nptl/sysdeps/unix/sysv/linux/${ARCH}/bits/pthreadtypes.h $HEADERDIR/bits/pthreadtypes.h
case $TARGET in
sparc* ) pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h ;;
s390* ) pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h ;;
powerpc* ) pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h ;;
i386* ) pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h ;;
i686* ) pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h ;;
esac
test ! -f $HEADERDIR/bits/pthreadtypes.h && cp ${GLIBC_DIR}/${pthreadtypes_h} $HEADERDIR/bits/pthreadtypes.h


I hope this was o.k.


Somebody else posted a similar change; I'm attaching it,
since for some reasons his messages aren't being
archived by the mailing list archive at sources.redhat.com.

Patch was from me. I dont know why the messages are not being archived.


gcc -c -g -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/home/ashaepe/crosstool/crosstool-0.38/build/powerpc-860-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc -I/home/ashaepe/crosstool/crosstool-0.38/build/powerpc-860-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc/build -I/home/ashaepe/crosstool/crosstool-0.38/build/powerpc-860-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc/../include -I/home/ashaepe/crosstool/crosstool-0.38/build/powerpc-860-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc/../libcpp/include \
-o build/errors.o /home/ashaepe/crosstool/crosstool-0.38/build/powerpc-860-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc/errors.c


make: *** Keine Regel vorhanden, um das Target »../build-i686-host_pc-linux-gnu/libiberty/libiberty.a«,
benötigt von »build/genmodes«, zu erstellen. Schluss.
make: Leaving directory `/home/ashaepe/crosstool/crosstool-0.38/build/powerpc-860-linux-gnu/gcc-4.0.1-glibc-2.3.5/build-gcc-core-shared/gcc'




Maybe Khem Raj can comment... he's been building
ppc64 nptl toolchains.

If my german is still sound then it means "no rule to make target ./build-i686-host_pc-linux-gnu/libiberty/libiberty.a". I haven't seen this problem so far that may be because I have been working with GCC 4.1 and binutils 2.16.1. I am stuck at a segfault in ld while building libgcc. Havent had enough time to dig it.


- Dan

------------------------------------------------------------------------

Message-ID: <42E7222D.6070900@mvista.com>
Date: Tue, 26 Jul 2005 22:57:01 -0700
From: Khem Raj <kraj@mvista.com>
To: crossgcc@sources.redhat.com
Subject: [PATCH] pthreadtypes.h not found NPTL patch


I encountered a problem while building ppc64 NPTL toolchain. The copy operation for pthreadtypes.h was assuming that sysdeps has same sub directory name as
${ARCH} variable meant for linux part. However this is not true in case of ppc64/ppc where the sysdeps directory is called 'powerpc' similarily for sparc and sparc64


The build would fail complaining about nptl/sysdeps/unix/sysv/linux/ppc64/bits/pthreadtypes.h not founds

This patch corrects the problem. This patch may be incorporated into the NPTL patch.

--- crosstool-0.37/crosstool.sh.orig	2005-07-26 22:48:21.000000000 -0700
+++ crosstool-0.37/crosstool.sh	2005-07-26 16:17:07.000000000 -0700
@@ -453,20 +453,31 @@ if grep -q 'gcc-[34]' ${GCC_CORE_DIR}/Ch
        # will have to manually be copied from under the tree of the desired
        # target pthread implementation.
        cp ${GLIBC_DIR}/nptl/sysdeps/pthread/pthread.h $HEADERDIR/pthread.h
-        cp ${GLIBC_DIR}/nptl/sysdeps/unix/sysv/linux/${ARCH}/bits/pthreadtypes.h
+        pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/${ARCH}/bits/pthreadtypes.h

# On s390, powerpc and sparc we also require bits/wordsize.h.
case $TARGET in
sparc* | s390* | powerpc* )
case $TARGET in
- sparc64* ) wordsize_h=sysdeps/sparc/sparc64/bits/wordsize.h ;;
- sparc* ) wordsize_h=sysdeps/sparc/sparc32/bits/wordsize.h ;;
- s390x* ) wordsize_h=sysdeps/s390/s390x/bits/wordsize.h ;;
- s390* ) wordsize_h=sysdeps/s390/s390/bits/wordsize.h ;;
- powerpc64* ) wordsize_h=sysdeps/powerpc/powerpc64/bits/wordsize.h ;;
- powerpc* ) wordsize_h=sysdeps/powerpc/powerpc32/bits/wordsize.h ;;
+ sparc64* ) wordsize_h=sysdeps/sparc/sparc64/bits/wordsize.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
+ ;;
+ sparc* ) wordsize_h=sysdeps/sparc/sparc32/bits/wordsize.h + pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
+ ;;
+ s390x* ) wordsize_h=sysdeps/s390/s390x/bits/wordsize.h + ;;
+ s390* ) wordsize_h=sysdeps/s390/s390/bits/wordsize.h + ;;
+ powerpc64* ) wordsize_h=sysdeps/powerpc/powerpc64/bits/wordsize.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
+ ;;
+ powerpc* ) wordsize_h=sysdeps/powerpc/powerpc32/bits/wordsize.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
+ ;;
esac
test ! -f $HEADERDIR/bits/wordsize.h && cp ${GLIBC_DIR}/${wordsize_h} $HEADERDIR/bits/wordsize.h
+ cp ${GLIBC_DIR}/${pthreadtypes_h} $HEADERDIR/bits/pthreadtypes.h
;;
esac
fi # GLIBC_ADDONS_NPTL





------------------------------------------------------------------------

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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