OSDN Git Service

* pa64-hpux.h (LIB_SPEC): Add "-lpthread" in shared links if "-mt" or
[pf3gnuchains/gcc-fork.git] / gcc / config / pa / pa64-hpux.h
index 167feae..ef1122d 100644 (file)
@@ -64,7 +64,8 @@ along with GCC; see the file COPYING3.  If not see
           %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
        -lgprof %{static:-a archive} %{static|mt|pthread:-lpthread} -lc\
-       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
+       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
+   %{shared:%{mt|pthread:-lpthread}}"
 #else
 #define LIB_SPEC \
   "%{!shared:\
@@ -75,7 +76,8 @@ along with GCC; see the file COPYING3.  If not see
           %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
        -lgprof %{static:-a archive} %{static|mt|pthread:-lpthread} -lc\
-       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
+       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
+   %{shared:%{mt|pthread:-lpthread}}"
 #endif
 
 /* The libgcc_stub.a and milli.a libraries need to come last.  */