This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [libstdc++] Use LD_RUN_PATH when linking abi_check


On Tue, Sep 03, 2002 at 08:38:39PM +0200, Rainer Orth wrote:
> Have a look at libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp
> (libstdc++-v3-init): setting LD_LIBRARYN32_PATH and LD_LIBRARY64_PATH to
> the same value (and probably SHLIB_PATH for HP-UX) should be enough.

Huh.  We have to do that same logic, then, involving multilibs and libgcc_s.

Instead of putting all that into Makefile.am, I'm putting it as another
option in testsuite_flags.  Comments solicited.

What I have below works (if it doesn't work, abi_check won't run, since
the installed libstdc++.so on my system is from 3.1).  Give it a try on
your boxes?


> Speaking of LD_LIBRARY64_PATH: make check-abi currently doesn't cater for
> multilibbed systems like Solaris 8 and IRIX 6.  I suggest placing
> baseline_symbols.txt in the corresponding subdirs of config/abi (like
> sparc-sun-solaris2.8/sparcv9 and mips-sgi-irix6.5/mabi=64) and running
> abi_check for every multilib.  I'm low on time for gcc hacking lately, so I
> haven't yet figured out how to do so.

Running for each multilib is a good idea, although I'd prefer not to have
more nested subdirectories, with one file in each dir.  I'll add this to
the todo list.



Index: Makefile.am
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/Makefile.am,v
retrieving revision 1.33
diff -u -r1.33 Makefile.am
--- Makefile.am	23 Aug 2002 19:33:37 -0000	1.33
+++ Makefile.am	3 Sep 2002 19:29:45 -0000
@@ -49,7 +49,7 @@
 baseline_file = @baseline_file@
 check-abi: $(top_builddir)/testsuite/abi_check
 	-(cd testsuite; \
-	  ./abi_check ${baseline_file})
+	  env `../testsuite_flags --rpath` ./abi_check ${baseline_file})
 
 # These rules are messy, but are hella worth it.
 doxygen:
Index: testsuite_flags.in
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/testsuite_flags.in,v
retrieving revision 1.12
diff -u -r1.12 testsuite_flags.in
--- testsuite_flags.in	18 Apr 2002 01:37:42 -0000	1.12
+++ testsuite_flags.in	3 Sep 2002 19:23:25 -0000
@@ -17,6 +17,7 @@
 		    --build-cxx
 		    --install-cxx
 		    --cxxflags
+		    --rpath
 EOF
 }
 
@@ -52,6 +53,25 @@
 		 -fmessage-length=0 @EXTRA_CXX_FLAGS@
 		 -DDEBUG_ASSERT  -DLOCALEDIR="@glibcpp_localedir@" '
       echo ${CXXFLAGS}
+      ;;
+    --rpath)
+      # We have to replicate the work done in
+      # testsuite/lib/libstdc++-v3-dg.exp's libstdc++-v3-init fucntion with
+      # regards to shared library paths at runtime, including (Murphy help us)
+      # multilibs not yet installed.  The easiest way would be to call into
+      # that routine, but it's 1) Tcl, and 2) firmly embedded into dejagnu.
+      # So to replicate the work, we duplicate the code.
+      CC_build="@glibcpp_CXX@"
+      CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
+      gccdir=`echo $CC_build |\
+       sed -e 's! *\([A-Za-z_/-]*\)/xgcc .*!\1!'`
+       #sed -e 's![A-Za-z_/-]* *\([A-Za-z_/-]*\)/xgcc .*!\1!'`
+      #lpath=".:${gccdir}: add ml stuff here :${BUILD_DIR}/src/.libs"
+      lpath=".:${gccdir}:${BUILD_DIR}/src/.libs"
+      echo "LD_LIBRARY_PATH=${lpath}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} \
+       LD_LIBRARYN32_PATH=${lpath}${LD_LIBRARYN32_PATH:+:$LD_LIBRARYN32_PATH} \
+       LD_LIBRARY64_PATH=${lpath}${LD_LIBRARY64_PATH:+:$LD_LIBRARY64_PATH} \
+       SHLIB_PATH=${lpath}${SHLIB_PATH:+:$SHLIB_PATH}"
       ;;
     *)
       print_usage
Index: testsuite/Makefile.am
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/testsuite/Makefile.am,v
retrieving revision 1.11
diff -u -r1.11 Makefile.am
--- testsuite/Makefile.am	1 Sep 2002 18:09:18 -0000	1.11
+++ testsuite/Makefile.am	3 Sep 2002 18:22:07 -0000
@@ -41,7 +41,6 @@
 CXX_fake = @glibcpp_CXX@ 
 CXX=`echo $(CXX_fake) | sed 's/xgcc/g++/g'`
 CXXLINK = \
-	LD_RUN_PATH=${LD_RUN_PATH:+$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs\
 	$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
 


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