diff --git a/android/arch.go b/android/arch.go index b88b27510..151cabded 100644 --- a/android/arch.go +++ b/android/arch.go @@ -107,6 +107,7 @@ module { var archVariants = map[ArchType][]string{ Arm: { + "armv7-a", "armv7-a-neon", "armv8-a", "armv8-2a", @@ -1314,6 +1315,7 @@ type archConfig struct { func getMegaDeviceConfig() []archConfig { return []archConfig{ + {"arm", "armv7-a", "generic", []string{"armeabi-v7a"}}, {"arm", "armv7-a-neon", "generic", []string{"armeabi-v7a"}}, {"arm", "armv7-a-neon", "cortex-a7", []string{"armeabi-v7a"}}, {"arm", "armv7-a-neon", "cortex-a8", []string{"armeabi-v7a"}}, @@ -1365,7 +1367,7 @@ func getMegaDeviceConfig() []archConfig { func getNdkAbisConfig() []archConfig { return []archConfig{ - {"arm", "armv7-a-neon", "", []string{"armeabi"}}, + {"arm", "armv7-a", "", []string{"armeabi"}}, {"arm64", "armv8-a", "", []string{"arm64-v8a"}}, {"x86", "", "", []string{"x86"}}, {"x86_64", "", "", []string{"x86_64"}}, diff --git a/cc/config/arm_device.go b/cc/config/arm_device.go index aee16eb47..cd7c4107e 100644 --- a/cc/config/arm_device.go +++ b/cc/config/arm_device.go @@ -51,6 +51,11 @@ var ( } armClangArchVariantCflags = map[string][]string{ + "armv7-a": []string{ + "-march=armv7-a", + "-mfloat-abi=softfp", + "-mfpu=vfpv3-d16", + }, "armv7-a-neon": []string{ "-march=armv7-a", "-mfloat-abi=softfp", @@ -184,6 +189,8 @@ func init() { pctx.StaticVariable("ArmClangThumbCflags", strings.Join(ClangFilterUnknownCflags(armThumbCflags), " ")) // Clang arch variant cflags + pctx.StaticVariable("ArmClangArmv7ACflags", + strings.Join(armClangArchVariantCflags["armv7-a"], " ")) pctx.StaticVariable("ArmClangArmv7ANeonCflags", strings.Join(armClangArchVariantCflags["armv7-a-neon"], " ")) pctx.StaticVariable("ArmClangArmv8ACflags", @@ -212,6 +219,7 @@ func init() { var ( armClangArchVariantCflagsVar = map[string]string{ + "armv7-a": "${config.ArmClangArmv7ACflags}", "armv7-a-neon": "${config.ArmClangArmv7ANeonCflags}", "armv8-a": "${config.ArmClangArmv8ACflags}", "armv8-2a": "${config.ArmClangArmv82ACflags}", @@ -327,6 +335,8 @@ func armToolchainFactory(arch android.Arch) Toolchain { default: fixCortexA8 = "-Wl,--no-fix-cortex-a8" } + case "armv7-a": + fixCortexA8 = "-Wl,--fix-cortex-a8" case "armv8-a", "armv8-2a": // Nothing extra for armv8-a/armv8-2a default: