Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2019 04:07:51 +0000 (UTC)
From:      Brandon Bergren <bdragon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356114 - head/sys/conf
Message-ID:  <201912270407.xBR47pE1054765@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdragon
Date: Fri Dec 27 04:07:51 2019
New Revision: 356114
URL: https://svnweb.freebsd.org/changeset/base/356114

Log:
  [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

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Fri Dec 27 04:07:03 2019	(r356113)
+++ head/sys/conf/kmod.mk	Fri Dec 27 04:07:51 2019	(r356114)
@@ -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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912270407.xBR47pE1054765>