Module Name: src
Committed By: christos
Date: Sun Oct 8 15:03:50 UTC 2017
Modified Files:
src/share/mk: bsd.README bsd.own.mk
Log Message:
Add variables for static PIE
To generate a diff of this commit:
cvs rdiff -u -r1.362 -r1.363 src/share/mk/bsd.README
cvs rdiff -u -r1.1017 -r1.1018 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.README
diff -u src/share/mk/bsd.README:1.362 src/share/mk/bsd.README:1.363
--- src/share/mk/bsd.README:1.362 Sun May 21 11:28:42 2017
+++ src/share/mk/bsd.README Sun Oct 8 11:03:50 2017
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.362 2017/05/21 15:28:42 riastradh Exp $
+# $NetBSD: bsd.README,v 1.363 2017/10/08 15:03:50 christos Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -402,6 +402,10 @@ MKSTATICLIB If "no", don't build or inst
libraries.
Default: yes
+MKSTATICPIE Compile in support for static pie binaries. These binaries
+ use a special rcrt0.o/mcrt0.o that do the necessary relocations
+ Default: yes on platforms that support it.
+
MKSTRIPSYM If "yes", strip all local symbols from shared libraries;
the affect is equivalent to -x option of ld(1). If "no",
strip only temporary local symbols; the affect is equivalent
Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1017 src/share/mk/bsd.own.mk:1.1018
--- src/share/mk/bsd.own.mk:1.1017 Fri Oct 6 09:00:57 2017
+++ src/share/mk/bsd.own.mk Sun Oct 8 11:03:50 2017
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.1017 2017/10/06 13:00:57 tsutsui Exp $
+# $NetBSD: bsd.own.mk,v 1.1018 2017/10/08 15:03:50 christos Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -1017,6 +1017,12 @@ MKRELRO?= partial
MKRELRO?= no
.endif
+.if ${MACHINE_ARCH} == "x86_64"
+MKSTATICPIE?= yes
+.else
+MKSTATICPIE?= no
+.endif
+
#
# MK* options which default to "yes".
#