aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2003-05-21 22:00:58 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2003-05-21 22:00:58 +0000
commitf48758e4ee440a8866485fad7c63f4f2f2e1dbb0 (patch)
treefa47d879a76304b6366e8da00594921f81626821 /gcc/config/pa
parent7a29f483cf7f68eedb4ac1f308b083bf3300cf56 (diff)
downloadgcc-f48758e4ee440a8866485fad7c63f4f2f2e1dbb0.zip
gcc-f48758e4ee440a8866485fad7c63f4f2f2e1dbb0.tar.gz
gcc-f48758e4ee440a8866485fad7c63f4f2f2e1dbb0.tar.bz2
re PR target/6428 ([hppa*-hp-hpux] gmon.out is not generated when application to be profiled is linked with shared libgcc)
PR target/6428 * pa-hpux10.h (LINK_SPEC, LIB_SPEC): Move -L options for profiling directories from LIB_SPEC to LINK_SPEC. Emit warning if `-p' or `-pg' option is used without `-static'. * pa-hpux11.h (LINK_SPEC, LIB_SPEC): Likewise. * pa64-hpux.h (LINK_SPEC, LIB_SPEC): Likewise. * g++.old-deja/g++.law/profile1.C (dg-options): Add -static to options for hppa*-hp-hpux*. * gcc.dg/20021014-1.c (dg-options): Likewise. * gcc.dg/nest.c (dg-options): Likewise. From-SVN: r67068
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa-hpux10.h27
-rw-r--r--gcc/config/pa/pa-hpux11.h26
-rw-r--r--gcc/config/pa/pa64-hpux.h24
3 files changed, 57 insertions, 20 deletions
diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h
index 9cd7c1b..1c89598 100644
--- a/gcc/config/pa/pa-hpux10.h
+++ b/gcc/config/pa/pa-hpux10.h
@@ -69,12 +69,27 @@ Boston, MA 02111-1307, USA. */
/* We can debug dynamically linked executables on hpux9; we also want
dereferencing of a NULL pointer to cause a SEGV. */
#undef LINK_SPEC
-#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
+#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
#define LINK_SPEC \
- "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
+ "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}\
+ %{!shared:%{p:-L/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{!shared:%{pg:-L/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ -z %{mlinker-opt:-O} %{!shared:-u main}\
+ %{static:-a archive} %{shared:-b}"
#else
#define LINK_SPEC \
- "-z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
+ "%{!shared:%{p:-L/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{!shared:%{pg:-L/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ -z %{mlinker-opt:-O} %{!shared:-u main}\
+ %{static:-a archive} %{shared:-b}"
#endif
/* Like the default, except no -lg. */
@@ -84,10 +99,8 @@ Boston, MA 02111-1307, USA. */
%{!p:%{!pg:\
%{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
%{threads:-lcma -lc_r}}}\
- %{p: -L/lib/libp/ -lc\
- %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
- %{pg: -L/lib/libp/ -lc\
- %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
+ %{p:%{!pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
+ %{pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
#undef THREAD_MODEL_SPEC
#define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}"
diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h
index b567c98..a1dbf20 100644
--- a/gcc/config/pa/pa-hpux11.h
+++ b/gcc/config/pa/pa-hpux11.h
@@ -70,14 +70,26 @@ Boston, MA 02111-1307, USA. */
/* We can debug dynamically linked executables on hpux11; we also
want dereferencing of a NULL pointer to cause a SEGV. */
#undef LINK_SPEC
-#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1)
+#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
#define LINK_SPEC \
- "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z\
- %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
+ "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}\
+ %{!shared:%{p:-L/lib/libp -L/usr/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{!shared:%{pg:-L/lib/libp -L/usr/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ -z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
%{static:-a archive} %{shared:-b}"
#else
#define LINK_SPEC \
- "-z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
+ "%{!shared:%{p:-L/lib/libp -L/usr/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{!shared:%{pg:-L/lib/libp -L/usr/lib/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ -z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
%{static:-a archive} %{shared:-b}"
#endif
@@ -88,10 +100,8 @@ Boston, MA 02111-1307, USA. */
%{!p:%{!pg:\
%{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
%{threads:-lcma -lc_r}}}\
- %{p: -L/lib/libp/ -lc\
- %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
- %{pg: -L/lib/libp/ -lc\
- %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
+ %{p:%{!pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
+ %{pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
/* Under hpux11, the normal location of the `ld' and `as' programs is the
/usr/ccs/bin directory. */
diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index eca868c..9a00a21 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -37,10 +37,24 @@ Boston, MA 02111-1307, USA. */
#undef LINK_SPEC
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD)
#define LINK_SPEC \
- "%{mhp-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}}"
+ "%{!shared:%{p:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{mhp-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main}\
+ %{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}}"
#else
#define LINK_SPEC \
- "%{!mgnu-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}}"
+ "%{!shared:%{p:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
+ %nWarning: consider linking with `-static' as system libraries with\n\
+ %n profiling support are only provided in archive format}}}\
+ %{!mgnu-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main}\
+ %{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}}"
#endif
/* Like the default, except no -lg. */
@@ -48,9 +62,9 @@ Boston, MA 02111-1307, USA. */
#define LIB_SPEC \
"%{!shared:\
%{!p:%{!pg: -lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
- %{pg: -L/usr/lib/pa20_64/libp/ -lgprof -lc\
- %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
- %{p: -L/usr/lib/pa20_64/libp/ -lprof -lc\
+ %{p:%{!pg:-lprof -lc\
+ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
+ %{pg:-lgprof -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
/usr/lib/pa20_64/milli.a"