aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2002-10-03 21:46:59 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2002-10-03 21:46:59 +0000
commit83eb95f9959f82fdda7cc6184413acae7258407d (patch)
tree924cd4f67b2951627185f8d97a8d40d018970084
parentb72b1c298b49fad325e93e125b011c8a55780262 (diff)
downloadgcc-83eb95f9959f82fdda7cc6184413acae7258407d.zip
gcc-83eb95f9959f82fdda7cc6184413acae7258407d.tar.gz
gcc-83eb95f9959f82fdda7cc6184413acae7258407d.tar.bz2
config.gcc (hppa*64*-*-hpux11*): Check gnu_ld.
* config.gcc (hppa*64*-*-hpux11*): Check gnu_ld. * config/pa/pa.h (MASK_GNU_LD): New. (TARGET_GNU_LD): New. (TARGET_SWITCHES): New gnu-ld & no-gnu-ld flags. * config/pa/pa64-hpux.h (LINK_SPEC): Set based on gnu-ld and MASK_GNU_LD. From-SVN: r57792
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config.gcc4
-rw-r--r--gcc/config/pa/pa.h6
-rw-r--r--gcc/config/pa/pa64-hpux.h18
4 files changed, 36 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0850ea3..12697f7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2002-10-03 Steve Ellcey <sje@cup.hp.com>
+
+ * config.gcc (hppa*64*-*-hpux11*): Check gnu_ld.
+ * config/pa/pa.h (MASK_GNU_LD): New.
+ (TARGET_GNU_LD): New.
+ * config/pa/pa64-hpux.h (LINK_SPEC): Set based
+ on gnu-ld and MASK_GNU_LD.
+ (SUBTARGET_SWITCHES): New gnu-ld & hp-ld flags.
+
Thu Oct 3 23:35:51 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.c (athlon_cost): Fix the move costs.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 961dee1..0395812 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -871,6 +871,10 @@ hppa*64*-*-hpux11*)
xmake_file="pa/x-ada"
target_cpu_default="(MASK_PA_11|MASK_PA_20|MASK_GAS)"
+ if test x$gnu_ld = xyes
+ then
+ target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
+ fi
# if [ x$enable_threads = x ]; then
# enable_threads=$have_pthread_h
# fi
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index a6dbcf1..e284210 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -146,6 +146,12 @@ extern int target_flags;
#define MASK_SIO 8192
#define TARGET_SIO (target_flags & MASK_SIO)
+/* Assume GNU linker by default. */
+#define MASK_GNU_LD 16384
+#ifndef TARGET_GNU_LD
+#define TARGET_GNU_LD (target_flags & MASK_GNU_LD)
+#endif
+
#ifndef TARGET_PA_10
#define TARGET_PA_10 (target_flags & (MASK_PA_11 | MASK_PA_20) == 0)
#endif
diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index f62cd6e..2c2db65 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -19,11 +19,27 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "sio", MASK_SIO, \
+ N_("Generate cpp defines for server IO") }, \
+ { "wsio", -MASK_SIO, \
+ N_("Generate cpp defines for workstation IO") }, \
+ {"gnu-ld", MASK_GNU_LD, \
+ N_("Assume code will be linked by GNU ld") }, \
+ {"hp-ld", -MASK_GNU_LD, \
+ N_("Assume code will be linked by HP ld") },
+
/* 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) & MASK_GNU_LD)
+#define LINK_SPEC \
+ "-E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}} %{mhp-ld:+Accept TypeMismatch}"
+#else
#define LINK_SPEC \
- "-E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-shared}"
+ "-E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}} %{!mgnu-ld:+Accept TypeMismatch}"
+#endif
/* Like the default, except no -lg. */
#undef LIB_SPEC