Disable executable stack on Linux.
BUG=29824
TEST=
william@penguin:~/src/chromium2/src$ out/Debug/chrome --user-data-dir=/tmp/foo&
[2] 28679
william@penguin:~/src/chromium2/src$ cat /proc/28679/maps | grep stack
7fff3fc4d000-7fff3fc63000 rw-p 00000000 00:00 0                          [stack]
william@penguin:~/src/chromium2/src$ eu-readelf -l out/Debug/chrome | grep STACK GNU_STACK
0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW  0x8

eu-readelf shows that the GNU_STACK segment indicates the stack should be RW (no X for execute).
`cat/proc/{pid}/maps | grep stack` shows that the stack mapping is indeed RW (if the dynamic linker encounters a shared library that needs an executable stack, it will globally enable executable stacks.

Review URL: http://codereview.chromium.org/1555002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43150 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index 06e166d..6774034 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -730,7 +730,7 @@
           '-fvisibility-inlines-hidden',
         ],
         'ldflags': [
-          '-pthread',
+          '-pthread', '-Wl,-z,noexecstack',
         ],
         'scons_variable_settings': {
           'LIBPATH': ['$LIB_DIR'],