summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-11-06 10:03:32 +0000
committernia <nia@pkgsrc.org>2021-11-06 10:03:32 +0000
commitd929538a26b828a7984a5617bfb57f3efa8fe4e0 (patch)
treed50aa9ad1b1eb18e3823d92d3ad16a54e2556035 /mk/compiler
parent5c79190e37a207c8349552dd921d314b609521da (diff)
downloadpkgsrc-d929538a26b828a7984a5617bfb57f3efa8fe4e0.tar.gz
mk: Correct the wrappers invocation for RELRO. This should help many
remaining packages that fail to build with RELRO that were uncaught by my original bulk builds due to CHECK_RELRO failing to work (sorry...)
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/clang.mk5
-rw-r--r--mk/compiler/gcc.mk5
2 files changed, 6 insertions, 4 deletions
diff --git a/mk/compiler/clang.mk b/mk/compiler/clang.mk
index e6bcdce47a2..9edc2cdcd96 100644
--- a/mk/compiler/clang.mk
+++ b/mk/compiler/clang.mk
@@ -1,4 +1,4 @@
-# $NetBSD: clang.mk,v 1.29 2021/11/02 08:14:58 nia Exp $
+# $NetBSD: clang.mk,v 1.30 2021/11/06 10:03:32 nia Exp $
#
# This is the compiler definition for the clang compiler.
#
@@ -74,7 +74,8 @@ _SSP_CFLAGS= -fstack-protector
.if ${_PKGSRC_USE_RELRO} == "yes"
_CLANG_LDFLAGS+= ${_RELRO_LDFLAGS}
-CWRAPPERS_APPEND.ld+= ${_RELRO_LDFLAGS}
+CWRAPPERS_APPEND.cc+= ${_RELRO_LDFLAGS}
+CWRAPPERS_APPEND.cxx+= ${_RELRO_LDFLAGS}
.endif
LDFLAGS+= ${_CLANG_LDFLAGS}
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 14c0e8768a8..e255cdff8cb 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.230 2021/11/02 08:14:58 nia Exp $
+# $NetBSD: gcc.mk,v 1.231 2021/11/06 10:03:32 nia Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -650,7 +650,8 @@ _GCC_LDFLAGS+= -L${_dir_} ${COMPILER_RPATH_FLAG}${_dir_}
.if ${_PKGSRC_USE_RELRO} == "yes"
_GCC_LDFLAGS+= ${_RELRO_LDFLAGS}
-CWRAPPERS_APPEND.ld+= ${_RELRO_LDFLAGS}
+CWRAPPERS_APPEND.cc+= ${_RELRO_LDFLAGS}
+CWRAPPERS_APPEND.cxx+= ${_RELRO_LDFLAGS}
.endif
LDFLAGS+= ${_GCC_LDFLAGS}