Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3111)

Unified Diff: build/common.gypi

Issue 8207010: Implement disable_pie for all executables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/chrome_exe.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 9963f45adc6a35d42de45243423560146fb14703..0e65a8f05f705d3ea8757cf39442b83e0485daa5 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -212,6 +212,10 @@
# libraries on linux x86-64 and arm, plus ASLR.
'linux_fpic%': 1,
+ # Default to enabled PIE; this is important for ASLR but we need to be
+ # able to turn it off for remote debugging on Chromium OS
+ 'disable_pie%': 0,
+
# Enable navigator.registerProtocolHandler and supporting UI.
'enable_register_protocol_handler%': 1,
@@ -354,6 +358,7 @@
'use_x11%': '<(use_x11)',
'use_gnome_keyring%': '<(use_gnome_keyring)',
'linux_fpic%': '<(linux_fpic)',
+ 'disable_pie%': '<(disable_pie)',
Nico 2011/10/07 22:53:25 It looks like this is not conditionally set. Can't
rkc 2011/10/07 23:23:28 Done.
'enable_flapper_hacks%': '<(enable_flapper_hacks)',
'chromeos%': '<(chromeos)',
'touchui%': '<(touchui)',
@@ -1754,6 +1759,20 @@
'-fPIC',
],
}],
+ # TODO(rkc): Currently building Chrome with the PIE flag causes
+ # remote debugging to break (remote debugger does not get correct
+ # section header offsets hence causing all symbol handling to go
+ # kaboom). See crosbug.com/15266
+ # Remove this flag once this issue is fixed.
+ ['disable_pie==1', {
Nico 2011/10/07 22:53:25 since this is linux only, should this be called li
rkc 2011/10/07 23:23:28 Done.
+ 'target_conditions': [
+ ['_type=="executable"', {
+ 'ldflags': [
+ '-nopie',
+ ],
+ }],
+ ],
+ }],
['sysroot!=""', {
'target_conditions': [
['_toolset=="target"', {
« no previous file with comments | « no previous file | chrome/chrome_exe.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698