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.
This commit is contained in:
Ian Lepore 2015-12-31 18:29:24 +00:00
parent dd876af4de
commit 1256437c72
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=292993

View File

@ -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