diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-01 16:23:49 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-01 16:23:49 +0000 |
commit | a68c29a04c1e5ba38cfd02c45872712dffdc3768 (patch) | |
tree | 26e492cd0622da60dccf17e9bc404f35e24b8a6c /build | |
parent | d5c555ac82fc32558991dfa941187776422d1bb9 (diff) | |
download | chromium_src-a68c29a04c1e5ba38cfd02c45872712dffdc3768.zip chromium_src-a68c29a04c1e5ba38cfd02c45872712dffdc3768.tar.gz chromium_src-a68c29a04c1e5ba38cfd02c45872712dffdc3768.tar.bz2 |
Use -fstack-protector-all (stack canaries) for Mac debug builds.
This was previously in effect at r29591 and then backed out at r29601 because
it may have caused problems with Valgrind. The Valgrind problems were probably
actually caused by -pie, which was recently reintroduced with protection
against being used in Valgrind configurations. I don't think that we have any
Valgrind builds that use the Debug configuration, so reintroducing this here
shouldn't have any effect on Valgrind.
Ancient history: in the pre-GYP days, we had -fstack-protector and
-fstack-protector-all in the debug.xcconfig that our Xcode-based build used.
See
http://src.chromium.org/viewvc/chrome/trunk/src/build/debug.xcconfig?view=markup&pathrev=21959
More information on this option:
http://developer.apple.com/library/mac/#documentation/DeveloperTools/gcc-4.2.1/gcc/Optimize-Options.html#index-fbtr_002dbb_002dexclusive-615
http://en.wikipedia.org/wiki/Buffer_overflow_protection#GCC_Stack-Smashing_Protector_.28ProPolice.29
BUG=16713 (not really, that's for release builds, but close enough)
TEST=everything
Review URL: http://codereview.chromium.org/7291019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi index 8fdcf69..768d9bc 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -975,7 +975,10 @@ 'xcode_settings': { 'COPY_PHASE_STRIP': 'NO', 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', - 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ], + 'OTHER_CFLAGS': [ + '-fstack-protector-all', # Implies -fstack-protector + '<@(debug_extra_cflags)', + ], }, 'msvs_settings': { 'VCCLCompilerTool': { |