Merge "Revert "Build support for 32-bit armv8-a""

This commit is contained in:
Tobias Thierer 2017-08-22 10:30:29 +00:00 committed by Gerrit Code Review
commit 9dffe1d807
1 changed files with 5 additions and 25 deletions

View File

@ -102,11 +102,6 @@ var (
"-mfloat-abi=softfp",
"-mfpu=neon",
},
"armv8-a": []string{
"-march=armv8-a",
"-mfloat-abi=softfp",
"-mfpu=neon-fp-armv8",
},
}
armCpuVariantCflags = map[string][]string{
@ -179,7 +174,6 @@ func init() {
"armv5te",
"armv7-a",
"armv7-a-neon",
"armv8-a",
"cortex-a7",
"cortex-a8",
"cortex-a9",
@ -194,19 +188,12 @@ func init() {
"denver")
android.RegisterArchVariantFeatures(android.Arm, "armv7-a-neon", "neon")
android.RegisterArchVariantFeatures(android.Arm, "armv8-a", "neon")
// 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")
replaceFirst(armClangCpuVariantCflags["kryo"], "-mcpu=cortex-a15", "-mcpu=krait")
// The reason we use "-march=armv8-a+crc", instead of "-march=armv8-a", for
// gcc is the latter would conflict with any specified/supported -mcpu!
// All armv8-a cores supported by gcc 4.9 support crc, so it's safe
// to add +crc. Besides, the use of gcc is only for legacy code.
replaceFirst(armArchVariantCflags["armv8-a"], "-march=armv8-a", "-march=armv8-a+crc")
pctx.StaticVariable("armGccVersion", armGccVersion)
pctx.SourcePathVariable("ArmGccRoot",
@ -228,7 +215,6 @@ func init() {
pctx.StaticVariable("ArmArmv5TECflags", strings.Join(armArchVariantCflags["armv5te"], " "))
pctx.StaticVariable("ArmArmv7ACflags", strings.Join(armArchVariantCflags["armv7-a"], " "))
pctx.StaticVariable("ArmArmv7ANeonCflags", strings.Join(armArchVariantCflags["armv7-a-neon"], " "))
pctx.StaticVariable("ArmArmv8ACflags", strings.Join(armArchVariantCflags["armv8-a"], " "))
// Cpu variant cflags
pctx.StaticVariable("ArmGenericCflags", strings.Join(armCpuVariantCflags[""], " "))
@ -256,8 +242,6 @@ func init() {
strings.Join(armClangArchVariantCflags["armv7-a"], " "))
pctx.StaticVariable("ArmClangArmv7ANeonCflags",
strings.Join(armClangArchVariantCflags["armv7-a-neon"], " "))
pctx.StaticVariable("ArmClangArmv8ACflags",
strings.Join(armClangArchVariantCflags["armv8-a"], " "))
// Clang cpu variant cflags
pctx.StaticVariable("ArmClangGenericCflags",
@ -281,7 +265,6 @@ var (
"armv5te": "${config.ArmArmv5TECflags}",
"armv7-a": "${config.ArmArmv7ACflags}",
"armv7-a-neon": "${config.ArmArmv7ANeonCflags}",
"armv8-a": "${config.ArmArmv8ACflags}",
}
armCpuVariantCflagsVar = map[string]string{
@ -303,7 +286,6 @@ var (
"armv5te": "${config.ArmClangArmv5TECflags}",
"armv7-a": "${config.ArmClangArmv7ACflags}",
"armv7-a-neon": "${config.ArmClangArmv7ANeonCflags}",
"armv8-a": "${config.ArmClangArmv8ACflags}",
}
armClangCpuVariantCflagsVar = map[string]string{
@ -420,11 +402,6 @@ func armToolchainFactory(arch android.Arch) Toolchain {
toolchainClangCflags[0] = "${config.ArmToolchainClangCflags}"
toolchainClangCflags[1] = armClangArchVariantCflagsVar[arch.ArchVariant]
toolchainCflags = append(toolchainCflags,
variantOrDefault(armCpuVariantCflagsVar, arch.CpuVariant))
toolchainClangCflags = append(toolchainClangCflags,
variantOrDefault(armClangCpuVariantCflagsVar, arch.CpuVariant))
switch arch.ArchVariant {
case "armv7-a-neon":
switch arch.CpuVariant {
@ -434,12 +411,15 @@ func armToolchainFactory(arch android.Arch) Toolchain {
default:
fixCortexA8 = "-Wl,--no-fix-cortex-a8"
}
toolchainCflags = append(toolchainCflags,
variantOrDefault(armCpuVariantCflagsVar, arch.CpuVariant))
toolchainClangCflags = append(toolchainClangCflags,
variantOrDefault(armClangCpuVariantCflagsVar, arch.CpuVariant))
case "armv7-a":
fixCortexA8 = "-Wl,--fix-cortex-a8"
case "armv5te":
// Nothing extra for armv5te
case "armv8-a":
// Nothing extra for armv8-a
default:
panic(fmt.Sprintf("Unknown ARM architecture version: %q", arch.ArchVariant))
}