aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/netbsd-elf.h
diff options
context:
space:
mode:
authorMatt Thomas <matt@3am-software.com>2019-06-14 14:04:20 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2019-06-14 14:04:20 +0000
commitb27c10823418d58d70274ee3a7378e1aca21d418 (patch)
tree3717efc4e50692f14aa03eb5c08936d0273cdb42 /gcc/config/netbsd-elf.h
parentcc28d23496b014ae413a03923404fd45b1ba5f28 (diff)
downloadgcc-b27c10823418d58d70274ee3a7378e1aca21d418.zip
gcc-b27c10823418d58d70274ee3a7378e1aca21d418.tar.gz
gcc-b27c10823418d58d70274ee3a7378e1aca21d418.tar.bz2
[NetBSD] Add support for the Arm EABI.
This is a roll-up of a set of changes needed to support the Arm EABI on NetBSD. 2019-06-14 Matt Thomas <matt@3am-software.com> Matthew Green <mrg@eterna.com.au> Nick Hudson <skrll@netbsd.org> Maya Rashish <coypu@sdf.org> Richard Earnshaw <rearnsha@arm.com> gcc: * config.gcc (arm*-*-netbsdelf*) Add support for EABI configuration. * config.host (arm*-*-netbsd*): Use driver-arm.o on native NetBSD. * config/arm/netbsd-eabi.h: New file. * config/arm/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Undefine before redefining. (SUBTARGET_EXTRA_ASM_SPEC): Don't pass -matpcs to the assembler. * config/netbsd-elf.h (NETBSD_LINK_LD_ELF_SO_SPEC): New define. (NETBSD_SUBTARGET_EXTRA_SPECS): New define. (SUBTARGET_EXTRA_SPECS): Define to NETBSD_SUBTARGET_EXTRA_SPECS. libatomic: * configure.tgt (arm*): Handle NetBSD in the same way as FreeBSD. libgcc: * config.host (arm*-*-netbsdelf*): Add support for EABI configurations. * config/arm/t-netbsd (LIB1ASMFUNCS): Add some additional assembler functions to build. * config/arm/t-netbsd-eabi: New file. Co-Authored-By: Matthew Green <mrg@eterna.com.au> Co-Authored-By: Maya Rashish <coypu@sdf.org> Co-Authored-By: Nick Hudson <skrll@netbsd.org> Co-Authored-By: Richard Earnshaw <rearnsha@arm.com> From-SVN: r272290
Diffstat (limited to 'gcc/config/netbsd-elf.h')
-rw-r--r--gcc/config/netbsd-elf.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config/netbsd-elf.h b/gcc/config/netbsd-elf.h
index e35758b..12ebdd6 100644
--- a/gcc/config/netbsd-elf.h
+++ b/gcc/config/netbsd-elf.h
@@ -73,6 +73,9 @@ along with GCC; see the file COPYING3. If not see
Target-specific code must provide the %(netbsd_entry_point) spec. */
+#define NETBSD_LINK_LD_ELF_SO_SPEC \
+ "%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}"
+
#define NETBSD_LINK_SPEC_ELF \
"%{assert*} %{R*} %{rpath*} \
%{shared:-shared} \
@@ -87,6 +90,17 @@ along with GCC; see the file COPYING3. If not see
-dynamic-linker /usr/libexec/ld.elf_so} \
%{static:-static}}"
+/* Provide the standard list of subtarget extra specs for NetBSD targets. */
+#define NETBSD_SUBTARGET_EXTRA_SPECS \
+ { "netbsd_link_ld_elf_so", NETBSD_LINK_LD_ELF_SO_SPEC }, \
+ { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \
+ { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \
+ { "netbsd_entry_point", NETBSD_ENTRY_POINT }, \
+ { "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC },
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS NETBSD_SUBTARGET_EXTRA_SPECS
+
/* Use --as-needed -lgcc_s for eh support. */
#ifdef HAVE_LD_AS_NEEDED
#define USE_LD_AS_NEEDED 1