Consistently use -std=gnu99 for gcc as well as clang.
This matters for C files that are also built for Windows. Previously they'd
be compiled with -std=gnu99 for the host but [effectively] -std=gnu89 for
Windows.
Bug: http://b/32019064
Test: builds, and can build libcrypto_utils without a manual -std= line
Change-Id: I9c5cc7832220b5c3d6a007ff10d076e26fd8c75d
diff --git a/cc/makevars.go b/cc/makevars.go
index ea32121..3dd0f74 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -113,7 +113,9 @@
toolchain.ToolchainCflags(),
productExtraCflags,
}, " "))
- ctx.Strict(makePrefix+"GLOBAL_CONLYFLAGS", "")
+ ctx.Strict(makePrefix+"GLOBAL_CONLYFLAGS", strings.Join([]string{
+ "${config.CommonGlobalConlyflags}",
+ }, " "))
ctx.Strict(makePrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
"${config.CommonGlobalCppflags}",
toolchain.Cppflags(),
@@ -161,7 +163,6 @@
clangExtras,
productExtraCflags,
}, " "))
- ctx.Strict(clangPrefix+"GLOBAL_CONLYFLAGS", "${config.ClangExtraConlyflags}")
ctx.Strict(clangPrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
"${config.CommonClangGlobalCppflags}",
toolchain.ClangCppflags(),