From: Steve Ellcey Date: Thu, 3 Oct 2002 21:46:59 +0000 (+0000) Subject: config.gcc (hppa*64*-*-hpux11*): Check gnu_ld. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83eb95f9959f82fdda7cc6184413acae7258407d;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0850ea3fd91..12697f7a23c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2002-10-03 Steve Ellcey + + * 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 * i386.c (athlon_cost): Fix the move costs. diff --git a/gcc/config.gcc b/gcc/config.gcc index 961dee16332..03958123c1b 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 a6dbcf1f939..e284210c96d 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 f62cd6e0c0d..2c2db6539a9 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