Set -fno-emulated-tls for riscv64
Building for riscv64 fails with link errors on __thread variables. Set -fno-emulated-tls to fix it. Bug: 254713216 Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true ndk_sysroot Change-Id: I3dca81dfd277d681b6c868a5e8385e3a37335a5f
This commit is contained in:
parent
ecf4e664e0
commit
2c435a00ff
3 changed files with 3 additions and 2 deletions
|
@ -25,6 +25,7 @@ var (
|
|||
riscv64Cflags = []string{
|
||||
// Help catch common 32/64-bit errors.
|
||||
"-Werror=implicit-function-declaration",
|
||||
"-fno-emulated-tls",
|
||||
}
|
||||
|
||||
riscv64ArchVariantCflags = map[string][]string{}
|
||||
|
|
|
@ -91,7 +91,7 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
|
|||
return flags
|
||||
}
|
||||
|
||||
// LTO doesn't work on riscv64 yet.
|
||||
// TODO(b/254713216): LTO doesn't work on riscv64 yet.
|
||||
if ctx.Arch().ArchType == android.Riscv64 {
|
||||
return flags
|
||||
}
|
||||
|
|
|
@ -511,7 +511,7 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
|||
s.Integer_overflow = nil
|
||||
}
|
||||
|
||||
// CFI doesn't work for riscv64 yet because LTO doesn't work.
|
||||
// TODO(b/254713216): CFI doesn't work for riscv64 yet because LTO doesn't work.
|
||||
if ctx.Arch().ArchType == android.Riscv64 {
|
||||
s.Cfi = nil
|
||||
s.Diag.Cfi = nil
|
||||
|
|
Loading…
Reference in a new issue