diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-03-03 17:22:39 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-03-03 17:22:39 -0800 |
commit | f534a1064375782f4f09e8a9f1b848b8ac531cae (patch) | |
tree | d2de523df7e06b708f6e83b001de06529ec00c38 /cc | |
parent | be03f346b35e1e5ce5c74f57614dc26bf5f2dc4e (diff) | |
download | build_soong-f534a1064375782f4f09e8a9f1b848b8ac531cae.tar.gz build_soong-f534a1064375782f4f09e8a9f1b848b8ac531cae.tar.bz2 build_soong-f534a1064375782f4f09e8a9f1b848b8ac531cae.zip |
Reorder extra clang host flags
In make these clang-specific flags are marked as EXTRA and added after
the common flags.
This was causing differences between compiled objects in make and soong
because -fstack-protector-strong was before -fstack-protector in soong
instead of after.
Change-Id: I59dd6dcfdaf5ec9184a09e79efe80b62cfe48dbb
Diffstat (limited to 'cc')
-rw-r--r-- | cc/x86_darwin_host.go | 4 | ||||
-rw-r--r-- | cc/x86_linux_host.go | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/cc/x86_darwin_host.go b/cc/x86_darwin_host.go index 1bd3dd05..7f4c4890 100644 --- a/cc/x86_darwin_host.go +++ b/cc/x86_darwin_host.go @@ -63,10 +63,10 @@ var ( "-Wl,-rpath,@loader_path/lib64", } - darwinClangCflags = append([]string{ + darwinClangCflags = append(clangFilterUnknownCflags(darwinCflags), []string{ "-integrated-as", "-fstack-protector-strong", - }, clangFilterUnknownCflags(darwinCflags)...) + }...) darwinClangLdflags = clangFilterUnknownCflags(darwinLdflags) diff --git a/cc/x86_linux_host.go b/cc/x86_linux_host.go index d1a92f1d..528d2a72 100644 --- a/cc/x86_linux_host.go +++ b/cc/x86_linux_host.go @@ -66,28 +66,28 @@ var ( `-Wl,-rpath,\$$ORIGIN/lib64`, } - linuxClangCflags = append([]string{ + linuxClangCflags = append(clangFilterUnknownCflags(linuxCflags), []string{ "--gcc-toolchain=${linuxGccRoot}", "--sysroot=${linuxGccRoot}/sysroot", "-fstack-protector-strong", - }, clangFilterUnknownCflags(linuxCflags)...) + }...) - linuxClangLdflags = append([]string{ + linuxClangLdflags = append(clangFilterUnknownCflags(linuxLdflags), []string{ "--gcc-toolchain=${linuxGccRoot}", "--sysroot=${linuxGccRoot}/sysroot", - }, clangFilterUnknownCflags(linuxLdflags)...) + }...) - linuxX86ClangLdflags = append([]string{ + linuxX86ClangLdflags = append(clangFilterUnknownCflags(linuxX86Ldflags), []string{ "-B${linuxGccRoot}/lib/gcc/${linuxGccTriple}/${linuxGccVersion}/32", "-L${linuxGccRoot}/lib/gcc/${linuxGccTriple}/${linuxGccVersion}/32", "-L${linuxGccRoot}/${linuxGccTriple}/lib32", - }, clangFilterUnknownCflags(linuxX86Ldflags)...) + }...) - linuxX8664ClangLdflags = append([]string{ + linuxX8664ClangLdflags = append(clangFilterUnknownCflags(linuxX8664Ldflags), []string{ "-B${linuxGccRoot}/lib/gcc/${linuxGccTriple}/${linuxGccVersion}", "-L${linuxGccRoot}/lib/gcc/${linuxGccTriple}/${linuxGccVersion}", "-L${linuxGccRoot}/${linuxGccTriple}/lib64", - }, clangFilterUnknownCflags(linuxX8664Ldflags)...) + }...) linuxClangCppflags = []string{ "-isystem ${linuxGccRoot}/${linuxGccTriple}/include/c++/${linuxGccVersion}", |