* Fix LD_LIBRARY_PATH setting in testsuite
@ 2004-10-24 18:03 Eric Botcazou
2004-10-25 7:50 ` Eric Botcazou
2004-10-25 8:19 ` Mark Mitchell
0 siblings, 2 replies; 3+ messages in thread
From: Eric Botcazou @ 2004-10-24 18:03 UTC (permalink / raw)
To: Mark Mitchell; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1817 bytes --]
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
[-- Attachment #2: testsuite_mlib.diff --]
[-- Type: text/x-diff, Size: 5528 bytes --]
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}"
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix LD_LIBRARY_PATH setting in testsuite
2004-10-24 18:03 Fix LD_LIBRARY_PATH setting in testsuite Eric Botcazou
@ 2004-10-25 7:50 ` Eric Botcazou
2004-10-25 8:19 ` Mark Mitchell
1 sibling, 0 replies; 3+ messages in thread
From: Eric Botcazou @ 2004-10-25 7:50 UTC (permalink / raw)
To: gcc-patches; +Cc: Mark Mitchell
> 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).
Same problem on mips-sgi-irix6.5, this is PR other/18138.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix LD_LIBRARY_PATH setting in testsuite
2004-10-24 18:03 Fix LD_LIBRARY_PATH setting in testsuite Eric Botcazou
2004-10-25 7:50 ` Eric Botcazou
@ 2004-10-25 8:19 ` Mark Mitchell
1 sibling, 0 replies; 3+ messages in thread
From: Mark Mitchell @ 2004-10-25 8:19 UTC (permalink / raw)
To: Eric Botcazou; +Cc: gcc-patches
Eric Botcazou wrote:
> 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.
This patch is OK.
It would be swell if this code could be centralized in one place, but
that can be a separate pathc.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-25 6:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-24 18:03 Fix LD_LIBRARY_PATH setting in testsuite Eric Botcazou
2004-10-25 7:50 ` Eric Botcazou
2004-10-25 8:19 ` Mark Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).