From: Pavel Chupin Date: Tue, 20 Aug 2013 08:31:40 +0000 (+0000) Subject: Fix LIB_SPEC for systems without libpthread. X-Git-Tag: releases/gcc-4.9.0~4512 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8edb8dc817480a2496c58727439a4c8254ff09eb;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 56e6fd416b29..0c7561ba9bb3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2013-08-20 Pavel Chupin + + 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 * 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 cb0aad19c344..c6e686bf7338 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 a83eb46600d2..6f6915842b9e 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 1e8bf6b2dc0f..52f0baf202ee 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 ca4ea0705a6c..ebc67a28d903 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 \