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...)
This commit is contained in:
nia 2021-11-06 10:03:32 +00:00
parent 1ff8baede9
commit 0c613150f5
2 changed files with 6 additions and 4 deletions

View file

@ -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}

View file

@ -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}