This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/34787] New: fix -shared + -pthread for mips/linux
- From: "vapier at gentoo dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2008 03:18:06 -0000
- Subject: [Bug target/34787] New: fix -shared + -pthread for mips/linux
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
like so many other bugs, "-shared -pthread" is broken on mips linux:
$ mips-linux-gcc -dumpspecs
...
%{!shared: %{pthread:-lpthread} ...
...
simple fix until a general solution (as proposed in Bug 20705) is implemented:
--- gcc/config/mips/linux.h
+++ gcc/config/mips/linux.h
@@ -175,7 +175,7 @@
#undef LIB_SPEC
#define LIB_SPEC "\
%{shared: -lc} \
-%{!shared: %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+%{pthread:-lpthread} \
+%{!shared: %{profile:-lc_p} %{!profile: -lc}}"
#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h"
--- gcc/config/mips/linux64.h
+++ gcc/config/mips/linux64.h
@@ -33,8 +33,8 @@
#undef LIB_SPEC
#define LIB_SPEC "\
%{shared: -lc} \
-%{!shared: %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+%{pthread:-lpthread} \
+%{!shared: %{profile:-lc_p} %{!profile: -lc}}"
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
this follows the same lines as all other Linux arches:
http://gcc.gnu.org/ml/gcc-patches/2002-12/msg00526.html
--
Summary: fix -shared + -pthread for mips/linux
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vapier at gentoo dot org
GCC target triplet: mips-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34787