This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] g++ testsuite for shared only builds


Hello,

if I build a gcc without static library support I run into several failures like this:

Setting LD_LIBRARY_PATH to .:/mnt/slice1/gcc-svn/objdir/gcc:.:/mnt/slice1/gcc-svn/objdir/gcc:
./eb73.exe: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.4' not found (required by ./eb73.exe)
./eb73.exe: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.6' not found (required by ./eb73.exe)
FAIL: g++.old-deja/g++.robertl/eb73.C execution test


The testsuite picks the libstdc++ from my installed gcc-3.4 instead of the fresh built from gcc-4.x.

So I added the following piece to lib/g++.exp.
I know, not complete, especially for other targets having a different shared library extension.
Tested on ppc-linux (32-bit only).


Is the approach ok? If yes, shall I add the other checks as well?

Thanks,
Andreas

2005-10-31 Andreas Tobler <a.tobler@schweiz.ch>

	* lib/g++.exp (g++_link_flags): Add check for shared libstdc++ and
	for success add the necessary flags.

Index: g++.exp
===================================================================
--- g++.exp     (revision 106268)
+++ g++.exp     (working copy)
@@ -122,6 +122,10 @@
           append flags " -L${gccpath}/libstdc++-v3/src/.libs "
           append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
       }
+      if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.so"] {
+          append flags " -L${gccpath}/libstdc++-v3/src/.libs "
+          append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
+      }
       if [file exists "${gccpath}/libiberty/libiberty.a"] {
           append flags "-L${gccpath}/libiberty "
       }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]