From: Alan Modra Date: Wed, 15 Jan 2025 03:02:00 +0000 (+1030) Subject: Re: ld: Add --enable-memory-seal configure option X-Git-Tag: binutils-2_44~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0e6aa08d78372591208733c1247c378cb4bbc35;p=thirdparty%2Fbinutils-gdb.git Re: ld: Add --enable-memory-seal configure option 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. --- diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 3fd445b37b8..74125ac1983 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -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 }