pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/compiler Limit GCC SSP support to 4.x and newer.
details: https://anonhg.NetBSD.org/pkgsrc/rev/880578b8dd94
branches: trunk
changeset: 368149:880578b8dd94
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Mon Sep 11 09:06:41 2017 +0000
description:
Limit GCC SSP support to 4.x and newer.
diffstat:
mk/compiler/gcc.mk | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r 966d58a51831 -r 880578b8dd94 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk Mon Sep 11 07:51:44 2017 +0000
+++ b/mk/compiler/gcc.mk Mon Sep 11 09:06:41 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.183 2017/08/25 01:43:17 khorben Exp $
+# $NetBSD: gcc.mk,v 1.184 2017/09/11 09:06:41 jperkin Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -372,12 +372,14 @@
.endif
# The user can choose the level of stack smashing protection.
-.if ${PKGSRC_USE_SSP} == "all"
+.if ${_GCC_VERSION:C/\..*$//} >= 4
+. if ${PKGSRC_USE_SSP} == "all"
_SSP_CFLAGS= -fstack-protector-all
-.elif ${PKGSRC_USE_SSP} == "strong"
+. elif ${PKGSRC_USE_SSP} == "strong"
_SSP_CFLAGS= -fstack-protector-strong
-.else
+. else
_SSP_CFLAGS= -fstack-protector
+. endif
.endif
_STACK_CHECK_CFLAGS= -fstack-check
Home |
Main Index |
Thread Index |
Old Index