summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2015-07-26 22:13:17 +0000
committerkhorben <khorben@pkgsrc.org>2015-07-26 22:13:17 +0000
commit3098266ee9c6f169aeaa48359ab80d32a2150d59 (patch)
treed2a51992cf041582786d2ec545c7cb45584d560c /mk/compiler
parent6d02600cec5fee755bb72c3bf720d6408083ee58 (diff)
downloadpkgsrc-3098266ee9c6f169aeaa48359ab80d32a2150d59.tar.gz
Add support for compiling with stack-smashing protection
This is enabled with PKGSRC_USE_SSP in mk.conf(5), as documented there. Most NetBSD platforms are supported (when compiling with gcc). After consensus on tech-pkg@.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gcc.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 7e42b33eba3..3fb8532fd24 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.162 2015/07/16 12:09:04 ryoon Exp $
+# $NetBSD: gcc.mk,v 1.163 2015/07/26 22:13:17 khorben Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -67,7 +67,7 @@ _DEF_VARS.gcc= \
PKG_CC PKG_CPP PKG_CXX PKG_FC \
PKG_ADA PKG_GMK PKG_GLK PKG_GDB PKG_CHP PKG_GLK PKG_GNT PKG_PRP \
_CC _COMPILER_RPATH_FLAG _COMPILER_STRIP_VARS \
- _GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CC \
+ _GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CC _GCC_CFLAGS \
_GCC_CPP _GCC_CXX _GCC_DEPENDENCY _GCC_DEPENDS \
_GCC_FC _GCC_LDFLAGS _GCC_LIBDIRS _GCC_PKG \
_GCC_PKGBASE _GCC_PKGSRCDIR _GCC_PKG_SATISFIES_DEP \
@@ -348,6 +348,8 @@ CWRAPPERS_APPEND.cc+= -std=gnu99
CFLAGS+= -Wno-import
.endif
+CFLAGS+= ${_GCC_CFLAGS}
+
.if !empty(_NEED_GCC2:M[yY][eE][sS])
#
# We require gcc-2.x in the lang/gcc2 directory.