This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix LD_LIBRARY_PATH setting in testsuite
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 24 Oct 2004 19:03:11 +0200
- Subject: Fix LD_LIBRARY_PATH setting in testsuite
Hello Mark,
H.J.'s patch to fix PR bootstrap/17684:
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02881.html
had an unexpected side-effect: breaking the testsuite for the multilibed
compiler on sparc-sun-solaris2.x (x>=7).
The problem is that LD_LIBRARY_PATH is not correctly set anymore: it doesn't
contain the $(lib)/$(multilib_dir) pattern anymore. This originates in the
following construct:
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
append libgcc_s_path ":${rootme}/${mldir}"
}
}
}
that is replicated in many testsuite driver files.
H.J.'s patch causes an additional shared lib to be created in the
$(lib)/$(multilib_dir) directory, namely libgcc_s*.so.stage2. So there is
more than one libgcc_s*.so.* file and the condition is false. This doesn't
seem to be problematic on amd64-linux (smarter dynamic linker?) but really is
on Solaris.
OK for mainline and 3.4 branch?
2004-10-24 ?Eric Botcazou ?<ebotcazou@libertysurf.fr>
gcc/testsuite:
* lib/g++.exp: Accept more than one shared multilib libgcc.
* lib/gcc-dg.exp: Likewise.
* lib/objc.exp: Likewise.
* lib/treelang.exp:Likewise.
* lib/gfortran.exp: Likewise.
libffi:
* testsuite/lib/libffi-dg.exp: Accept more than one shared multilib libgcc.
libjava:
* testsuite/lib/libjava.exp: Accept more than one shared multilib libgcc.
libstdc++-v3:
* testsuite/lib/libstdc++.exp: Accept more than one shared multilib libgcc.
libmudflap:
* testsuite/lib/libmudflap.exp: Accept more than one shared multilib libgcc.
--
Eric Botcazou
Index: lib/g++.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.41
diff -u -r1.41 g++.exp
--- lib/g++.exp 13 Sep 2004 21:20:11 -0000 1.41
+++ lib/g++.exp 24 Oct 2004 16:17:06 -0000
@@ -138,7 +138,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${rootme}/${mldir}"
}
}
Index: lib/gcc-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/gcc-dg.exp,v
retrieving revision 1.35
diff -u -r1.35 gcc-dg.exp
--- lib/gcc-dg.exp 6 Sep 2004 23:36:11 -0000 1.35
+++ lib/gcc-dg.exp 24 Oct 2004 16:17:09 -0000
@@ -57,7 +57,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append libgcc_s_path ":${rootme}/${mldir}"
}
}
Index: lib/gfortran.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/gfortran.exp,v
retrieving revision 1.6
diff -u -r1.6 gfortran.exp
--- lib/gfortran.exp 13 Sep 2004 21:20:12 -0000 1.6
+++ lib/gfortran.exp 24 Oct 2004 16:17:09 -0000
@@ -103,7 +103,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${rootme}/${mldir}"
}
}
Index: lib/objc.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/objc.exp,v
retrieving revision 1.26
diff -u -r1.26 objc.exp
--- lib/objc.exp 13 Sep 2004 21:20:12 -0000 1.26
+++ lib/objc.exp 24 Oct 2004 16:17:09 -0000
@@ -120,7 +120,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append objc_libgcc_s_path ":${rootme}/${mldir}"
}
}
Index: lib/treelang.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/treelang.exp,v
retrieving revision 1.4
diff -u -r1.4 treelang.exp
--- lib/treelang.exp 13 Sep 2004 21:20:12 -0000 1.4
+++ lib/treelang.exp 24 Oct 2004 16:17:09 -0000
@@ -117,7 +117,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append treelang_libgcc_s_path ":${rootme}/${mldir}"
}
}
Index: testsuite/lib/libffi-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libffi/testsuite/lib/libffi-dg.exp,v
retrieving revision 1.8
diff -u -r1.8 libffi-dg.exp
--- testsuite/lib/libffi-dg.exp 14 Sep 2004 21:16:29 -0000 1.8
+++ testsuite/lib/libffi-dg.exp 24 Oct 2004 16:18:52 -0000
@@ -101,7 +101,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${gccdir}/${mldir}"
}
}
Index: testsuite/lib/libjava.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/lib/libjava.exp,v
retrieving revision 1.59
diff -u -r1.59 libjava.exp
--- testsuite/lib/libjava.exp 4 Aug 2004 16:49:21 -0000 1.59
+++ testsuite/lib/libjava.exp 24 Oct 2004 16:19:24 -0000
@@ -226,7 +226,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.${so_extension}.*]] == 1 } {
+ if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.${so_extension}.*]] >= 1 } {
lappend libjava_libgcc_s_path "${gccdir}/${mldir}"
}
}
Index: testsuite/lib/libstdc++.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/libstdc++.exp,v
retrieving revision 1.26
diff -u -r1.26 libstdc++.exp
--- testsuite/lib/libstdc++.exp 7 Oct 2004 23:20:42 -0000 1.26
+++ testsuite/lib/libstdc++.exp 24 Oct 2004 16:19:49 -0000
@@ -159,7 +159,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${gccdir}/${mldir}"
}
}
Index: testsuite/lib/libmudflap.exp
===================================================================
RCS file: /cvs/gcc/gcc/libmudflap/testsuite/lib/libmudflap.exp,v
retrieving revision 1.5
diff -u -r1.5 libmudflap.exp
--- testsuite/lib/libmudflap.exp 4 Jun 2004 20:12:01 -0000 1.5
+++ testsuite/lib/libmudflap.exp 24 Oct 2004 16:20:15 -0000
@@ -69,7 +69,7 @@
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${gccdir}/${mldir}"
}
}