From 3098266ee9c6f169aeaa48359ab80d32a2150d59 Mon Sep 17 00:00:00 2001 From: khorben Date: Sun, 26 Jul 2015 22:13:17 +0000 Subject: 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@. --- mk/compiler/gcc.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mk/compiler') 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. -- cgit v1.2.3