This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] mips*-linux: Always imply -lpthread for -pthread


Hello All,

the appended patch changes LIB_SPEC for mips*-linux systems to always
imply -lpthrad when the -pthread argument is given. A similiar change
was done over the last years for most other architectures.

(I notice the m32r linux has the same problem, I left it alone because
I'm not sure what the intended effect of the "#undef LIB_SPEC" in
config/m32r/m32r.h is.)


2007-06-13  Thiemo Seufer  <ths@networkno.de>

	* config/mips/linux.h, config/mips/linux64.h (LIB_SPEC): Always
	imply -lpthread for -pthread.


Index: gcc/config/mips/linux.h
===================================================================
--- gcc/config/mips/linux.h	(revision 125681)
+++ gcc/config/mips/linux.h	(working copy)
@@ -174,9 +174,10 @@
 
 #undef LIB_SPEC
 #define LIB_SPEC "\
-%{shared: -lc} \
-%{!shared: %{pthread:-lpthread} \
-  %{profile:-lc_p} %{!profile: -lc}}"
+%{pthread:-lpthread} \
+%{shared:-lc} \
+%{!shared: \
+  %{profile:-lc_p} %{!profile:-lc}}"
 
 #define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h"
 
Index: gcc/config/mips/linux64.h
===================================================================
--- gcc/config/mips/linux64.h	(revision 125681)
+++ gcc/config/mips/linux64.h	(working copy)
@@ -34,9 +34,10 @@
 
 #undef LIB_SPEC
 #define LIB_SPEC "\
-%{shared: -lc} \
-%{!shared: %{pthread:-lpthread} \
-  %{profile:-lc_p} %{!profile: -lc}}"
+%{pthread:-lpthread} \
+%{shared:-lc} \
+%{!shared: \
+  %{profile:-lc_p} %{!profile:-lc}}"
 
 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"


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