Page MenuHomeFreeBSD

D5257.1795273676.diff
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

D5257.1795273676.diff

Index: lib/libstand/Makefile
===================================================================
--- lib/libstand/Makefile
+++ lib/libstand/Makefile
@@ -49,8 +49,7 @@
# 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
-CFLAGS.clang+= -mfpu=none
+CFLAGS.clang+= ${CLANG_ARM_STANDALONE}
# Compiler support functions
.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/
Index: share/mk/bsd.sys.mk
===================================================================
--- share/mk/bsd.sys.mk
+++ share/mk/bsd.sys.mk
@@ -139,6 +139,14 @@
.else
CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false
.endif
+.if ${MACHINE_CPUARCH} == "arm"
+.if ${COMPILER_VERSION} < 30800
+CLANG_ARM_STANDALONE= -mllvm -arm-use-movt=0
+.else
+CLANG_ARM_STANDALONE= -mno-movt
+.endif
+CLANG_ARM_STANDALONE+= -mfpu=none
+.endif
CFLAGS.clang+= -Qunused-arguments
.if ${MACHINE_CPUARCH} == "sparc64"
# Don't emit .cfi directives, since we must use GNU as on sparc64, for now.
Index: sys/boot/Makefile.inc
===================================================================
--- sys/boot/Makefile.inc
+++ sys/boot/Makefile.inc
@@ -6,6 +6,5 @@
# 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
-CFLAGS.clang+= -mfpu=none
+CFLAGS.clang+= ${CLANG_ARM_STANDALONE}
.endif
Index: sys/conf/kmod.mk
===================================================================
--- sys/conf/kmod.mk
+++ sys/conf/kmod.mk
@@ -127,8 +127,7 @@
# 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
-CFLAGS.clang+= -mllvm -arm-use-movt=0
-CFLAGS.clang+= -mfpu=none
+CFLAGS.clang+= ${CLANG_ARM_STANDALONE}
CFLAGS+= -funwind-tables
.endif

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 21, 3:07 PM (52 m, 10 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41891238
Default Alt Text
D5257.1795273676.diff (2 KB)

Event Timeline