From a3e944f9a050733b71b294f4df37b98e5d9e59cc Mon Sep 17 00:00:00 2001 From: Jason Thorpe Date: Sat, 8 Jun 2002 06:38:02 +0000 Subject: [PATCH] netbsd-elf.h (LINK_SPEC): Define as NETBSD_LINK_SPEC_ELF. * config/i386/netbsd-elf.h (LINK_SPEC): Define as NETBSD_LINK_SPEC_ELF. (SUBTARGET_EXTRA_SPECS): Add netbsd_entry_point. (NETBSD_ENTRY_POINT): Define. * config/i386/netbsd64.h (LINK_SPEC): Use %(netbsd_link_spec). (SUBTARGET_EXTRA_SPECS): Add netbsd_link_spec and netbsd_entry_point. (NETBSD_ENTRY_POINT): Define. From-SVN: r54362 --- gcc/ChangeLog | 11 +++++++++++ gcc/config/i386/netbsd-elf.h | 29 ++++++++++++----------------- gcc/config/i386/netbsd64.h | 35 ++++++++++++++++------------------- 3 files changed, 39 insertions(+), 36 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8623babd4ae..0bfcc66c826 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2002-06-08 Jason Thorpe + + * config/i386/netbsd-elf.h (LINK_SPEC): Define as + NETBSD_LINK_SPEC_ELF. + (SUBTARGET_EXTRA_SPECS): Add netbsd_entry_point. + (NETBSD_ENTRY_POINT): Define. + * config/i386/netbsd64.h (LINK_SPEC): Use %(netbsd_link_spec). + (SUBTARGET_EXTRA_SPECS): Add netbsd_link_spec and + netbsd_entry_point. + (NETBSD_ENTRY_POINT): Define. + 2002-06-08 Jason Thorpe * config/alpha/netbsd.h (SUBTARGET_EXTRA_SPECS): Add diff --git a/gcc/config/i386/netbsd-elf.h b/gcc/config/i386/netbsd-elf.h index 3a2ab8bcd2d..a1591f732f1 100644 --- a/gcc/config/i386/netbsd-elf.h +++ b/gcc/config/i386/netbsd-elf.h @@ -27,27 +27,22 @@ Boston, MA 02111-1307, USA. */ } \ while (0) -/* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target. - This is a copy of LINK_SPEC from tweaked for - the i386 target. */ -#undef LINK_SPEC -#define LINK_SPEC \ - "%{assert*} %{R*} \ - %{shared:-shared} \ - %{!shared: \ - -dc -dp \ - %{!nostdlib: \ - %{!r*: \ - %{!e*:-e __start}}} \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ - %{static:-static}}" +/* Extra specs needed for NetBSD/i386 ELF. */ #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ - { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, + { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ + { "netbsd_entry_point", NETBSD_ENTRY_POINT }, + + +/* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target. */ + +#undef LINK_SPEC +#define LINK_SPEC NETBSD_LINK_SPEC_ELF + +#define NETBSD_ENTRY_POINT "__start" + /* Provide a CPP_SPEC appropriate for NetBSD. */ diff --git a/gcc/config/i386/netbsd64.h b/gcc/config/i386/netbsd64.h index bd0c607f83d..89050bc540b 100644 --- a/gcc/config/i386/netbsd64.h +++ b/gcc/config/i386/netbsd64.h @@ -29,29 +29,26 @@ Boston, MA 02111-1307, USA. */ } \ while (0) -/* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target. - This is a copy of LINK_SPEC from tweaked for - the x86-64 target. */ -#undef LINK_SPEC -#define LINK_SPEC \ - "%{!m32:-m elf_x86_64} \ - %{m32:-m elf_i386} \ - %{assert*} %{R*} \ - %{shared:-shared} \ - %{!shared: \ - -dc -dp \ - %{!nostdlib: \ - %{!r*: \ - %{!e*:-e _start}}} \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ - %{static:-static}}" +/* Extra specs needed for NetBSD/x86-64 ELF. */ #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ - { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, + { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ + { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ + { "netbsd_entry_point", NETBSD_ENTRY_POINT }, + + +/* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target. */ + +#undef LINK_SPEC +#define LINK_SPEC \ + "%{m32:-m elf_i386} \ + %{m64:-m elf_x86_64} \ + %(netbsd_link_spec)" + +#define NETBSD_ENTRY_POINT "_start" + /* Provide a CPP_SPEC appropriate for NetBSD. */ -- 2.30.2