summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/Makefile.inc8
-rw-r--r--sys/conf/kmod.mk4
2 files changed, 11 insertions, 1 deletions
diff --git a/sys/boot/Makefile.inc b/sys/boot/Makefile.inc
index 17088d7..9c39953 100644
--- a/sys/boot/Makefile.inc
+++ b/sys/boot/Makefile.inc
@@ -1,11 +1,17 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SSP_CFLAGS=
.if ${MACHINE_CPUARCH} == "arm"
# Do not generate movt/movw, because the relocation fixup for them does not
# translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
# Also, the fpu is not available in a standalone environment.
-CFLAGS.clang+= -mllvm -arm-use-movt=0
+.if ${COMPILER_VERSION} < 30800
+CFLAGS.clang+= -mllvm -arm-use-movt=0
+.else
+CFLAGS.clang+= -mno-movt
+.endif
CFLAGS.clang+= -mfpu=none
.endif
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 2dead64..b5fa131 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -127,7 +127,11 @@ CFLAGS+= -fPIC
# Temporary workaround for PR 196407, which contains the fascinating details.
# Don't allow clang to use fpu instructions or registers in kernel modules.
.if ${MACHINE_CPUARCH} == arm
+.if ${COMPILER_VERSION} < 30800
CFLAGS.clang+= -mllvm -arm-use-movt=0
+.else
+CFLAGS.clang+= -mno-movt
+.endif
CFLAGS.clang+= -mfpu=none
CFLAGS+= -funwind-tables
.endif
OpenPOWER on IntegriCloud