]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR32715, ld-elf/pr29072 fail with --disable-default-execstack
authorAlan Modra <amodra@gmail.com>
Tue, 18 Feb 2025 22:04:42 +0000 (08:34 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 18 Feb 2025 22:10:38 +0000 (08:40 +1030)
--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.

ld/testsuite/ld-elf/elf.exp

index 19e9b16c9da4c5290c62321f984257ecc133e621..7e69940dc2549201e29ab1f89480c033a9ce9ac9 100644 (file)
@@ -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*-*-*"]