linux.h (LIB_SPEC): If -pthread, add -lpthread even if -shared.
authorJakub Jelinek <jakub@redhat.com>
Tue, 10 Dec 2002 10:55:32 +0000 (11:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 10 Dec 2002 10:55:32 +0000 (11:55 +0100)
* config/linux.h (LIB_SPEC): If -pthread, add -lpthread even if
-shared.
* config/alpha/linux-elf.h (LIB_SPEC): Likewise.
* config/alpha/linux.h (LIB_SPEC): Likewise.
* config/arm/linux-elf.h (LIB_SPEC): Likewise.
* config/pa/pa-linux.h (LIB_SPEC): Likewise.
* config/sparc/linux.h (LIB_SPEC): Likewise.
* config/sparc/linux64.h (LIB_SPEC): Likewise.

From-SVN: r59992

gcc/ChangeLog
gcc/config/alpha/linux-elf.h
gcc/config/alpha/linux.h
gcc/config/arm/linux-elf.h
gcc/config/linux.h
gcc/config/pa/pa-linux.h
gcc/config/sparc/linux.h
gcc/config/sparc/linux64.h

index e5f9ed5e78d453fccf7a967bf710ef90dafe6ac2..91f44af8ec1674e7ae26db41b8da037e460bdde6 100644 (file)
@@ -1,3 +1,14 @@
+2002-12-10  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/linux.h (LIB_SPEC): If -pthread, add -lpthread even if
+       -shared.
+       * config/alpha/linux-elf.h (LIB_SPEC): Likewise.
+       * config/alpha/linux.h (LIB_SPEC): Likewise.
+       * config/arm/linux-elf.h (LIB_SPEC): Likewise.
+       * config/pa/pa-linux.h (LIB_SPEC): Likewise.
+       * config/sparc/linux.h (LIB_SPEC): Likewise.
+       * config/sparc/linux64.h (LIB_SPEC): Likewise.
+
 2002-12-09  Larin Hennessy  <larin@science.oregonstate.edu>
 
        * doc/invoke.texi: Document UltraSparc III option.
index 506a103df5f609ce60468be03c652b80ae6b7a7a..49f518137e166155760570392404ac54aaeb7c38 100644 (file)
@@ -45,5 +45,5 @@ Boston, MA 02111-1307, USA.  */
 #ifndef USE_GNULIBC_1
 #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}} "
 #endif
index 461bd0e764eeb2a64325f9197555260f458a26c3..28ff3208422f441b5160391902a2e3a2e3d0af18 100644 (file)
@@ -37,9 +37,9 @@ Boston, MA 02111-1307, USA.  */
 
 #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}}"
 
 /* Show that we need a GP when profiling.  */
 #undef TARGET_PROFILING_NEEDS_GP
index 792ea7362657d5dafa1ebb1b7176fbb74707fdc9..c6d14e769f1aaac58443f341144f91b96aae0b1e 100644 (file)
@@ -48,9 +48,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Now we define the strings used to build the spec file.  */
 #define LIB_SPEC \
-  "%{shared: -lc} \
-   %{!shared: %{pthread:-lpthread} \
-   %{profile:-lc_p} %{!profile: -lc}}"
+  "%{pthread:-lpthread} \
+   %{shared:-lc} \
+   %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
 
 #define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
 
index 5b7311c169746ad45db6fcf1c3bacce1889c7c32..2b1e50f3bde163a79e2cda56c51a7baec4b9dc78 100644 (file)
@@ -93,9 +93,9 @@ Boston, MA 02111-1307, USA.  */
      %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
 #else
 #define LIB_SPEC \
-  "%{shared: -lc} \
-   %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
-       %{profile:-lc_p} %{!profile: -lc}}"
+  "%{pthread:-lpthread} \
+   %{shared:-lc} \
+   %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
 #endif
 #else
 #define LIB_SPEC \
index 5b3c7045165e8443097aa53894cfc915e3e3e260..495046e762b7555d016df5dd915476b426c3d96d 100644 (file)
@@ -71,9 +71,9 @@ Boston, MA 02111-1307, USA.  */
 
 #undef LIB_SPEC
 #define LIB_SPEC \
-  "%{shared: -lgcc -lc} \
-   %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
-       %{shared-libgcc: -lgcc} %{profile:-lc_p} %{!profile: -lc}}"
+  "%{pthread:-lpthread} \
+   %{shared:-lgcc -lc} \
+   %{!shared:%{mieee-fp:-lieee} %{shared-libgcc:-lgcc} %{profile:-lc_p}%{!profile:-lc}}"
 
 #undef ASM_SPEC
 #define ASM_SPEC \
index dcf79e858bbb43ac56ba339cb057eed98888d385..ea16b7eed5dd9c68c23e56b05df2f7304d950ffc 100644 (file)
@@ -123,9 +123,9 @@ Boston, MA 02111-1307, USA.  */
      %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
 #else
 #define LIB_SPEC \
-  "%{shared: -lc} \
-   %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
-     %{profile:-lc_p} %{!profile: -lc}}"
+  "%{pthread:-lpthread} \
+   %{shared:-lc} \
+   %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
 #endif
 #else
 #define LIB_SPEC \
index eb81eb61401c3934908fa4b530429ecbc2b3bb9d..8fd3a1ff0df6ef8e4c82f23ce208018b11a36273 100644 (file)
@@ -124,9 +124,9 @@ Boston, MA 02111-1307, USA.  */
 
 #undef LIB_SPEC
 #define LIB_SPEC \
-  "%{shared: -lc} \
-   %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
-     %{profile:-lc_p} %{!profile: -lc}}"
+  "%{pthread:-lpthread} \
+   %{shared:-lc} \
+   %{!shared: %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
 
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to