aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc-4.4.3/gcc/config/arm/linux-eabi.h2
-rw-r--r--gcc-4.4.3/gcc/config/i386/linux.h2
-rw-r--r--gcc-4.4.3/gcc/config/linux-android.h2
-rw-r--r--gcc-4.4.3/gcc/config/linux.h8
-rw-r--r--gcc-4.4.3/gcc/config/mips/linux.h9
-rw-r--r--gcc-4.6/gcc/config/arm/linux-eabi.h2
-rw-r--r--gcc-4.6/gcc/config/gnu-user.h8
-rw-r--r--gcc-4.6/gcc/config/i386/linux.h2
-rw-r--r--gcc-4.6/gcc/config/i386/linux64.h2
-rw-r--r--gcc-4.6/gcc/config/linux-android.h4
-rw-r--r--gcc-4.6/gcc/config/mips/linux.h8
-rw-r--r--gcc-4.7/gcc/config/arm/linux-eabi.h2
-rw-r--r--gcc-4.7/gcc/config/gnu-user.h8
-rw-r--r--gcc-4.7/gcc/config/i386/gnu-user.h2
-rw-r--r--gcc-4.7/gcc/config/i386/gnu-user64.h2
-rw-r--r--gcc-4.7/gcc/config/linux-android.h4
-rw-r--r--gcc-4.7/gcc/config/mips/gnu-user.h8
17 files changed, 44 insertions, 31 deletions
diff --git a/gcc-4.4.3/gcc/config/arm/linux-eabi.h b/gcc-4.4.3/gcc/config/arm/linux-eabi.h
index d44fcddda..52b4b5373 100644
--- a/gcc-4.4.3/gcc/config/arm/linux-eabi.h
+++ b/gcc-4.4.3/gcc/config/arm/linux-eabi.h
@@ -87,7 +87,7 @@
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (LINUX_TARGET_LIB_SPEC, \
- ANDROID_LIB_SPEC " " LINUX_TARGET_LIB_SPEC )
+ LINUX_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.4.3/gcc/config/i386/linux.h b/gcc-4.4.3/gcc/config/i386/linux.h
index 12451fef8..8d3aa87ee 100644
--- a/gcc-4.4.3/gcc/config/i386/linux.h
+++ b/gcc-4.4.3/gcc/config/i386/linux.h
@@ -97,7 +97,7 @@ along with GCC; see the file COPYING3. If not see
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (LINUX_TARGET_LIB_SPEC, \
- LINUX_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ LINUX_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.4.3/gcc/config/linux-android.h b/gcc-4.4.3/gcc/config/linux-android.h
index b5bc2bb64..7f6076293 100644
--- a/gcc-4.4.3/gcc/config/linux-android.h
+++ b/gcc-4.4.3/gcc/config/linux-android.h
@@ -54,7 +54,7 @@
#define ANDROID_LIB_SPEC \
"%{!static: -ldl} \
- %{pthread:-lc}"
+ %{pthread: -lc}"
#define ANDROID_STARTFILE_SPEC \
"%{!shared:" \
diff --git a/gcc-4.4.3/gcc/config/linux.h b/gcc-4.4.3/gcc/config/linux.h
index f2dc836ca..579d50352 100644
--- a/gcc-4.4.3/gcc/config/linux.h
+++ b/gcc-4.4.3/gcc/config/linux.h
@@ -79,10 +79,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-#define LINUX_TARGET_LIB_SPEC \
- "%{pthread:-lpthread} \
- %{shared:-lc} \
+#define LINUX_TARGET_LIB_SPEC_LESS_PTHREAD \
+ "%{shared:-lc} \
%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
+#define LINUX_TARGET_LIB_SPEC \
+ "%{pthread:-lpthread} " \
+ LINUX_TARGET_LIB_SPEC_LESS_PTHREAD
#undef LIB_SPEC
#define LIB_SPEC LINUX_TARGET_LIB_SPEC
diff --git a/gcc-4.4.3/gcc/config/mips/linux.h b/gcc-4.4.3/gcc/config/mips/linux.h
index 280d6fbda..136356b26 100644
--- a/gcc-4.4.3/gcc/config/mips/linux.h
+++ b/gcc-4.4.3/gcc/config/mips/linux.h
@@ -106,12 +106,15 @@ along with GCC; see the file COPYING3. If not see
#undef ASM_OUTPUT_REG_POP
#undef LINUX_SUBTARGET_LIB_SPEC
-#define LINUX_SUBTARGET_LIB_SPEC "\
-%{pthread:-lpthread} \
+#define LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD "\
%{shared:-lc} \
%{!shared: \
%{profile:-lc_p} %{!profile:-lc}}"
+#define LINUX_SUBTARGET_LIB_SPEC "\
+%{pthread:-lpthread} " \
+LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD
+
#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h"
#ifdef HAVE_AS_NO_SHARED
@@ -167,7 +170,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (LINUX_SUBTARGET_LIB_SPEC, \
- LINUX_SUBTARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.6/gcc/config/arm/linux-eabi.h b/gcc-4.6/gcc/config/arm/linux-eabi.h
index bb1a681cd..19e49054c 100644
--- a/gcc-4.6/gcc/config/arm/linux-eabi.h
+++ b/gcc-4.6/gcc/config/arm/linux-eabi.h
@@ -87,7 +87,7 @@
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
- ANDROID_LIB_SPEC " " GNU_USER_TARGET_LIB_SPEC )
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.6/gcc/config/gnu-user.h b/gcc-4.6/gcc/config/gnu-user.h
index 1c4e71d1b..703afb5c7 100644
--- a/gcc-4.6/gcc/config/gnu-user.h
+++ b/gcc-4.6/gcc/config/gnu-user.h
@@ -74,10 +74,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-#define GNU_USER_TARGET_LIB_SPEC \
- "%{pthread:-lpthread} \
- %{shared:-lc} \
+#define GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD \
+ "%{shared:-lc} \
%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
+#define GNU_USER_TARGET_LIB_SPEC \
+ "%{pthread:-lpthread} " \
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD
#undef LIB_SPEC
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
diff --git a/gcc-4.6/gcc/config/i386/linux.h b/gcc-4.6/gcc/config/i386/linux.h
index 57a8758aa..4bf4a45c9 100644
--- a/gcc-4.6/gcc/config/i386/linux.h
+++ b/gcc-4.6/gcc/config/i386/linux.h
@@ -142,7 +142,7 @@ along with GCC; see the file COPYING3. If not see
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
- GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.6/gcc/config/i386/linux64.h b/gcc-4.6/gcc/config/i386/linux64.h
index 96c839000..c72177818 100644
--- a/gcc-4.6/gcc/config/i386/linux64.h
+++ b/gcc-4.6/gcc/config/i386/linux64.h
@@ -103,7 +103,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
- GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.6/gcc/config/linux-android.h b/gcc-4.6/gcc/config/linux-android.h
index c6d9cddb9..c19b1c13d 100644
--- a/gcc-4.6/gcc/config/linux-android.h
+++ b/gcc-4.6/gcc/config/linux-android.h
@@ -53,8 +53,8 @@
"--noexecstack"
#define ANDROID_LIB_SPEC \
- "%{!static: -ldl}" \
- "%{pthread:-lc}"
+ "%{!static: -ldl} \
+ %{pthread: -lc}"
#define ANDROID_STARTFILE_SPEC \
"%{shared: crtbegin_so%O%s;:" \
diff --git a/gcc-4.6/gcc/config/mips/linux.h b/gcc-4.6/gcc/config/mips/linux.h
index 7a292bfd6..6104463c4 100644
--- a/gcc-4.6/gcc/config/mips/linux.h
+++ b/gcc-4.6/gcc/config/mips/linux.h
@@ -102,11 +102,13 @@ along with GCC; see the file COPYING3. If not see
#undef ASM_OUTPUT_REG_POP
#undef LINUX_SUBTARGET_LIB_SPEC
-#define LINUX_SUBTARGET_LIB_SPEC "\
-%{pthread:-lpthread} \
+#define LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD "\
%{shared:-lc} \
%{!shared: \
%{profile:-lc_p} %{!profile:-lc}}"
+#define LINUX_SUBTARGET_LIB_SPEC "\
+%{pthread:-lpthread} " \
+LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD
#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h"
@@ -168,7 +170,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (LINUX_SUBTARGET_LIB_SPEC, \
- LINUX_SUBTARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.7/gcc/config/arm/linux-eabi.h b/gcc-4.7/gcc/config/arm/linux-eabi.h
index ddeb627c9..9074c519f 100644
--- a/gcc-4.7/gcc/config/arm/linux-eabi.h
+++ b/gcc-4.7/gcc/config/arm/linux-eabi.h
@@ -87,7 +87,7 @@
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
- ANDROID_LIB_SPEC " " GNU_USER_TARGET_LIB_SPEC )
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.7/gcc/config/gnu-user.h b/gcc-4.7/gcc/config/gnu-user.h
index cb457490e..644a1a8a2 100644
--- a/gcc-4.7/gcc/config/gnu-user.h
+++ b/gcc-4.7/gcc/config/gnu-user.h
@@ -74,10 +74,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-#define GNU_USER_TARGET_LIB_SPEC \
- "%{pthread:-lpthread} \
- %{shared:-lc} \
+#define GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD \
+ "%{shared:-lc} \
%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
+#define GNU_USER_TARGET_LIB_SPEC \
+ "%{pthread:-lpthread} "\
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD
#undef LIB_SPEC
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
diff --git a/gcc-4.7/gcc/config/i386/gnu-user.h b/gcc-4.7/gcc/config/i386/gnu-user.h
index 12b00e164..ec45caa9a 100644
--- a/gcc-4.7/gcc/config/i386/gnu-user.h
+++ b/gcc-4.7/gcc/config/i386/gnu-user.h
@@ -127,7 +127,7 @@ along with GCC; see the file COPYING3. If not see
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
- GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.7/gcc/config/i386/gnu-user64.h b/gcc-4.7/gcc/config/i386/gnu-user64.h
index a389ebb6c..ed06b6afe 100644
--- a/gcc-4.7/gcc/config/i386/gnu-user64.h
+++ b/gcc-4.7/gcc/config/i386/gnu-user64.h
@@ -97,7 +97,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
- GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ GNU_USER_TARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc-4.7/gcc/config/linux-android.h b/gcc-4.7/gcc/config/linux-android.h
index c6d9cddb9..c19b1c13d 100644
--- a/gcc-4.7/gcc/config/linux-android.h
+++ b/gcc-4.7/gcc/config/linux-android.h
@@ -53,8 +53,8 @@
"--noexecstack"
#define ANDROID_LIB_SPEC \
- "%{!static: -ldl}" \
- "%{pthread:-lc}"
+ "%{!static: -ldl} \
+ %{pthread: -lc}"
#define ANDROID_STARTFILE_SPEC \
"%{shared: crtbegin_so%O%s;:" \
diff --git a/gcc-4.7/gcc/config/mips/gnu-user.h b/gcc-4.7/gcc/config/mips/gnu-user.h
index ebce0822f..33e7b51a9 100644
--- a/gcc-4.7/gcc/config/mips/gnu-user.h
+++ b/gcc-4.7/gcc/config/mips/gnu-user.h
@@ -93,11 +93,13 @@ along with GCC; see the file COPYING3. If not see
#undef ASM_OUTPUT_REG_POP
#undef LINUX_SUBTARGET_LIB_SPEC
-#define LINUX_SUBTARGET_LIB_SPEC "\
-%{pthread:-lpthread} \
+#define LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD "\
%{shared:-lc} \
%{!shared: \
%{profile:-lc_p} %{!profile:-lc}}"
+#define LINUX_SUBTARGET_LIB_SPEC "\
+%{pthread:-lpthread} " \
+LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD
#ifdef HAVE_AS_NO_SHARED
/* Default to -mno-shared for non-PIC. */
@@ -157,7 +159,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#undef LIB_SPEC
#define LIB_SPEC \
LINUX_OR_ANDROID_LD (LINUX_SUBTARGET_LIB_SPEC, \
- LINUX_SUBTARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+ LINUX_SUBTARGET_LIB_SPEC_LESS_PTHREAD " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \