aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-01-13 21:32:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-01-13 21:32:04 +0000
commita60cfde3f1da1015ba66bb0965079ded6913069d (patch)
treedd7ea33f060798153f8d68771cc993988b99c259
parent6ec1c7b9646a224bda029685e2db216fb1ae3952 (diff)
parent7a0f848998067a61531b01699fa5d436670c0e36 (diff)
downloadbuild_soong-a60cfde3f1da1015ba66bb0965079ded6913069d.tar.gz
build_soong-a60cfde3f1da1015ba66bb0965079ded6913069d.tar.bz2
build_soong-a60cfde3f1da1015ba66bb0965079ded6913069d.zip
Merge "Align flags with make"
-rw-r--r--cc/arm64_device.go4
-rw-r--r--cc/arm_device.go2
-rw-r--r--cc/clang.go1
-rw-r--r--cc/mips64_device.go1
-rw-r--r--cc/mips_device.go1
-rw-r--r--cc/x86_64_device.go2
-rw-r--r--cc/x86_darwin_host.go1
-rw-r--r--cc/x86_device.go2
-rw-r--r--cc/x86_linux_host.go1
9 files changed, 10 insertions, 5 deletions
diff --git a/cc/arm64_device.go b/cc/arm64_device.go
index 157b273e..c8614983 100644
--- a/cc/arm64_device.go
+++ b/cc/arm64_device.go
@@ -25,7 +25,7 @@ var (
"-fno-exceptions", // from build/core/combo/select.mk
"-Wno-multichar", // from build/core/combo/select.mk
"-fno-strict-aliasing",
- "-fstack-protector",
+ "-fstack-protector-strong",
"-ffunction-sections",
"-fdata-sections",
"-funwind-tables",
@@ -61,6 +61,8 @@ var (
"-Wl,-maarch64linux",
"-Wl,--hash-style=gnu",
"-Wl,--fix-cortex-a53-843419",
+ "-fuse-ld=gold",
+ "-Wl,--icf=safe",
"-Wl,--no-undefined-version",
// Disable transitive dependency library symbol resolving.
diff --git a/cc/arm_device.go b/cc/arm_device.go
index d44787d5..7212c4f4 100644
--- a/cc/arm_device.go
+++ b/cc/arm_device.go
@@ -33,7 +33,7 @@ var (
"-ffunction-sections",
"-fdata-sections",
"-funwind-tables",
- "-fstack-protector",
+ "-fstack-protector-strong",
"-Wa,--noexecstack",
"-Werror=format-security",
"-D_FORTIFY_SOURCE=2",
diff --git a/cc/clang.go b/cc/clang.go
index 67622474..6a01010d 100644
--- a/cc/clang.go
+++ b/cc/clang.go
@@ -41,7 +41,6 @@ var clangUnknownCflags = sorted([]string{
// arm + arm64
"-fno-align-jumps",
- "-Wa,--noexecstack",
// arm
"-mthumb-interwork",
diff --git a/cc/mips64_device.go b/cc/mips64_device.go
index a0e39a6c..8e433c6c 100644
--- a/cc/mips64_device.go
+++ b/cc/mips64_device.go
@@ -34,6 +34,7 @@ var (
"-ffunction-sections",
"-fdata-sections",
"-funwind-tables",
+ "-fstack-protector-strong",
"-Wa,--noexecstack",
"-Werror=format-security",
"-D_FORTIFY_SOURCE=2",
diff --git a/cc/mips_device.go b/cc/mips_device.go
index f668f225..d88c9060 100644
--- a/cc/mips_device.go
+++ b/cc/mips_device.go
@@ -34,6 +34,7 @@ var (
"-ffunction-sections",
"-fdata-sections",
"-funwind-tables",
+ "-fstack-protector-strong",
"-Wa,--noexecstack",
"-Werror=format-security",
"-D_FORTIFY_SOURCE=2",
diff --git a/cc/x86_64_device.go b/cc/x86_64_device.go
index 9c79d87b..4ae69716 100644
--- a/cc/x86_64_device.go
+++ b/cc/x86_64_device.go
@@ -36,7 +36,7 @@ var (
"-fstrict-aliasing",
"-funswitch-loops",
"-funwind-tables",
- "-fstack-protector",
+ "-fstack-protector-strong",
"-no-canonical-prefixes",
"-fno-canonical-system-headers",
diff --git a/cc/x86_darwin_host.go b/cc/x86_darwin_host.go
index e497e5c9..1bd3dd05 100644
--- a/cc/x86_darwin_host.go
+++ b/cc/x86_darwin_host.go
@@ -65,6 +65,7 @@ var (
darwinClangCflags = append([]string{
"-integrated-as",
+ "-fstack-protector-strong",
}, clangFilterUnknownCflags(darwinCflags)...)
darwinClangLdflags = clangFilterUnknownCflags(darwinLdflags)
diff --git a/cc/x86_device.go b/cc/x86_device.go
index e5a8f66e..f3a4b08b 100644
--- a/cc/x86_device.go
+++ b/cc/x86_device.go
@@ -36,7 +36,7 @@ var (
"-fstrict-aliasing",
"-funswitch-loops",
"-funwind-tables",
- "-fstack-protector",
+ "-fstack-protector-strong",
"-no-canonical-prefixes",
"-fno-canonical-system-headers",
diff --git a/cc/x86_linux_host.go b/cc/x86_linux_host.go
index 3bf9671a..d1a92f1d 100644
--- a/cc/x86_linux_host.go
+++ b/cc/x86_linux_host.go
@@ -69,6 +69,7 @@ var (
linuxClangCflags = append([]string{
"--gcc-toolchain=${linuxGccRoot}",
"--sysroot=${linuxGccRoot}/sysroot",
+ "-fstack-protector-strong",
}, clangFilterUnknownCflags(linuxCflags)...)
linuxClangLdflags = append([]string{