gyp: do not force stack protector on Chrome OS

The Chrome OS builds already use -fstack-protector-strong. Adding
additional -fstack-protector arguments means that the last one seen on the
commandline is used. This has caused a regression in the stack-protector
features, so avoid stack-protector on Chrome OS.

BUG=chromium-os:38354
TEST=link build


Review URL: https://chromiumcodereview.appspot.com/12095046

git-svn-id: http://src.chromium.org/svn/trunk/src/build@180088 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
keescook@google.com 2013-02-01 05:47:17 +00:00
Родитель ff7d137f76
Коммит 1eca8b6a6e
1 изменённых файлов: 13 добавлений и 6 удалений

Просмотреть файл

@ -2402,18 +2402,25 @@
'conditions': [
['os_posix==1', {
'target_defaults': {
'cflags': [
# TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
# supports it.
'-fstack-protector',
'--param=ssp-buffer-size=4',
],
'ldflags': [
'-Wl,-z,now',
'-Wl,-z,relro',
],
},
}],
['os_posix==1 and chromeos==0', {
# Chrome OS enables -fstack-protector-strong via its build wrapper,
# and we want to avoid overriding this, so stack-protector is only
# enabled when not building on Chrome OS.
# TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
# supports it.
'target_defaults': {
'cflags': [
'-fstack-protector',
'--param=ssp-buffer-size=4',
],
},
}],
['os_posix==1 and OS!="mac" and OS!="ios"', {
'target_defaults': {
# Enable -Werror by default, but put it in a variable so it can