From b54c389fbcd6f000e9fdf0ef87dd2df4992c8e1c Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Fri, 2 Jan 2015 03:20:13 +0000 Subject: 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 --- sys/conf/kmod.mk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/conf') diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index f97578fb6cae..3b1f3054acd3 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -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 -- cgit v1.3