pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk mk: Make it possible for a package to fall back to ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/62233edaf477
branches: trunk
changeset: 768853:62233edaf477
user: nia <nia%pkgsrc.org@localhost>
date: Tue Nov 02 08:14:58 2021 +0000
description:
mk: Make it possible for a package to fall back to partial RELRO.
This helps certain X.Org modules.
diffstat:
mk/bsd.prefs.mk | 4 ++--
mk/compiler/clang.mk | 11 ++++++-----
mk/compiler/gcc.mk | 11 ++++++-----
3 files changed, 14 insertions(+), 12 deletions(-)
diffs (70 lines):
diff -r a890c86d1b80 -r 62233edaf477 mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk Tue Nov 02 06:17:36 2021 +0000
+++ b/mk/bsd.prefs.mk Tue Nov 02 08:14:58 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.409 2021/07/02 12:03:24 nia Exp $
+# $NetBSD: bsd.prefs.mk,v 1.410 2021/11/02 08:14:58 nia Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -749,7 +749,7 @@
#
_PKGSRC_USE_RELRO= no
.if ${PKGSRC_USE_RELRO:tl} != "no" && \
- ${RELRO_SUPPORTED:Uyes:tl} == "yes" && \
+ ${RELRO_SUPPORTED:Uyes:tl} != "no" && \
${_OPSYS_SUPPORTS_RELRO:Uno} == "yes"
_PKGSRC_USE_RELRO= yes
.endif
diff -r a890c86d1b80 -r 62233edaf477 mk/compiler/clang.mk
--- a/mk/compiler/clang.mk Tue Nov 02 06:17:36 2021 +0000
+++ b/mk/compiler/clang.mk Tue Nov 02 08:14:58 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: clang.mk,v 1.28 2021/10/04 14:21:21 nia Exp $
+# $NetBSD: clang.mk,v 1.29 2021/11/02 08:14:58 nia Exp $
#
# This is the compiler definition for the clang compiler.
#
@@ -55,11 +55,12 @@
_CTF_CFLAGS= -gdwarf-2
-# The user can choose the level of RELRO.
-.if ${PKGSRC_USE_RELRO} == "partial"
+# The user or package can choose the level of RELRO.
+.if ${PKGSRC_USE_RELRO} != "partial" && \
+ ${RELRO_SUPPORTED:Uyes:tl} != "partial"
+_RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow
+.else
_RELRO_LDFLAGS= -Wl,-zrelro
-.else
-_RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow
.endif
# The user can choose the level of stack smashing protection.
diff -r a890c86d1b80 -r 62233edaf477 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk Tue Nov 02 06:17:36 2021 +0000
+++ b/mk/compiler/gcc.mk Tue Nov 02 08:14:58 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.229 2021/10/08 16:35:57 nia Exp $
+# $NetBSD: gcc.mk,v 1.230 2021/11/02 08:14:58 nia Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -385,11 +385,12 @@
CWRAPPERS_APPEND.cc+= ${_FORTIFY_CFLAGS}
.endif
-# The user can choose the level of RELRO.
-.if ${PKGSRC_USE_RELRO} == "partial"
+# The user or package can choose the level of RELRO.
+.if ${PKGSRC_USE_RELRO} != "partial" && \
+ ${RELRO_SUPPORTED:Uyes:tl} != "partial"
+_RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow
+.else
_RELRO_LDFLAGS= -Wl,-zrelro
-.else
-_RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow
.endif
_STACK_CHECK_CFLAGS= -fstack-check
Home |
Main Index |
Thread Index |
Old Index