aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2025-02-19 08:34:42 +1030
committerAlan Modra <amodra@gmail.com>2025-02-19 08:40:38 +1030
commit65922587187f559cb660301a4dbeba7ae0e85fde (patch)
treee97e18a6f6447b644a3d7c53ec82672800548cdf
parentba6ad3a18cb26b79e0e3b84c39f707535bbc344d (diff)
downloadbinutils-65922587187f559cb660301a4dbeba7ae0e85fde.zip
binutils-65922587187f559cb660301a4dbeba7ae0e85fde.tar.gz
binutils-65922587187f559cb660301a4dbeba7ae0e85fde.tar.bz2
PR32715, ld-elf/pr29072 fail with --disable-default-execstack
--disable-default-stack is an alias for --enable-default-execstack=no. The existing check only looked for the latter config option. PR 32715 * testsuite/ld-elf/elf.exp (target_defaults_to_execstack): Look in config.h for result of --enable-default-execstack.
-rw-r--r--ld/testsuite/ld-elf/elf.exp10
1 files changed, 6 insertions, 4 deletions
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 19e9b16..7e69940 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -199,15 +199,17 @@ proc target_defaults_to_execstack {} {
# If the linker has been configured with --enable-default-execstack=no then
# this proc should always return 0.
- if { [file exists $base_dir/config.status] } {
- set status [remote_exec host grep "enable-default-execstack=no" $base_dir/config.status]
+ set f $base_dir/config.h
+ set s {DEFAULT_LD_EXECSTACK\ 0}
+ if { [file exists $f] } {
+ set status [remote_exec host grep $s $f]
if { [lindex $status 0] == 0 } {
return 0
} else {
- verbose -log "$base_dir/config.status does not contain enable-default-execstack=no"
+ verbose -log "$f does not contain $s"
}
} else {
- verbose -log "there is no file $base_dir/config.status"
+ verbose -log "there is no file $f"
}
if { [istarget "aarch64*-*-*"]