pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Thu May 18 08:14:08 UTC 2017

Modified Files:
        pkgsrc/mk: compiler.mk
        pkgsrc/mk/compiler: clang.mk gcc.mk

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


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 pkgsrc/mk/compiler.mk
cvs rdiff -u -r1.16 -r1.17 pkgsrc/mk/compiler/clang.mk
cvs rdiff -u -r1.177 -r1.178 pkgsrc/mk/compiler/gcc.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/compiler.mk
diff -u pkgsrc/mk/compiler.mk:1.84 pkgsrc/mk/compiler.mk:1.85
--- pkgsrc/mk/compiler.mk:1.84  Wed May  3 08:34:23 2017
+++ pkgsrc/mk/compiler.mk       Thu May 18 08:14:08 2017
@@ -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.cxx+=    ${_COMPILER_ABI_
 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.
 #

Index: pkgsrc/mk/compiler/clang.mk
diff -u pkgsrc/mk/compiler/clang.mk:1.16 pkgsrc/mk/compiler/clang.mk:1.17
--- pkgsrc/mk/compiler/clang.mk:1.16    Thu May 18 01:29:55 2017
+++ pkgsrc/mk/compiler/clang.mk Thu May 18 08:14:08 2017
@@ -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-all
 _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.
 #

Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.177 pkgsrc/mk/compiler/gcc.mk:1.178
--- pkgsrc/mk/compiler/gcc.mk:1.177     Thu May  4 18:44:12 2017
+++ pkgsrc/mk/compiler/gcc.mk   Thu May 18 08:14:08 2017
@@ -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-strong
 _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