Date: Sun, 18 Oct 2015 04:07:41 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289481 - head/share/mk Message-ID: <201510180407.t9I47f97009246@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sun Oct 18 04:07:40 2015 New Revision: 289481 URL: https://svnweb.freebsd.org/changeset/base/289481 Log: Only enable -fstack-protector-strong on gcc 4.9+ and default to -fstack-protector when -fstack-protector-strong is not available, like it was implicitly before r288669 As noted by antoine@, devel/gcc (which is 4.8.5) lacks -fstack-protector-strong support, whereas 4.8.4i (devel/gcc48) has the support. Until a version is available which has -fstack-protector-strong support, be conservative and only enable support with 4.9+. Reviewed by: pfg X-MFC with: r288669, r289465 Differential Revision: https://reviews.freebsd.org/D3924 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sun Oct 18 03:09:03 2015 (r289480) +++ head/share/mk/bsd.sys.mk Sun Oct 18 04:07:40 2015 (r289481) @@ -150,11 +150,13 @@ CXXFLAGS.clang+= -Wno-c++11-extensions ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" .if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ (${COMPILER_TYPE} == "gcc" && \ - (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40800)) + (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40900)) # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong -CFLAGS+= ${SSP_CFLAGS} +.else +SSP_CFLAGS?= -fstack-protector .endif +CFLAGS+= ${SSP_CFLAGS} .endif # SSP && !ARM && !MIPS # Allow user-specified additional warning flags, plus compiler specific flag overrides.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510180407.t9I47f97009246>