summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2019-10-24 18:46:20 +0000
committerchristos <christos@NetBSD.org>2019-10-24 18:46:20 +0000
commite2f7c08f0578d0ae84cf134504945cb2749e9fcc (patch)
tree5150c6ad8f9f27d82c95e0f09d7b589f8841fc76 /compat
parent7b38ef3daf23a1f352e55f2e77a1ca50b371cce1 (diff)
1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and
bsd.own.mk also adds it for gcc only (so we end up with 2 -marm for gcc). Just add -marm unconditionally in bsd.own.mk in ARM_APCS_FLAGS and remove it from everywhere else. 2. gcc-8 now warns about thumb internetwork in APCS mode. This does not make sense because the documentation says that this flag does not make a difference in apcs mode, but might produce larger code in non-APCS mode. So we just add it to silence the warnings.
Diffstat (limited to 'compat')
-rw-r--r--compat/arm/oabi/bsd.oabi.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/compat/arm/oabi/bsd.oabi.mk b/compat/arm/oabi/bsd.oabi.mk
index e5659e156dd..92b41aed540 100644
--- a/compat/arm/oabi/bsd.oabi.mk
+++ b/compat/arm/oabi/bsd.oabi.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.oabi.mk,v 1.4 2015/06/24 22:20:24 matt Exp $
+# $NetBSD: bsd.oabi.mk,v 1.5 2019/10/24 18:46:20 christos Exp $
.if !defined(MLIBDIR)
MLIBDIR= oabi
@@ -11,6 +11,7 @@ ARM_LD= -m armelf_nbsd
LDFLAGS+= -Wl,-m,armelf_nbsd
COPTS+= -mcpu=cortex-a53
ARM_APCS_FLAGS= ${${ACTIVE_CC} == "clang":? -target arm--netbsdelf -B ${TOOLDIR}/aarch64--netbsd/bin :} -mabi=apcs-gnu -mfloat-abi=soft
+ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :}
.elif !empty(MACHINE_ARCH:M*eb)
ARM_MACHINE_ARCH= armeb
ARM_LD= -m armelfb_nbsd