From 6d4766c1b839d7eeb4cc0f15eef51d887848cbc4 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 1 Oct 2014 08:26:51 +0000 Subject: [PATCH] Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support the oabi is still in the tree, but it is expected this will be removed as developers work on surrounding code. With this commit the ARM EABI is the only supported supported ABI by FreeBSD on ARMa 32-bit processors. X-MFC after: never Relnotes: yes Differential Revision: https://reviews.freebsd.org/D876 --- Makefile.inc1 | 2 +- gnu/lib/csu/Makefile | 2 +- gnu/lib/libgcc/Makefile | 10 +++------- gnu/lib/libgcov/Makefile | 2 +- gnu/lib/libstdc++/Makefile | 5 +---- gnu/lib/libsupc++/Makefile | 5 +---- gnu/usr.bin/cc/Makefile.inc | 2 +- gnu/usr.bin/cc/cc_tools/Makefile | 4 +--- lib/clang/clang.build.mk | 3 +-- lib/libc/arm/Makefile.inc | 5 ----- lib/libc/arm/Symbol_oabi.map | 16 ---------------- lib/libc/arm/gen/Makefile.inc | 4 ---- lib/libc/quad/Makefile.inc | 2 +- lib/libcompiler_rt/Makefile | 5 ++--- lib/libstand/Makefile | 4 ---- libexec/rtld-elf/Makefile | 2 +- share/mk/src.opts.mk | 1 - sys/boot/arm/ixp425/boot2/Makefile | 2 -- sys/boot/libstand32/Makefile | 4 ---- sys/conf/Makefile.arm | 6 +----- sys/conf/kern.opts.mk | 1 - 21 files changed, 16 insertions(+), 71 deletions(-) delete mode 100644 lib/libc/arm/Symbol_oabi.map diff --git a/Makefile.inc1 b/Makefile.inc1 index 333c734d1cb..44fddf4464a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -336,7 +336,7 @@ XFLAGS+= -B${CROSS_BINUTILS_PREFIX} .else XFLAGS+= -B${WORLDTMP}/usr/bin .endif -.if ${TARGET} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET} == "arm" .if ${TARGET_ARCH:M*eb*} == "" TARGET_ABI= gnueabi .elif ${TARGET_ARCH} == "armv6hf" diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile index dee77dfe534..e1224ca5d9f 100644 --- a/gnu/lib/csu/Makefile +++ b/gnu/lib/csu/Makefile @@ -24,7 +24,7 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index 8480ef47507..4fd8b8d4514 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -15,7 +15,7 @@ MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif @@ -56,7 +56,7 @@ LIB2FUNCS+= _fixuns${mode}si .endfor # Likewise double-word routines. -.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no" +.if ${TARGET_CPUARCH} != "arm" # These are implemented in an ARM specific file but will not be filtered out .for mode in sf df xf tf LIB2FUNCS+= _fix${mode}di _fixuns${mode}di @@ -117,14 +117,10 @@ CFLAGS.clang+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func -.if ${MK_ARM_EABI} != "no" LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c # Some compilers generate __aeabi_ functions libgcc_s is missing DPADD+= ${LIBCOMPILER_RT} LDADD+= -lcompiler_rt -.else -LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c -.endif .endif .if ${TARGET_CPUARCH} == mips @@ -319,7 +315,7 @@ CLEANFILES += cs-*.h option* SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk SHLIB_MKMAP_OPTS = SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver .endif VERSION_MAP = libgcc.map diff --git a/gnu/lib/libgcov/Makefile b/gnu/lib/libgcov/Makefile index e2b80744cf5..7582720f53b 100644 --- a/gnu/lib/libgcov/Makefile +++ b/gnu/lib/libgcov/Makefile @@ -17,7 +17,7 @@ CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile index fa1d67e7ce6..98a08f41649 100644 --- a/gnu/lib/libstdc++/Makefile +++ b/gnu/lib/libstdc++/Makefile @@ -16,9 +16,6 @@ LIB= stdc++ SHLIB_MAJOR= 6 CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" -CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 -.endif CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood @@ -596,7 +593,7 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h CLEANFILES+= ${THRHDRS} -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile index c7cc30e5378..0531a73ae8f 100644 --- a/gnu/lib/libsupc++/Makefile +++ b/gnu/lib/libsupc++/Makefile @@ -22,9 +22,6 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \ SRCS+= cp-demangle.c CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" -CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 -.endif CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood @@ -35,7 +32,7 @@ HDRS= exception new typeinfo cxxabi.h exception_defines.h INCS= ${HDRS:S;^;${SRCDIR}/;} INCSDIR=${INCLUDEDIR}/c++/${GCCVER} -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index dc977997321..1d66b3dee7f 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -27,7 +27,7 @@ CSTD?= gnu89 CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE .endif -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index ae7f8b82d17..af731c13519 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -51,10 +51,8 @@ TARGET_INC+= ${GCC_CPU}/elf.h .endif .if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/aout.h -.if ${MK_ARM_EABI} != "no" TARGET_INC+= ${GCC_CPU}/bpabi.h .endif -.endif .if ${TARGET_ARCH} == "powerpc64" TARGET_INC+= ${GCC_CPU}/biarch64.h TARGET_INC+= ${GCC_CPU}/default64.h @@ -352,7 +350,7 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h GENSRCS+= gthr-default.h -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 3b30fe7b9d5..d9a057d989c 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -22,8 +22,7 @@ CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \ - ${MK_ARM_EABI} != "no" +.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") TARGET_ABI= gnueabi .elif ${TARGET_ARCH} == "armv6hf" TARGET_ABI= gnueabihf diff --git a/lib/libc/arm/Makefile.inc b/lib/libc/arm/Makefile.inc index 026bd0a86cc..923b4d0cb00 100644 --- a/lib/libc/arm/Makefile.inc +++ b/lib/libc/arm/Makefile.inc @@ -9,12 +9,7 @@ SOFTFLOAT_BITS=32 MDSRCS+=machdep_ldisd.c SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map -.if ${MK_ARM_EABI} == "no" -# This contains the symbols that were removed when moving to the ARM EABI -SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_oabi.map -.else .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" -.endif .if ${MACHINE_ARCH} == "armv6hf" SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map diff --git a/lib/libc/arm/Symbol_oabi.map b/lib/libc/arm/Symbol_oabi.map deleted file mode 100644 index 0c22e4a5827..00000000000 --- a/lib/libc/arm/Symbol_oabi.map +++ /dev/null @@ -1,16 +0,0 @@ -/* - * $FreeBSD$ - */ - -/* - * This only needs to contain symbols that are not listed in - * symbol maps from other parts of libc (i.e., not found in - * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...) - * and are not used in the ARM EABI. - */ -FBSDprivate_1.0 { - __umodsi3; - __modsi3; - __udivsi3; - __divsi3; -}; diff --git a/lib/libc/arm/gen/Makefile.inc b/lib/libc/arm/gen/Makefile.inc index 5fd52c2fd58..8efde09ff3e 100644 --- a/lib/libc/arm/gen/Makefile.inc +++ b/lib/libc/arm/gen/Makefile.inc @@ -6,10 +6,6 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c \ arm_initfini.c -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.endif - .if ${MACHINE_ARCH} == "armv6hf" SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ fpsetround_vfp.c fpsetsticky_vfp.c diff --git a/lib/libc/quad/Makefile.inc b/lib/libc/quad/Makefile.inc index 1b1ab60234a..94697faf2fd 100644 --- a/lib/libc/quad/Makefile.inc +++ b/lib/libc/quad/Makefile.inc @@ -8,7 +8,7 @@ SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c -.elif ${LIBC_ARCH} == "arm" && ${MK_ARM_EABI} != "no" +.elif ${LIBC_ARCH} == "arm" SRCS+= adddi3.c anddi3.c floatunsdidf.c iordi3.c lshldi3.c notdi2.c \ qdivrem.c subdi3.c xordi3.c diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index 91ce965739c..d29e2a2aceb 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -144,8 +144,7 @@ SRCF+= adddf3 \ truncdfsf2 .endif -.if ${MACHINE_CPUARCH} != "mips" && \ - (${MACHINE_CPUARCH} != "arm" || ${MK_ARM_EABI} != "no") +.if ${MACHINE_CPUARCH} != "mips" SRCF+= divsi3 \ modsi3 \ udivsi3 \ @@ -174,7 +173,7 @@ SRCS+= ${file}.c . endif .endfor -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" SRCS+= aeabi_idivmod.S \ aeabi_ldivmod.S \ aeabi_memcmp.S \ diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile index ebf5c300811..e57407fb409 100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile @@ -64,9 +64,6 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ .if ${MACHINE_CPUARCH} == "arm" .PATH: ${.CURDIR}/../libc/arm/gen -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.else # Compiler support functions .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/ # __clzsi2 and ctzsi2 for various builtin functions @@ -78,7 +75,6 @@ SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S -.endif .endif .if ${MACHINE_CPUARCH} == "powerpc" diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 67544512715..cc301328fb3 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -46,7 +46,7 @@ LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} LDADD= -lc_pic -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" # Some of the required math functions (div & mod) are implemented in # libcompiler_rt on ARM. The library also needs to be placed first to be # correctly linked. As some of the functions are used before we have diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index e6202b2f463..7ecc530fafb 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -48,7 +48,6 @@ __DEFAULT_YES_OPTIONS = \ ACPI \ AMD \ APM \ - ARM_EABI \ AT \ ATM \ AUDIT \ diff --git a/sys/boot/arm/ixp425/boot2/Makefile b/sys/boot/arm/ixp425/boot2/Makefile index 6fe515e0cfc..fe1068faefa 100644 --- a/sys/boot/arm/ixp425/boot2/Makefile +++ b/sys/boot/arm/ixp425/boot2/Makefile @@ -17,9 +17,7 @@ FILES=${P} SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:tl}_board.c SRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c SRCS+=strlen.c ashldi3.c divsi3.S muldi3.c -.if ${MK_ARM_EABI} != "no" SRCS+=aeabi_unwind.c -.endif MAN= KERNPHYSADDR=0x180000 diff --git a/sys/boot/libstand32/Makefile b/sys/boot/libstand32/Makefile index 39c8e4003d5..437fa3bbe4d 100644 --- a/sys/boot/libstand32/Makefile +++ b/sys/boot/libstand32/Makefile @@ -67,9 +67,6 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ .if ${MACHINE_CPUARCH} == "arm" .PATH: ${LIBC}/arm/gen -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.else # Compiler support functions .PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/ # __clzsi2 and ctzsi2 for various builtin functions @@ -81,7 +78,6 @@ SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c .PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S -.endif .endif .if ${MACHINE_CPUARCH} == "powerpc" diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index 67db55dd6fa..08e70f30a50 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -42,11 +42,7 @@ STRIP_FLAGS = -S # We don't support gcc's thump interwork stuff, so disable it CFLAGS.gcc += -mno-thumb-interwork -.if empty(DDB_ENABLED) -.if ${MK_ARM_EABI} == "no" -CFLAGS.gcc += -mno-apcs-frame -.endif -.elif ${MK_ARM_EABI} != "no" +.if !empty(DDB_ENABLED) CFLAGS += -funwind-tables # clang requires us to tell it to emit assembly with unwind information CFLAGS.clang += -mllvm -arm-enable-ehabi diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 31555cce53c..8c7a0baac5d 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -23,7 +23,6 @@ # src tree. __DEFAULT_YES_OPTIONS = \ - ARM_EABI \ BLUETOOTH \ CDDL \ CRYPT \