]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: ld: Add --enable-memory-seal configure option
authorAlan Modra <amodra@gmail.com>
Wed, 15 Jan 2025 03:02:00 +0000 (13:32 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 15 Jan 2025 03:15:35 +0000 (13:45 +1030)
Commit 80dc29527ff9 accidentally removed an assignment to board_flags,
resulting in tcl errors 'can't read "board_flags": no such variable'
on sh4-linux-gnu.  Fix that by calling [get_board_flags] in the
condition rather than reinstating the removed line since it seems most
configurations don't have a null STATIC_LDFLAGS.  Do the same in
another similar test too.

ld/testsuite/lib/ld-lib.exp

index 3fd445b37b8af5629a3118ea61fd177c51dd71c0..74125ac19835c66d3b2c56984075e9e602463c1b 100644 (file)
@@ -794,9 +794,8 @@ proc run_ld_link_exec_tests { ldtests args } {
            pass $testname
            continue;
        } else {
-           set board_flags [get_board_flags]
            if { [string match "" $STATIC_LDFLAGS] \
-                && [regexp -- ".* \[-\]+static .*" " $board_flags $ld_options $objfiles $ld_after "] } {
+                && [regexp -- ".* \[-\]+static .*" " [get_board_flags] $ld_options $objfiles $ld_after "] } {
                untested $testname
                continue
            }
@@ -987,7 +986,7 @@ proc run_cc_link_tests { ldtests } {
            }
 
            if { [string match "" $STATIC_LDFLAGS] \
-                && [regexp -- ".* \[-\]+static .*" " $board_flags $ldflags $objfiles "] } {
+                && [regexp -- ".* \[-\]+static .*" " [get_board_flags] $ldflags $objfiles "] } {
                untested $testname
                continue
            }