aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2008-09-01 17:56:38 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2008-09-01 17:56:38 +0000
commit4b738718614de4af7939844cf3232ac0b9a7b0e4 (patch)
treeb111ad73b21cf9cc6333f76f8413d99735774a53 /gcc/config/pa
parent89ceba31285f7e09da8d74d730467a9ca68a8c6b (diff)
downloadgcc-4b738718614de4af7939844cf3232ac0b9a7b0e4.zip
gcc-4b738718614de4af7939844cf3232ac0b9a7b0e4.tar.gz
gcc-4b738718614de4af7939844cf3232ac0b9a7b0e4.tar.bz2
pa64-hpux.h (LIB_SPEC): Link against librt when building static openmp applications.
* pa64-hpux.h (LIB_SPEC): Link against librt when building static openmp applications. * pa-hpux11.h (LIB_SPEC): Likewise. From-SVN: r139870
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa-hpux11.h5
-rw-r--r--gcc/config/pa/pa64-hpux.h22
2 files changed, 19 insertions, 8 deletions
diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h
index ae9e4d3..8d4a807 100644
--- a/gcc/config/pa/pa-hpux11.h
+++ b/gcc/config/pa/pa-hpux11.h
@@ -122,8 +122,9 @@ along with GCC; see the file COPYING3. If not see
#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
diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index ef1122d..bad5b41 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -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:\
- %{!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}}\
- -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}}\
- -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:\
- %{!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}}\
- -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}}\
- -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