diff options
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/arm/linux-eabi.h | 2 | ||||
-rw-r--r-- | gcc/config/gnu-user.h | 10 | ||||
-rw-r--r-- | gcc/config/i386/linux-common.h | 2 | ||||
-rw-r--r-- | gcc/config/mips/linux-common.h | 2 |
5 files changed, 20 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 56e6fd416b2..0c7561ba9bb 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 cb0aad19c34..c6e686bf733 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 a83eb46600d..6f6915842b9 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 1e8bf6b2dc0..52f0baf202e 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 ca4ea0705a6..ebc67a28d90 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 \ |