summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-12-31 18:29:24 +0000
committerian <ian@FreeBSD.org>2015-12-31 18:29:24 +0000
commit7781ba8bccd49aa41633fe9c52ee38d36e33fc93 (patch)
tree92e89b90bebdbcd7094c54aef52204d85fa2ea55 /lib
parenta4ab0640fd84773b6017ac880c415cfdc6cdd80f (diff)
downloadFreeBSD-src-7781ba8bccd49aa41633fe9c52ee38d36e33fc93.zip
FreeBSD-src-7781ba8bccd49aa41633fe9c52ee38d36e33fc93.tar.gz
When building libstand for arm, don't emit instructions that require
relocation fixups unsupported by the self_reloc() code, and don't optimize memcpy/memset using floating point registers, because in a standalone environment nothing has initialized the fpu hardware.
Diffstat (limited to 'lib')
-rw-r--r--lib/libstand/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index a69a935..3126c1c 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -44,6 +44,12 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
.if ${MACHINE_CPUARCH} == "arm"
.PATH: ${LIBC_SRC}/arm/gen
+# 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
+
# Compiler support functions
.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/
# __clzsi2 and ctzsi2 for various builtin functions
OpenPOWER on IntegriCloud