Stop clang from generating movt/movw sequences. These don't get relocated

so will access data from an unrelocated address. This is only needed for
self relocating code on ARMv7, however this is true for both ubldr and
loader.efi, the only two loaders we support on ARMv7.

While here also force the fpu to be none as is done in libstand.

Sponsored by:	ABT Systems Ltd
This commit is contained in:
Andrew Turner 2016-02-09 00:15:41 +00:00
parent aeffd7b7ea
commit 214d450501
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295421

View File

@ -1,3 +1,11 @@
# $FreeBSD$
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
CFLAGS.clang+= -mfpu=none
.endif