This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Fix ld-gc/gc.exp
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 22 Jan 2008 11:35:46 -0800
- Subject: PATCH: Fix ld-gc/gc.exp
I got
Running /export/gnu/src/binutils/binutils/ld/testsuite/ld-gc/gc.exp ...
ERROR: tcl error sourcing
/export/gnu/src/binutils/binutils/ld/testsuite/ld-gc/gc.exp.
ERROR: can't use non-numeric string as operand of "||"
while executing
"if { [is_remote host] || [which $CC] } {
ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/gc.c $objfile
}"
(file "/export/gnu/src/binutils/binutils/ld/testsuite/ld-gc/gc.exp"
line 30)
invoked from within
"source /export/gnu/src/binutils/binutils/ld/testsuite/ld-gc/gc.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source
/export/gnu/src/binutils/binutils/ld/testsuite/ld-gc/gc.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""
I am checking this patch as an obvious fix. Now I got
Using /usr/share/dejagnu/config/unix.exp as generic interface file for
target.
Using /export/gnu/src/binutils/binutils/ld/testsuite/config/default.exp
as tool-and-target-specific interface file.
Running /export/gnu/src/binutils/binutils/ld/testsuite/ld-gc/gc.exp ...
=== ld Summary ===
# of expected passes 5
/export/build/gnu/binutils/build-x86_64-linux/ld/ld-new
2.18.50.20080122
H.J.
---
2008-01-22 H.J. Lu <hongjiu.lu@intel.com>
* ld-gc/gc.exp: Use [which $CC] != 0.
--- ld-gc/gc.exp.foo 2008-01-15 07:14:59.000000000 -0800
+++ ld-gc/gc.exp 2008-01-22 11:28:39.000000000 -0800
@@ -27,7 +27,7 @@ if ![check_gc_sections_available] {
set cflags "-ffunction-sections -fdata-sections"
set objfile "tmpdir/gc.o"
-if { [is_remote host] || [which $CC] } {
+if { [is_remote host] || [which $CC] != 0 } {
ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/gc.c $objfile
}