Put in a workaround for bug 196407 (arm modules cause crashes & panics).

When we started compiling the kernel with -march=armv7 the compiler
started emitting new types of relocation info which are incompatible with
the shared-lib file format used by .ko modules.  This workaround prevents
the compiler from emitting the instruction sequences that require the
new relocs.  This amounts to using an undocumented internal compiler
flag, so this is just a temporary workaround while we look for a good fix.

PR:		196407
This commit is contained in:
Ian Lepore 2015-01-02 03:20:13 +00:00
parent bc5438c566
commit b54c389fbc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276525

View File

@ -118,6 +118,11 @@ CFLAGS+= ${DEBUG_FLAGS}
CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
.endif
# Temporary workaround for PR 196407, which contains the fascinating details.
.if ${MACHINE_CPUARCH} == arm
CFLAGS.clang+= -mllvm -arm-use-movt=0
.endif
.if ${MACHINE_CPUARCH} == powerpc
CFLAGS+= -mlongcall -fno-omit-frame-pointer
.endif