Only use -fstack-protector-strong with supported compilers
This includes clang 3.5.0+, gcc 4.2.1, gcc 4.8.0+
This allows me to do subdirectory makes again on 10.2-RELEASE as it
comes with clang 3.4.1.
Differential D3924
Only use -fstack-protector-strong with supported compilers ngie on Oct 17 2015, 8:23 AM. Authored by Tags None Referenced Files
Details Only use -fstack-protector-strong with supported compilers This includes clang 3.5.0+, gcc 4.2.1, gcc 4.8.0+ This allows me to do subdirectory makes again on 10.2-RELEASE as it
Diff Detail
Event Timeline
Comment Actions The check looks wrong, people usually get gcc from the lang/gcc port, not lang/gcc48: % gcc48 --version % gcc48 -fstack-protector-strong Also, if this ever gets MFCed, people using clang 3.4.1 will lose all stack protection. Comment Actions ...
There are no plans to MFC any of this, but you are right: we should have an .else Comment Actions Why doesn't lang/gcc have all of the patches from lang/gcc48??? https://svnweb.freebsd.org/ports?view=revision&revision=357238
clang 3.4.1 doesn't have this option: [ngie@fbsd10 /usr/src]$ grep -r protector-strong contrib/llvm/ || echo not found not found [ngie@fbsd10 /usr/src]$ clang --version FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.2 Thread model: posix [ngie@fbsd10 /usr/src]$ svnversion 289467 Comment Actions There's a PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203751
bug clang 3.4.1 has -fstack-protector Comment Actions I'm changing the conditional to only enable itself with gcc versions 4.9+ to unbreak ports. [ngie@escher ~/svn/freebsd/src/tests/sys/pjdfstest/pjdfstest]$ env CC=clang37 make -V'CFLAGS:M-fstack-protector*' Comment Actions Only use -fstack-protector-strong on gcc 4.9+, because of lang/gcc doesn't have |