libv3test.a causes testsuite failures on multilibbed systems

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Mon Jun 3 13:43:00 GMT 2002


Phil Edwards writes:

> My limited multilibs testing /did/ build multiple versions of the .a,
> and nobody else responded to the call for multilib testers.
> 
> I was seeing libstdc++-v3/testsuite/libv3test.a
>              multi-1/libstdc++-v3/testsuite/libv3test.a
>              multi-2/libstdc++-v3/testsuite/libv3test.a

Indeed, those files are present on IRIX 6.5, too.  I hadn't noticed this
before.

Unfortunately, they are not used: the first attempt to link an N64 test is
run as follows:

/vol/gcc/obj/gcc-3.2-20020531/6.5-gcc-java/gcc/g++ -shared-libgcc -B/vol/gcc/obj/gcc-3.2-20020531/6.5-gcc-java/gcc/ -nostdinc++ -L/vol/gcc/obj/gcc-3.2-20020531/6.5-gcc-java/mips-sgi-irix6.5/mabi=64/libstdc++-v3/src -L/vol/gcc/obj/gcc-3.2-20020531/6.5-gcc-java/mips-sgi-irix6.5/mabi=64/libstdc++-v3/src/.libs -B/vol/gcc/share/mips-sgi-irix6.5/bin/ -B/vol/gcc/share/mips-sgi-irix6.5/lib/ -isystem /vol/gcc/share/mips-sgi-irix6.5/include -mabi=64 -g -ffunction-sections -fdata-sections -fmessage-length=0 -DDEBUG_ASSERT -DLOCALEDIR="/vol/gcc/obj/gcc-3.2-20020531/6.5-gcc-java/mips-sgi-irix6.5/mabi=64/libstdc++-v3/po/share/locale" -nostdinc++ -I/vol/gcc/obj/gcc-3.2-20020531/6.5-gcc-java/mips-sgi-irix6.5/mabi=64/libstdc++-v3/include/mips-sgi-irix6.5 -I/vol/gcc/obj/gcc-3.2-20020531/6.5-gcc-java/mips-sgi-irix6.5/mabi=64/libstdc++-v3/include -I/vol/gnu/src/gcc/gcc/libstdc++-v3/libsupc++ -I/vol/gnu/src/gcc/gcc/libstdc++-v3/libio -I/vol/gnu/src/gcc/gcc/libstdc++-v3/include/backward -I/vol/gn!
u/src/gcc/gcc/libstdc++-v3/testsuite /vol/gnu/src/gcc/gcc/libstdc++-v3/testsuite/17_intro/header_cassert.cc -DDEBUG_ASSERT -L. -lv3test -lm -mabi=64 -o ./header_cassert.exe 
ld64: FATAL   12 : Expecting 64-bit objects: ./libv3test.a is 32-bit.
collect2: ld returned 4 exit status
compiler exited with status 1

Since all multilib tests are run in <target>/libstdc++-v3/testsuite, not
the testsuite subdirectory corresponding to the multilib under test, the
-L. -lv3test breaks multilib testing.  You need to use a -L switch pointing
to the correct multilib testsuite dir instead.

The following patch allowed me to manually run a few tests on IRIX 6.5
(both with and without -mabi=64) from make check.

I'm now running a full 

	make -k RUNTESTFLAGS="--target_board 'unix{,-mabi=64}'" check

for libstdc++-v3 on IRIX 6.5 (and hope it will finish overnight).  Ok for
mainline if this passes?

	Rainer


Mon Jun  3 22:40:08 2002  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3_target_compile):
	Search correct multilib testsuite dir for libv3test.

Index: libstdc++-v3-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp,v
retrieving revision 1.18
diff -u -p -r1.18 libstdc++-v3-dg.exp
--- libstdc++-v3-dg.exp	29 May 2002 08:59:45 -0000	1.18
+++ libstdc++-v3-dg.exp	3 Jun 2002 20:38:01 -0000
@@ -185,6 +185,7 @@ proc libstdc++-v3_target_compile { sourc
     global cxx
     global cxxflags
     global includes
+    global blddir
 
     if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
 	lappend options "libs=${gluefile}"
@@ -199,9 +200,9 @@ proc libstdc++-v3_target_compile { sourc
 
     lappend options "compiler=$cxx_final"
 
-    # Picks up our local freshly-built testsuite library.  We could just
-    # name it directly, "./libv3test.a" but this is more portable.
-    lappend options "ldflags=-L."
+    # Picks up the freshly-built testsuite library corresponding to the
+    # multilib under test.
+    lappend options "ldflags=-L${blddir}/testsuite"
     lappend options "libs=-lv3test"
 
     return [target_compile $source $dest $type $options]



More information about the Libstdc++ mailing list