From fff256f817213482c6b04ede2882aa9952d9948b Mon Sep 17 00:00:00 2001 From: Jake Weinstein Date: Thu, 6 Apr 2017 20:38:26 -0400 Subject: [PATCH] soong: always use -mfpu=neon-vfpv4 for Krait targets * GCC and Clang both support this, so we may as well simplify the logic. Test: make otapackage Test: verified that the options are exactly the same, just slightly different order. Change-Id: I8c2e9f3875cb662db708c799c9ce54f9fdd55981 --- cc/config/arm_device.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cc/config/arm_device.go b/cc/config/arm_device.go index ae4e64646..9058de2f7 100644 --- a/cc/config/arm_device.go +++ b/cc/config/arm_device.go @@ -128,6 +128,7 @@ var ( }, "krait": []string{ "-mcpu=cortex-a15", + "-mfpu=neon-vfpv4", // Fake an ARM compiler flag as these processors support LPAE which GCC/clang // don't advertise. // TODO This is a hack and we need to add it for each processor that supports LPAE until some @@ -168,9 +169,9 @@ func init() { "kryo", "denver") + // Krait and Kryo targets are not supported by GCC, but are supported by Clang, + // so override the definitions when building modules with Clang. replaceFirst(armClangCpuVariantCflags["krait"], "-mcpu=cortex-a15", "-mcpu=krait") - armClangCpuVariantCflags["krait"] = append(armClangCpuVariantCflags["krait"], "-mfpu=neon-vfpv4") - replaceFirst(armClangCpuVariantCflags["kryo"], "-mcpu=cortex-a15", "-mcpu=krait") pctx.StaticVariable("armGccVersion", armGccVersion)