OSDN Git Service

* pa64-hpux.h (LIB_SPEC): Link against librt when building static
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Sep 2008 17:56:38 +0000 (17:56 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Sep 2008 17:56:38 +0000 (17:56 +0000)
openmp applications.
* pa-hpux11.h (LIB_SPEC): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139870 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/pa/pa-hpux11.h
gcc/config/pa/pa64-hpux.h

index ec456c0..43bb844 100644 (file)
@@ -1,5 +1,9 @@
 2008-09-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
 2008-09-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
+       * pa64-hpux.h (LIB_SPEC): Link against librt when building static
+       openmp applications.
+       * pa-hpux11.h (LIB_SPEC): Likewise.
+
        * ira.c (setup_eliminable_regset): Only declare i if ELIMINABLE_REGS is
        defined.
 
        * ira.c (setup_eliminable_regset): Only declare i if ELIMINABLE_REGS is
        defined.
 
index ae9e4d3..8d4a807 100644 (file)
@@ -122,8 +122,9 @@ along with GCC; see the file COPYING3.  If not see
 #undef LIB_SPEC
 #define LIB_SPEC \
   "%{!shared:\
 #undef LIB_SPEC
 #define LIB_SPEC \
   "%{!shared:\
-     %{mt|pthread:-lpthread} -lc \
-     %{static:%{!nolibdld:-a shared -ldld -a archive -lpthread -lc}}}\
+     %{static|mt|pthread:%{fopenmp:%{static:-a archive_shared} -lrt\
+       %{static:-a archive}} -lpthread} -lc\
+     %{static:%{!nolibdld:-a archive_shared -ldld -a archive -lc}}}\
    %{shared:%{mt|pthread:-lpthread}}"
 
 #undef STARTFILE_SPEC
    %{shared:%{mt|pthread:-lpthread}}"
 
 #undef STARTFILE_SPEC
index ef1122d..bad5b41 100644 (file)
@@ -57,25 +57,35 @@ along with GCC; see the file COPYING3.  If not see
 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD)
 #define LIB_SPEC \
   "%{!shared:\
 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD)
 #define LIB_SPEC \
   "%{!shared:\
-     %{!p:%{!pg: %{static|mt|pthread:-lpthread} -lc\
+     %{!p:%{!pg:%{static|mt|pthread:%{fopenmp:%{static:-a shared} -lrt\
+                 %{static:-a archive}} -lpthread} -lc\
            %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
            %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
-          -lprof %{static:-a archive} %{static|mt|pthread:-lpthread} -lc\
+          -lprof %{static:-a archive}\
+          %{static|mt|pthread:%{fopenmp:%{static:-a shared} -lrt\
+            %{static:-a archive}} -lpthread} -lc\
           %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
           %{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\
+       -lgprof %{static:-a archive}\
+       %{static|mt|pthread:%{fopenmp:%{static:-a shared} -lrt\
+        %{static:-a archive}} -lpthread} -lc\
        %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
    %{shared:%{mt|pthread:-lpthread}}"
 #else
 #define LIB_SPEC \
   "%{!shared:\
        %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
    %{shared:%{mt|pthread:-lpthread}}"
 #else
 #define LIB_SPEC \
   "%{!shared:\
-     %{!p:%{!pg: %{static|mt|pthread:-lpthread} -lc\
+     %{!p:%{!pg:%{static|mt|pthread:%{fopenmp:%{static:-a shared} -lrt\
+                 %{static:-a archive}} -lpthread} -lc\
            %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
            %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
-          -lprof %{static:-a archive} %{static|mt|pthread:-lpthread} -lc\
+          -lprof %{static:-a archive}\
+          %{static|mt|pthread:%{fopenmp:%{static:-a shared} -lrt\
+            %{static:-a archive}} -lpthread} -lc\
           %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
      %{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
           %{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\
+       -lgprof %{static:-a archive}\
+       %{static|mt|pthread:%{fopenmp:%{static:-a shared} -lrt\
+        %{static:-a archive}} -lpthread} -lc\
        %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
    %{shared:%{mt|pthread:-lpthread}}"
 #endif
        %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
    %{shared:%{mt|pthread:-lpthread}}"
 #endif