Fix parens in ld bootstrap.exp

Alan Modra amodra@gmail.com
Tue Jun 26 11:38:00 GMT 2018


Seen with tcl 8.5.13:
ERROR: tcl error sourcing .../ld/testsuite/ld-bootstrap/bootstrap.exp.
ERROR: expected boolean value but got " [istarget ia64-*-elf*] || [istarget ia64-*-linux*"
    while executing
"if { "$flags" == "--static" && { [istarget ia64-*-elf*] || [istarget ia64-*-linux*] }
	 || [istarget mips*-*-linux*] } {
	# On ia64 and mips, tmpdir/l..."

I'm going to apply this to master and the 2.31 and 2.30 branches.

	* testsuite/ld-bootstrap/bootstrap.exp: Use parentheses rather
	than curly braces in logical expression.

diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index f0bac3f7e9..5c79e0315c 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -187,8 +187,10 @@ foreach flags $test_flags {
 	continue
     }
 
-    if { "$flags" == "--static" && { [istarget ia64-*-elf*] || [istarget ia64-*-linux*] }
-	 || [istarget mips*-*-linux*] } {
+    if { "$flags" == "--static"
+	 && ([istarget ia64-*-elf*]
+	     || [istarget ia64-*-linux*]
+	     || [istarget mips*-*-linux*]) } {
 	# On ia64 and mips, tmpdir/ld2 != tmpdir/ld3 is normal since they are
 	# generated by different linkers, tmpdir/ld1 and tmpdir/ld2.
 	# So we rebuild tmpdir/ld2 with tmpdir/ld3.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list