mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
ld: Don't use -mdirect-extern-access for LoongArch
Don't check DIRECT_EXTERN_ACCESS_CFLAGS/NO_DIRECT_EXTERN_ACCESS_CFLAGS
for LoongArch since -mdirect-extern-access on LoongArch works only
without dynamic linker.
PR ld/33409
* testsuite/config/default.exp (DIRECT_EXTERN_ACCESS_CFLAGS):
Skip on LoongArch.
(NO_DIRECT_EXTERN_ACCESS_CFLAGS): Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit d654421dc2)
This commit is contained in:
@@ -450,6 +450,9 @@ if { ![info exists NOPIE_CFLAGS] || ![info exists NOPIE_LDFLAGS] } then {
|
||||
if { ![info exists DIRECT_EXTERN_ACCESS_CFLAGS] } then {
|
||||
set DIRECT_EXTERN_ACCESS_CFLAGS ""
|
||||
set NO_DIRECT_EXTERN_ACCESS_CFLAGS ""
|
||||
# Exclude LoongArch since -mdirect-extern-access on LoongArch works
|
||||
# only without dynamic linker.
|
||||
if { ![istarget loongarch*-*-*] } {
|
||||
if [compiler_supports "-mdirect-extern-access"] {
|
||||
set DIRECT_EXTERN_ACCESS_CFLAGS "-mdirect-extern-access"
|
||||
set NO_DIRECT_EXTERN_ACCESS_CFLAGS "-mno-direct-extern-access"
|
||||
@@ -458,6 +461,7 @@ if { ![info exists DIRECT_EXTERN_ACCESS_CFLAGS] } then {
|
||||
set NO_DIRECT_EXTERN_ACCESS_CFLAGS "-fno-direct-access-external-data"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if { ![info exists NOCF_PROTECTION_CFLAGS] } then {
|
||||
set NOCF_PROTECTION_CFLAGS ""
|
||||
|
||||
Reference in New Issue
Block a user