config.gcc (hppa*64*-*-hpux11*): Check gnu_ld.
authorSteve Ellcey <sje@cup.hp.com>
Thu, 3 Oct 2002 21:46:59 +0000 (21:46 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 3 Oct 2002 21:46:59 +0000 (21:46 +0000)
* 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

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

index 0850ea3fd915b2bb184c3b0fe203b9add730d801..12697f7a23ce38dc4e549e79065e5a8388a90a9f 100644 (file)
@@ -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.
index 961dee16332470220a899b264546da020ed7d5eb..03958123c1beb78b3d35ac3ebf03e1854e15df77 100644 (file)
@@ -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
index a6dbcf1f939d1adc48f57ea0bca0292cb3163f75..e284210c96d45705229973c21e071a7c26c14fae 100644 (file)
@@ -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
index f62cd6e0c0d74d1e2c090c1d0cdd9ed4a75f51a6..2c2db6539a9459cf9530e683a399c755dcda1a2b 100644 (file)
@@ -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