Module Name:    src
Committed By:   joerg
Date:           Tue Jul 18 14:36:43 UTC 2017

Modified Files:
        src/share/mk: bsd.own.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.1010 -r1.1011 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1010 src/share/mk/bsd.own.mk:1.1011
--- src/share/mk/bsd.own.mk:1.1010	Mon Jun  5 23:41:52 2017
+++ src/share/mk/bsd.own.mk	Tue Jul 18 14:36:43 2017
@@ -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 @@ MKLINT.ia64=	no
 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
 

Reply via email to