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]

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


On Mon, Sep 02, 2002 at 01:52:20PM +0200, Rainer Orth wrote:
> Phil Edwards <phil@jaj.com> writes:
> 
> > Rather than trying to find an -R/-rpath/-Wl,--rpath solution that would
> > work on all systems, let's just trust the linker to Do The Right Thing when
> > LD_RUN_PATH is present.  I've verified that this works for me, additional
> > reports would be welcome.
> 
> This doesn't work on Tru64 UNIX and IRIX 6 which both lack support for
> LD_RUN_PATH.

Aw, crap.  I used to love both those platforms.


> I think that instead we should use LD_LIBRARY_PATH (and it's
> LD_LIBRARYN32_PATH/LD_LIBRARY64_PATH companions on IRIX 6) as we do all the
> time in the testsuite.  This is a tested solution and seems to work
> everywhere.

I was hoping to find a solution that would continue to permit easy execution
of the abi_check binary by hand, where "easy" == "as little command-line
fiddling as possible".  Oh well.

Changing the Makefile to use LD_LIBRARY_PATH is easy enough.  The patch
below works on a typical x86/linux setup.  What would need to change to
support the N32/N64 stuff?

(Lately I've been getting 61 added symbols and 64 missing symbols.
Three symbols have been removed, we know about those; I still need to look
into why the mangling has changed for the other 61.)


Index: Makefile.am
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/Makefile.am,v
retrieving revision 1.33
diff -u -3 -r1.33 Makefile.am
--- Makefile.am	23 Aug 2002 19:33:37 -0000	1.33
+++ Makefile.am	3 Sep 2002 18:23:50 -0000
@@ -49,6 +49,7 @@
 baseline_file = @baseline_file@
 check-abi: $(top_builddir)/testsuite/abi_check
 	-(cd testsuite; \
+	  LD_LIBRARY_PATH=${glibcpp_builddir}/src/.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}\
 	  ./abi_check ${baseline_file})
 
 # These rules are messy, but are hella worth it.
Index: testsuite/Makefile.am
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/testsuite/Makefile.am,v
retrieving revision 1.11
diff -u -3 -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]