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 2015-01-02 03:20:13 +00:00
parent 07196d1c4a
commit 007999d737

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