Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Build PIC libs on MIPS and PPC64. While the normal ...



details:   https://anonhg.NetBSD.org/src/rev/d92bc9e855ea
branches:  trunk
changeset: 825504:d92bc9e855ea
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Jul 18 14:36:43 2017 +0000

description:
Build PIC libs on MIPS and PPC64. While the normal calling convention is
position-independent, real PIC defaults to Global Dynamic as TLS model,
while non-PIC and PIE code can use more restrictive models like Initial
Exec. This is most visible with the thread_local destructor code now
using TLS in libc as it would be clobbered by any other shared library
with TLS due to static offset assignment by ld.

diffstat:

 share/mk/bsd.own.mk |  19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diffs (34 lines):

diff -r 7fa5bbeedab4 -r d92bc9e855ea share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Tue Jul 18 14:34:19 2017 +0000
+++ b/share/mk/bsd.own.mk       Tue Jul 18 14:36:43 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.1010 2017/06/05 23:41:52 christos Exp $
+#      $NetBSD: bsd.own.mk,v 1.1011 2017/07/18 14:36:43 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -788,22 +788,9 @@
 MKGDB.ia64=    no
 
 #
-# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
-# not just shared libraries, so don't build the _pic version.
-#
-.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
-    ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
-MKPICLIB:=     no
-.endif
-
-.if !defined(COMMON_MACHINE_ARCH)
-# Native PowerPC64 ABI is PIC.
-MKPICLIB.powerpc64:=   no
-.endif
-
-#
 # On VAX using ELF, all objects are PIC, not just shared libraries,
-# so don't build the _pic version.
+# so don't build the _pic version. VAX has no native TLS support either,
+# so differences between TLS models are not relevant.
 #
 MKPICLIB.vax=  no
 



Home | Main Index | Thread Index | Old Index