diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-15 22:53:00 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-15 22:53:00 +0000 |
commit | 2859dea80dff803a6b24e0de9151ea6b57ef4224 (patch) | |
tree | e83b0cf95b36e63187769edd17e9db00e6ac9ce7 /chrome/chrome_exe.gypi | |
parent | 6faf1083ba454f1a0e4d2fb563a7e4f5c30e453f (diff) | |
download | chromium_src-2859dea80dff803a6b24e0de9151ea6b57ef4224.zip chromium_src-2859dea80dff803a6b24e0de9151ea6b57ef4224.tar.gz chromium_src-2859dea80dff803a6b24e0de9151ea6b57ef4224.tar.bz2 |
linux: enable PIE (ASLR) for chrome executable
I had been concerned that this wouldn't work with our -fPIC
bits we build internally, but the difference is actually a
performance once, not a correctness one.
(Retry of r85286, with ARM disabled.)
BUG=57908
Review URL: http://codereview.chromium.org/6973032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_exe.gypi')
-rw-r--r-- | chrome/chrome_exe.gypi | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index a2f0a49..d71cf37 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -194,11 +194,20 @@ ], }, ], - # TODO(rkc): Remove this once we have a fix for remote gdb - # and are able to correctly get section header offsets for - # pie executables. Currently -pie breaks remote debugging. + # TODO(rkc): Remove disable_pie (and instead always use + # -pie) once we have a fix for remote gdb and are able to + # correctly get section header offsets for pie + # executables. Currently -pie breaks remote debugging. ['disable_pie==1', { - 'ldflags' : ['-nopie'], + 'ldflags': ['-nopie'], + }, { + # If pie hasn't been explicitly disabled, enable it for all + # non-ARM platforms. + 'conditions': [ + ['target_arch!="arm"', { + 'ldflags': ['-pie'], + }], + ], }], ['use_system_xdg_utils==0', { 'copies': [ |