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/config/global.go b/cc/config/global.go
index 7209d16..9b77662 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -37,6 +37,10 @@
"-UDEBUG",
}
+ commonGlobalConlyflags = []string{
+ "-std=gnu99",
+ }
+
deviceGlobalCflags = []string{
"-fdiagnostics-color",
@@ -72,6 +76,7 @@
}
pctx.StaticVariable("CommonGlobalCflags", strings.Join(commonGlobalCflags, " "))
+ pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
pctx.StaticVariable("DeviceGlobalCflags", strings.Join(deviceGlobalCflags, " "))
pctx.StaticVariable("HostGlobalCflags", strings.Join(hostGlobalCflags, " "))
pctx.StaticVariable("NoOverrideGlobalCflags", strings.Join(noOverrideGlobalCflags, " "))