Fix powerpc64 ld testsuite fail

Alan Modra amodra@gmail.com
Wed Apr 27 08:01:00 GMT 2016


Nick's recent ld/configure.tgt may have found a bash bug.

ERROR: tcl error sourcing tool-and-target-specific interface file /src/binutils-gdb/ld/testsuite/config/default.exp.
Error getting emulation name: elf64lppc
sh: 1: eval: targ_extra_emuls+= elf32lppc elf32lppclinux elf32lppcsim: not found
sh: 1: eval: targ_extra_libpath+= elf32lppc elf32lppclinux: not found
sh: 1: eval: targ64_extra_emuls+= : not found
sh: 1: eval: targ64_extra_libpath+= : not found
sh: 1: eval: targ_extra_emuls+= elf64ppc: not found
Error getting emulation name: elf64lppc
sh: 1: eval: targ_extra_emuls+= elf32lppc elf32lppclinux elf32lppcsim: not found
sh: 1: eval: targ_extra_libpath+= elf32lppc elf32lppclinux: not found
sh: 1: eval: targ64_extra_emuls+= : not found
sh: 1: eval: targ64_extra_libpath+= : not found
sh: 1: eval: targ_extra_emuls+= elf64ppc: not found
    while executing
"error "Error getting emulation name: $result" "
    invoked from within
"if $status { error "Error getting emulation name: $result" }"
    (procedure "get_target_emul" line 5)
    invoked from within
"get_target_emul"
    invoked from within
"if ![info exists HOSTING_EMU] { set HOSTING_EMU "-m [get_target_emul]" }"
    (file "/src/binutils-gdb/ld/testsuite/config/default.exp" line 149)
    invoked from within
"source /src/binutils-gdb/ld/testsuite/config/default.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source /src/binutils-gdb/ld/testsuite/config/default.exp"
    invoked from within
"catch "uplevel #0 source ${dir}/${initfile}" error"
Makefile:3615: recipe for target 'check-DEJAGNU' failed

	PR target/19985
	* configure.tgt: Don't use var+=.

diff --git a/ld/configure.tgt b/ld/configure.tgt
index da89e2b..1f6db42 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -626,9 +626,9 @@ powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
 				# PR 19985: Include big endian emulations.
 				for z in targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath
 				do
-				  eval ${z}+=\" `eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\"
+				  eval ${z}=\"\$${z} `eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\"
 				done
-				eval targ_extra_emuls+=\" \$targ_emul\"
+				targ_extra_emuls="$targ_extra_emuls $targ_emul"
 			        eval targ_emul=\"`eval echo \\$targ_emul | sed -e 's/ppc/lppc/g'`\"
 			esac ;;
 powerpc-*-nto*)         targ_emul=elf32ppcnto ;;

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list