pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler mk/compiler/gcc.mk: move _GCC_LDFLAGS sett...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7e545bf260e4
branches:  trunk
changeset: 380885:7e545bf260e4
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu May 24 05:47:21 2018 +0000

description:
mk/compiler/gcc.mk: move _GCC_LDFLAGS setting for relro.

At the previous location it was overridden if a gcc from pkgsrc was used.

Problem found by bacon@

diffstat:

 mk/compiler/gcc.mk |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 33a0734bd4de -r 7e545bf260e4 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Thu May 24 04:14:41 2018 +0000
+++ b/mk/compiler/gcc.mk        Thu May 24 05:47:21 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.191 2018/05/23 10:17:58 jperkin Exp $
+# $NetBSD: gcc.mk,v 1.192 2018/05/24 05:47:21 wiz Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -378,11 +378,6 @@
 _RELRO_LDFLAGS=                -Wl,-z,relro -Wl,-z,now
 .endif
 
-.if ${_PKGSRC_USE_RELRO} == "yes"
-_GCC_LDFLAGS+=         ${_RELRO_LDFLAGS}
-CWRAPPERS_APPEND.ld+=  ${_RELRO_LDFLAGS}
-.endif
- 
 _STACK_CHECK_CFLAGS=   -fstack-check
 
 .if ${_PKGSRC_USE_STACK_CHECK} == "yes"
@@ -732,6 +727,11 @@
 .  endfor
 .endif
 
+.if ${_PKGSRC_USE_RELRO} == "yes"
+_GCC_LDFLAGS+=         ${_RELRO_LDFLAGS}
+CWRAPPERS_APPEND.ld+=  ${_RELRO_LDFLAGS}
+.endif
+ 
 LDFLAGS+=      ${_GCC_LDFLAGS}
 
 # Point the variables that specify the compiler to the installed



Home | Main Index | Thread Index | Old Index