diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-02-24 11:00:05 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-02-24 11:00:05 +0000 |
commit | 1906cf93f86d8d66f45f90380a8d3da25c087ee5 (patch) | |
tree | 90916c99abe1f1ec26709ee420e6c349eda4670a /patches/gcc/3.3/sh4-pthread.patch | |
parent | 2609573aede4ce198b3462976725b25eb1637d2e (diff) | |
download | crosstool-ng-1906cf93f86d8d66f45f90380a8d3da25c087ee5.tar.gz crosstool-ng-1906cf93f86d8d66f45f90380a8d3da25c087ee5.tar.bz2 crosstool-ng-1906cf93f86d8d66f45f90380a8d3da25c087ee5.zip |
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
Diffstat (limited to 'patches/gcc/3.3/sh4-pthread.patch')
-rw-r--r-- | patches/gcc/3.3/sh4-pthread.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/gcc/3.3/sh4-pthread.patch b/patches/gcc/3.3/sh4-pthread.patch new file mode 100644 index 00000000..a0c9233b --- /dev/null +++ b/patches/gcc/3.3/sh4-pthread.patch @@ -0,0 +1,42 @@ +Patch to fix following test case failure: + + === libstdc++-v3 tests === +FAIL: thread/pthread1.cc (test for excess errors) +Excess errors: +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/sh4-unknown-linux-gnu/bin/ld: cannot find -lthread +collect2: ld returned 1 exit status + +Note that *any* program compiled with -pthread fails: + +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/bin/sh4-unknown-linux-gnu-gcc hello.c -pthread +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/lib/gcc-lib/sh4-unknown-linux-gnu/3.3.1/../../../../sh4-unknown-linux-gnu/bin/ld: cannot find -lthread +collect2: ld returned 1 exit status + +Compiling with -lpthread on the other hand works fine: +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/bin/sh4-unknown-linux-gnu-gcc hello.c -lpthread + +So -pthread is broken in some trivial way; it should invoke -lpthread, not -lthread, +at least when targeting Linux. + +http://www.sh-linux.org/rpm-2003/SRPMS/gcc-3.2.3-3.src.rpm contains a jumbo patch, +gcc-20030210-sh-linux-1.patch, that includes a fix for this. Here's the +appropriate hunk (brings in a fix for the documented -mieee option). +No idea if this fix is completely right, but it works for me... +- dank@kegel.com 20 Jul 2003 + +Index: linux.h +=================================================================== +RCS file: /cvsroot/gcc/gcc/gcc/config/sh/linux.h,v +retrieving revision 1.9.20.1 +diff -u -d -u -r1.9.20.1 linux.h +--- gcc-ss-3_3-20030714/gcc/config/sh/linux.h.old 6 Jun 2003 02:30:59 -0000 1.9.20.1 ++++ gcc-ss-3_3-20030714/gcc/config/sh/linux.h 20 Jul 2003 23:36:50 -0000 +@@ -59,7 +59,7 @@ + #undef LIB_SPEC + #define LIB_SPEC \ + "%{shared: -lc} \ +- %{!shared: %{pthread:-lthread} \ ++ %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \ + %{profile:-lc_p} %{!profile: -lc}}" + + #undef STARTFILE_SPEC |