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/compiler.go b/cc/compiler.go
index db4c076..198b792 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -233,6 +233,7 @@
if !ctx.noDefaultCompilerFlags() {
flags.GlobalFlags = append(flags.GlobalFlags, instructionSetFlags)
+ flags.ConlyFlags = append(flags.ConlyFlags, "${config.CommonGlobalConlyflags}")
if flags.Clang {
flags.AsFlags = append(flags.AsFlags, tc.ClangAsflags())
@@ -241,8 +242,6 @@
tc.ClangCflags(),
"${config.CommonClangGlobalCflags}",
fmt.Sprintf("${config.%sClangGlobalCflags}", hod))
-
- flags.ConlyFlags = append(flags.ConlyFlags, "${config.ClangExtraConlyflags}")
} else {
flags.CppFlags = append(flags.CppFlags, "${config.CommonGlobalCppflags}")
flags.GlobalFlags = append(flags.GlobalFlags,