diff options
author | Steve Ellcey <sje@cup.hp.com> | 2002-10-03 21:46:59 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2002-10-03 21:46:59 +0000 |
commit | 83eb95f9959f82fdda7cc6184413acae7258407d (patch) | |
tree | 924cd4f67b2951627185f8d97a8d40d018970084 /gcc/config | |
parent | b72b1c298b49fad325e93e125b011c8a55780262 (diff) | |
download | gcc-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
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/pa/pa.h | 6 | ||||
-rw-r--r-- | gcc/config/pa/pa64-hpux.h | 18 |
2 files changed, 23 insertions, 1 deletions
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 |