aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/kmod.mk
diff options
context:
space:
mode:
authorBrandon Bergren <bdragon@FreeBSD.org>2019-12-27 04:07:51 +0000
committerBrandon Bergren <bdragon@FreeBSD.org>2019-12-27 04:07:51 +0000
commitb1f8da38435573591f3a33c7c1243325017b741b (patch)
treeccf0b962b6e906af77577e0c9155ea2963244c81 /sys/conf/kmod.mk
parentadea0d6368dd6eb42b029ed35555ac5d7a664c2e (diff)
downloadsrc-b1f8da38435573591f3a33c7c1243325017b741b.tar.gz
src-b1f8da38435573591f3a33c7c1243325017b741b.zip
[PowerPC] Switch to PIC kernel modules on powerpc*
To improve reliability of kernel modules after the clang switch, switch to -fPIC when building for now. This bypasses some limitations to the way clang and LLD handle relocations, and is a more robustly tested compilation regime than the "static shared object" mode that we were previously attempting to convince the compiler stack to use. The kernel linker was recently augmented to be able to handle this mode. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D22798
Notes
Notes: svn path=/head/; revision=356114
Diffstat (limited to 'sys/conf/kmod.mk')
-rw-r--r--sys/conf/kmod.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 25db152aa001..521bd4f78ada 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -132,7 +132,8 @@ CFLAGS+= ${DEBUG_FLAGS}
CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
.endif
-.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
+.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \
+ ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+= -fPIC
.endif