[binutils-gdb] PR32715, ld-elf/pr29072 fail with --disable-default-execstack
Alan Modra
amodra@sourceware.org
Tue Feb 18 22:23:43 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=65922587187f559cb660301a4dbeba7ae0e85fde
commit 65922587187f559cb660301a4dbeba7ae0e85fde
Author: Alan Modra <amodra@gmail.com>
Date: Wed Feb 19 08:34:42 2025 +1030
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.
Diff:
---
ld/testsuite/ld-elf/elf.exp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
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*-*-*"]
More information about the Binutils-cvs
mailing list