Author: ngie Date: Sat Oct 17 19:48:17 2015 New Revision: 289465 URL: https://svnweb.freebsd.org/changeset/base/289465
Log: Only use -fstack-protector-strong with supported compilers This includes clang 3.5.0+, gcc 4.2.1, gcc 4.8.4+ This allows me to do subdirectory makes again after setting MAKESYSPATH on 10.2-RELEASE as it comes with clang 3.4.1. As a sidenote: this isn't technically correct for all vintages of gcc 4.2.1, but will be correct when gcc is rebuilt/reinstalled after r286074, so this version check should be good enough. X-MFC with: r288669 Differential Revision: https://reviews.freebsd.org/D3924 Reviewed by: emaste, pfg Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Oct 17 18:59:14 2015 (r289464) +++ head/share/mk/bsd.sys.mk Sat Oct 17 19:48:17 2015 (r289465) @@ -148,9 +148,13 @@ CXXFLAGS.clang+= -Wno-c++11-extensions .if ${MK_SSP} != "no" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ + (${COMPILER_TYPE} == "gcc" && \ + (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40800)) # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong CFLAGS+= ${SSP_CFLAGS} +.endif .endif # SSP && !ARM && !MIPS # Allow user-specified additional warning flags, plus compiler specific flag overrides. _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"