Remove mips-specific arch flags
Most of these flags are already in the default //build setup
in build/config/compiler/BUILD.gn, config("compiler_cpu_abi").
`-mxgot` isn't -- if that flag is needed, it should probably
be in the upstream gn build files. If it's needed just for
swiftshader we can add it back with a comment that says why
the flag is swiftshader-specific.
Change-Id: Ia1a3b9770119f575fe3fec9fc18237c89b935800
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/55629
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Commit-Queue: Nico Weber <thakis@chromium.org>
Tested-by: Nico Weber <thakis@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 1545aa1..5f98398 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -70,40 +70,9 @@
"-march=pentium4",
"-mtune=generic",
]
- } else if (target_cpu == "mipsel" && current_cpu == target_cpu) {
- cflags += [
- "-EL",
- "-fPIC",
- "-mhard-float",
- "-mfp32",
- "-mxgot",
- ]
- if (mips_arch_variant == "r1") {
- cflags += [ "-march=mips32" ]
- } else {
- cflags += [ "-march=mips32r2" ]
- }
- } else if (target_cpu == "mips64el" && current_cpu == target_cpu) {
- cflags += [
- "-EL",
- "-arch=mips64r2",
- "-mabi=64",
- "-fPIC",
- "-mxgot",
- ]
}
if (is_linux || is_chromeos) {
- if (current_cpu == "mipsel") {
- if (mips_arch_variant == "r1") {
- ldflags += [ "-mips32" ]
- } else {
- ldflags += [ "-mips32r2" ]
- }
- } else if (current_cpu == "mips64el") {
- ldflags += [ "-mips64r2" ]
- }
-
# A bug in the gold linker prevents using ICF on 32-bit (crbug.com/729532)
if (use_gold && (current_cpu == "x86" || current_cpu == "mipsel")) {
ldflags += [ "-Wl,--icf=none" ]