Various host flag updates to match Make

Some of these are updates from the old build system, others are just
differences/bugs being corrected.

Change-Id: Ied7f47ade495dcb26ba3611e636869cba283860f
diff --git a/cc/x86_darwin_host.go b/cc/x86_darwin_host.go
index bff9a03..87e50b0 100644
--- a/cc/x86_darwin_host.go
+++ b/cc/x86_darwin_host.go
@@ -72,6 +72,10 @@
 		"-fstack-protector-strong",
 	}...)
 
+	darwinX86ClangCflags = append(clangFilterUnknownCflags(darwinX86Cflags), []string{
+		"-msse3",
+	}...)
+
 	darwinClangLdflags = clangFilterUnknownCflags(darwinLdflags)
 
 	darwinX86ClangLdflags = clangFilterUnknownCflags(darwinX86Ldflags)
@@ -126,8 +130,7 @@
 	pctx.StaticVariable("darwinX86Ldflags", strings.Join(darwinX86Ldflags, " "))
 	pctx.StaticVariable("darwinX8664Ldflags", strings.Join(darwinX8664Ldflags, " "))
 
-	pctx.StaticVariable("darwinX86ClangCflags",
-		strings.Join(clangFilterUnknownCflags(darwinX86Cflags), " "))
+	pctx.StaticVariable("darwinX86ClangCflags", strings.Join(darwinX86ClangCflags, " "))
 	pctx.StaticVariable("darwinX8664ClangCflags",
 		strings.Join(clangFilterUnknownCflags(darwinX8664Cflags), " "))
 	pctx.StaticVariable("darwinX86ClangLdflags", strings.Join(darwinX86ClangLdflags, " "))
@@ -215,7 +218,7 @@
 }
 
 func (t *toolchainDarwinX86) ClangTriple() string {
-	return "i686-darwin-gnu"
+	return "i686-apple-darwin"
 }
 
 func (t *toolchainDarwinX86) ClangCflags() string {
@@ -223,7 +226,7 @@
 }
 
 func (t *toolchainDarwinX8664) ClangTriple() string {
-	return "x86_64-darwin-gnu"
+	return "x86_64-apple-darwin"
 }
 
 func (t *toolchainDarwinX8664) ClangCflags() string {
diff --git a/cc/x86_linux_host.go b/cc/x86_linux_host.go
index 528d2a7..e05d2a5 100644
--- a/cc/x86_linux_host.go
+++ b/cc/x86_linux_host.go
@@ -68,13 +68,14 @@
 
 	linuxClangCflags = append(clangFilterUnknownCflags(linuxCflags), []string{
 		"--gcc-toolchain=${linuxGccRoot}",
-		"--sysroot=${linuxGccRoot}/sysroot",
+		"--sysroot ${linuxGccRoot}/sysroot",
 		"-fstack-protector-strong",
 	}...)
 
 	linuxClangLdflags = append(clangFilterUnknownCflags(linuxLdflags), []string{
 		"--gcc-toolchain=${linuxGccRoot}",
-		"--sysroot=${linuxGccRoot}/sysroot",
+		"--sysroot ${linuxGccRoot}/sysroot",
+		"-B${linuxGccRoot}/${linuxGccTriple}/bin",
 	}...)
 
 	linuxX86ClangLdflags = append(clangFilterUnknownCflags(linuxX86Ldflags), []string{
diff --git a/cc/x86_windows_host.go b/cc/x86_windows_host.go
index ad6fdf3..60d88a1 100644
--- a/cc/x86_windows_host.go
+++ b/cc/x86_windows_host.go
@@ -28,7 +28,6 @@
 		"-DUSE_MINGW",
 		"-DWIN32_LEAN_AND_MEAN",
 		"-Wno-unused-parameter",
-		"-m32",
 
 		// Workaround differences in inttypes.h between host and target.
 		//See bug 12708004.
@@ -37,12 +36,14 @@
 
 		// Use C99-compliant printf functions (%zd).
 		"-D__USE_MINGW_ANSI_STDIO=1",
-		// Admit to using >= Win2K. Both are needed because of <_mingw.h>.
-		"-D_WIN32_WINNT=0x0500",
-		"-DWINVER=0x0500",
+		// Admit to using >= Vista. Both are needed because of <_mingw.h>.
+		"-D_WIN32_WINNT=0x0600",
+		"-DWINVER=0x0600",
 		// Get 64-bit off_t and related functions.
 		"-D_FILE_OFFSET_BITS=64",
 
+		"--sysroot ${windowsGccRoot}/${windowsGccTriple}",
+
 		// HOST_RELEASE_CFLAGS
 		"-O2", // from build/core/combo/select.mk
 		"-g",  // from build/core/combo/select.mk
@@ -55,7 +56,6 @@
 	}
 
 	windowsLdflags = []string{
-		"-L${windowsGccRoot}/${windowsGccTriple}",
 		"--enable-stdcall-fixup",
 	}