aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Chupin <pavel.v.chupin@intel.com>2013-08-20 08:31:40 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2013-08-20 08:31:40 +0000
commit8edb8dc817480a2496c58727439a4c8254ff09eb (patch)
tree99eb61036f5a0bc6b7b7389bd4c7af34d3264d53
parentd71ff3faa157470cb3425c7009ccddc335919ab3 (diff)
downloadgcc-8edb8dc817480a2496c58727439a4c8254ff09eb.zip
gcc-8edb8dc817480a2496c58727439a4c8254ff09eb.tar.gz
gcc-8edb8dc817480a2496c58727439a4c8254ff09eb.tar.bz2
Fix LIB_SPEC for systems without libpthread.
* config/gnu-user.h: Introduce GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC. * config/arm/linux-eabi.h: Use GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC for Android. * config/i386/linux-common.h: Likewise. * config/mips/linux-common.h: Likewise. From-SVN: r201871
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/arm/linux-eabi.h2
-rw-r--r--gcc/config/gnu-user.h10
-rw-r--r--gcc/config/i386/linux-common.h2
-rw-r--r--gcc/config/mips/linux-common.h2
5 files changed, 20 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 56e6fd4..0c7561b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2013-08-20 Pavel Chupin <pavel.v.chupin@intel.com>
+
+ Fix LIB_SPEC for systems without libpthread.
+
+ * config/gnu-user.h: Introduce GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC.
+ * config/arm/linux-eabi.h: Use GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC
+ for Android.
+ * config/i386/linux-common.h: Likewise.
+ * config/mips/linux-common.h: Likewise.
+
2013-08-20 Zhouyi Zhou <yizhouzhou@ict.ac.cn>
* tree-ssa-ccp.c (get_default_value): Remove redundant condition
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index cb0aad1..c6e686b 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -99,7 +99,7 @@
#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_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index a83eb46..6f69158 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -82,10 +82,14 @@ 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_NO_PTHREADS_LIB_SPEC \
+ "%{shared:-lc} \
%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
+
+#define GNU_USER_TARGET_LIB_SPEC \
+ "%{pthread:-lpthread} " \
+ GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC
+
#undef LIB_SPEC
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h
index 1e8bf6b..52f0baf 100644
--- a/gcc/config/i386/linux-common.h
+++ b/gcc/config/i386/linux-common.h
@@ -40,7 +40,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_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h
index ca4ea07..ebc67a2 100644
--- a/gcc/config/mips/linux-common.h
+++ b/gcc/config/mips/linux-common.h
@@ -44,7 +44,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_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \