PR32715, ld-elf/pr29072 fail with --disable-default-execstack
Alan Modra
amodra@gmail.com
Tue Feb 18 22:13:02 GMT 2025
--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.
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 19e9b16c9da..7e69940dc25 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*-*-*"]
--
Alan Modra
More information about the Binutils
mailing list