summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/i386/netbsd-elf.h29
-rw-r--r--gcc/config/i386/netbsd64.h35
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,5 +1,16 @@
2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
+ * 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 <thorpej@wasabisystems.com>
+
* config/alpha/netbsd.h (SUBTARGET_EXTRA_SPECS): Add
netbsd_link_spec and netbsd_entry_point.
(LINK_SPEC): Use %(netbsd_link_spec).
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 <netbsd-elf.h> 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 <netbsd-elf.h> 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. */