Remove cortex-a53 linker workaround for new cpus.
Bug: 78133793
Test: Built target with cortex-a53 and verified that the flag is still
Test: there.
Test: Build target with cortex-a55/cortex-a75 and verified that the flag
Test: is not there.
Test: Built and booted on a taimen, ran bionic unit tests.
Change-Id: Ibd7f497ecf46e5781cd0265463b0782babdf062a
Merged-In: Ibd7f497ecf46e5781cd0265463b0782babdf062a
(cherry picked from commit a98d721485
)
This commit is contained in:
parent
4fc3ea6048
commit
1a6e5c0c15
|
@ -39,7 +39,6 @@ var (
|
|||
arm64Ldflags = []string{
|
||||
"-Wl,-m,aarch64_elf64_le_vec",
|
||||
"-Wl,--hash-style=gnu",
|
||||
"-Wl,--fix-cortex-a53-843419",
|
||||
"-fuse-ld=gold",
|
||||
"-Wl,--icf=safe",
|
||||
}
|
||||
|
@ -177,6 +176,8 @@ var (
|
|||
type toolchainArm64 struct {
|
||||
toolchain64Bit
|
||||
|
||||
ldflags string
|
||||
lldflags string
|
||||
toolchainCflags string
|
||||
toolchainClangCflags string
|
||||
}
|
||||
|
@ -210,7 +211,7 @@ func (t *toolchainArm64) Cppflags() string {
|
|||
}
|
||||
|
||||
func (t *toolchainArm64) Ldflags() string {
|
||||
return "${config.Arm64Ldflags}"
|
||||
return t.ldflags
|
||||
}
|
||||
|
||||
func (t *toolchainArm64) IncludeFlags() string {
|
||||
|
@ -230,11 +231,11 @@ func (t *toolchainArm64) ClangCppflags() string {
|
|||
}
|
||||
|
||||
func (t *toolchainArm64) ClangLdflags() string {
|
||||
return "${config.Arm64Ldflags}"
|
||||
return t.ldflags
|
||||
}
|
||||
|
||||
func (t *toolchainArm64) ClangLldflags() string {
|
||||
return "${config.Arm64Lldflags}"
|
||||
return t.lldflags
|
||||
}
|
||||
|
||||
func (t *toolchainArm64) ToolchainClangCflags() string {
|
||||
|
@ -258,7 +259,24 @@ func arm64ToolchainFactory(arch android.Arch) Toolchain {
|
|||
toolchainClangCflags = append(toolchainClangCflags,
|
||||
variantOrDefault(arm64ClangCpuVariantCflagsVar, arch.CpuVariant))
|
||||
|
||||
var extraLdflags string
|
||||
switch arch.CpuVariant {
|
||||
case "cortex-a53", "cortex-a73", "kryo", "exynos-m1", "exynos-m2",
|
||||
// This variant might not need the workaround but leave it
|
||||
// in the list since it has had the workaround on before.
|
||||
"denver64":
|
||||
extraLdflags = "-Wl,--fix-cortex-a53-843419"
|
||||
}
|
||||
|
||||
return &toolchainArm64{
|
||||
ldflags: strings.Join([]string{
|
||||
"${config.Arm64Ldflags}",
|
||||
extraLdflags,
|
||||
}, " "),
|
||||
lldflags: strings.Join([]string{
|
||||
"${config.Arm64Lldflags}",
|
||||
extraLdflags,
|
||||
}, " "),
|
||||
toolchainCflags: variantOrDefault(arm64CpuVariantCflagsVar, arch.CpuVariant),
|
||||
toolchainClangCflags: strings.Join(toolchainClangCflags, " "),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue