Consolidate cflags that are set on all devices

Move cflags that are set on all devices to deviceGlobalCflags:
-fno-canonical-system-headers
-ffunction-sections
-funwind-tables
-fstack-protector-strong
-Wa,--noexecstack
-D_FORTIFY_SOURCE=2
-Wstrict-aliasing=2
-Werror=format-security

Bug: 68855788
Test: m checkbuild
Change-Id: Iefec689fdd2749013d0cc003b3abec674a85fb74
diff --git a/cc/config/global.go b/cc/config/global.go
index 5587eae..4a2f606 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -54,12 +54,21 @@
 	deviceGlobalCflags = []string{
 		"-fdiagnostics-color",
 
-		// TARGET_ERROR_FLAGS
+		"-fno-canonical-system-headers",
+		"-ffunction-sections",
+		"-funwind-tables",
+		"-fstack-protector-strong",
+		"-Wa,--noexecstack",
+		"-D_FORTIFY_SOURCE=2",
+
+		"-Wstrict-aliasing=2",
+
 		"-Werror=return-type",
 		"-Werror=non-virtual-dtor",
 		"-Werror=address",
 		"-Werror=sequence-point",
 		"-Werror=date-time",
+		"-Werror=format-security",
 	}
 
 	hostGlobalCflags = []string{}