From 7a0f848998067a61531b01699fa5d436670c0e36 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 12 Jan 2016 16:22:40 -0800 Subject: Align flags with make This pulls a number of cflag changes from make since our last sync. Change-Id: I8c77fc215ed7677b8ac15a6d39143b519068dd55 --- cc/arm64_device.go | 4 +++- cc/arm_device.go | 2 +- cc/clang.go | 1 - cc/mips64_device.go | 1 + cc/mips_device.go | 1 + cc/x86_64_device.go | 2 +- cc/x86_darwin_host.go | 1 + cc/x86_device.go | 2 +- cc/x86_linux_host.go | 1 + 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{ -- cgit v1.2.3