pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Consolidate setting of SSP flags now that multiple ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a6e338e99088
branches:  trunk
changeset: 362574:a6e338e99088
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu May 18 08:14:08 2017 +0000

description:
Consolidate setting of SSP flags now that multiple compilers support it.

diffstat:

 mk/compiler.mk       |  12 +++++++++++-
 mk/compiler/clang.mk |  10 +---------
 mk/compiler/gcc.mk   |  10 +---------
 3 files changed, 13 insertions(+), 19 deletions(-)

diffs (74 lines):

diff -r 2e72a658cdd3 -r a6e338e99088 mk/compiler.mk
--- a/mk/compiler.mk    Thu May 18 07:55:18 2017 +0000
+++ b/mk/compiler.mk    Thu May 18 08:14:08 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.84 2017/05/03 08:34:23 jperkin Exp $
+# $NetBSD: compiler.mk,v 1.85 2017/05/18 08:14:08 jperkin Exp $
 #
 # This Makefile fragment implements handling for supported C/C++/Fortran
 # compilers.
@@ -184,6 +184,16 @@
 CWRAPPERS_PREPEND.f77+=        ${_COMPILER_ABI_FLAG.${ABI}}
 .endif
 
+# Enable SSP if the user has chosen to and the compiler supports it.
+#
+.if ${_PKGSRC_USE_SSP} == "yes" && defined(_SSP_CFLAGS)
+_WRAP_EXTRA_ARGS.CC+=  ${_SSP_CFLAGS}
+_WRAP_EXTRA_ARGS.CXX+= ${_SSP_CFLAGS}
+CWRAPPERS_APPEND.cc+=  ${_SSP_CFLAGS}
+CWRAPPERS_APPEND.cxx+= ${_SSP_CFLAGS}
+CWRAPPERS_APPEND.f77+= ${_SSP_CFLAGS}
+.endif
+
 # If the languages are not requested, force them not to be available
 # in the generated wrappers.
 #
diff -r 2e72a658cdd3 -r a6e338e99088 mk/compiler/clang.mk
--- a/mk/compiler/clang.mk      Thu May 18 07:55:18 2017 +0000
+++ b/mk/compiler/clang.mk      Thu May 18 08:14:08 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: clang.mk,v 1.16 2017/05/18 01:29:55 khorben Exp $
+# $NetBSD: clang.mk,v 1.17 2017/05/18 08:14:08 jperkin Exp $
 #
 # This is the compiler definition for the clang compiler.
 #
@@ -60,14 +60,6 @@
 _SSP_CFLAGS=           -fstack-protector
 .endif
 
-.if ${_PKGSRC_USE_SSP} == "yes"
-_WRAP_EXTRA_ARGS.CC+=  ${_SSP_CFLAGS}
-_WRAP_EXTRA_ARGS.CXX+= ${_SSP_CFLAGS}
-CWRAPPERS_APPEND.cc+=  ${_SSP_CFLAGS}
-CWRAPPERS_APPEND.cxx+= ${_SSP_CFLAGS}
-CWRAPPERS_APPEND.f77+= ${_SSP_CFLAGS}
-.endif
-
 # _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
 # ones requested by the package in USE_LANGUAGES.
 #
diff -r 2e72a658cdd3 -r a6e338e99088 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Thu May 18 07:55:18 2017 +0000
+++ b/mk/compiler/gcc.mk        Thu May 18 08:14:08 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.177 2017/05/04 18:44:12 joerg Exp $
+# $NetBSD: gcc.mk,v 1.178 2017/05/18 08:14:08 jperkin Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -372,14 +372,6 @@
 _SSP_CFLAGS=           -fstack-protector
 .endif
 
-.if ${_PKGSRC_USE_SSP} == "yes"
-_WRAP_EXTRA_ARGS.CC+=  ${_SSP_CFLAGS}
-_WRAP_EXTRA_ARGS.CXX+= ${_SSP_CFLAGS}
-CWRAPPERS_APPEND.cc+=  ${_SSP_CFLAGS}
-CWRAPPERS_APPEND.cxx+= ${_SSP_CFLAGS}
-CWRAPPERS_APPEND.f77+= ${_SSP_CFLAGS}
-.endif
-
 # GCC has this annoying behaviour where it advocates in a multi-line
 # banner the use of "#include" over "#import" when including headers.
 # This generates a huge number of warnings when building practically all



Home | Main Index | Thread Index | Old Index