diff options
author | Matt Thomas <matt@3am-software.com> | 2019-06-14 14:04:20 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2019-06-14 14:04:20 +0000 |
commit | b27c10823418d58d70274ee3a7378e1aca21d418 (patch) | |
tree | 3717efc4e50692f14aa03eb5c08936d0273cdb42 /libgcc | |
parent | cc28d23496b014ae413a03923404fd45b1ba5f28 (diff) | |
download | gcc-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 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 10 | ||||
-rw-r--r-- | libgcc/config.host | 11 | ||||
-rw-r--r-- | libgcc/config/arm/t-netbsd | 8 | ||||
-rw-r--r-- | libgcc/config/arm/t-netbsd-eabi | 18 |
4 files changed, 46 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index ed6f97e..959776d 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,13 @@ +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> + + * 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. + 2019-06-12 Dimitar Dimitrov <dimitar@dinux.eu> * config.host: Add PRU target. diff --git a/libgcc/config.host b/libgcc/config.host index 588fd7c..0574b4d 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -436,7 +436,16 @@ arm*-*-fuchsia*) unwind_header=config/arm/unwind-arm.h ;; arm*-*-netbsdelf*) - tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover" + tmake_file="$tmake_file arm/t-arm" + case ${host} in + arm*-*-netbsdelf-*eabi*) + tmake_file="${tmake_file} arm/t-netbsd-eabi" + unwind_header=config/arm/unwind-arm.h + ;; + *) + tmake_file="${tmake_file} arm/t-netbsd t-slibgcc-gld-nover" + ;; + esac ;; arm*-*-linux*) # ARM GNU/Linux with ELF tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm" diff --git a/libgcc/config/arm/t-netbsd b/libgcc/config/arm/t-netbsd index 95358f9..ea4d5de 100644 --- a/libgcc/config/arm/t-netbsd +++ b/libgcc/config/arm/t-netbsd @@ -1,3 +1,11 @@ +# This list is from t-elf, but with some things removed. +LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func \ + _call_via_rX _interwork_call_via_rX \ + _arm_fixunsdfsi _arm_fixunssfsi \ + _arm_floatdidf _arm_floatdisf _arm_floatundidf _arm_floatundisf \ + _lshrdi3 _ashrdi3 _ashldi3 \ + _clzsi2 _clzdi2 _ctzsi2 + # Just for these, we omit the frame pointer since it makes such a big # difference. It is then pointless adding debugging. HOST_LIBGCC2_CFLAGS += -fomit-frame-pointer diff --git a/libgcc/config/arm/t-netbsd-eabi b/libgcc/config/arm/t-netbsd-eabi new file mode 100644 index 0000000..ae08ea4 --- /dev/null +++ b/libgcc/config/arm/t-netbsd-eabi @@ -0,0 +1,18 @@ +# This list is from t-elf, but with lots removed. +LIB1ASMFUNCS += _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX \ + _clzsi2 _clzdi2 _ctzsi2 + +# Derived from t-bpabi +# Add the BPABI C functions. +LIB2ADD += $(srcdir)/config/arm/unaligned-funcs.c + +# Not using libgcc for EH. +LIB2ADDEH = + +# Add the BPABI names. +SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver + +# On ARM, specifying -fnon-call-exceptions will needlessly pull in +# the unwinder in simple programs which use 64-bit division. Omitting +# the option is safe. +LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions |