This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

gold patch committed: Use -Wl,-R,. for gold testsuite shared libs


Reportedly two gold tests fail on Dragonfly, apparently because the
dynamic linker uses the shared library search path to find libraries
that the shared library depends on, rather than inheriting the
executable's search path.  This patch should fix the problem by adding
-Wl,-R,. to the libraries themselves.  Committed to mainline.

Ian


2011-05-27  Ian Lance Taylor  <iant@google.com>

	* testsuite/Makefile.am (ver_test_2.so): Use -Wl,-R,.
	(ver_test_9.so): Likewise.
	* testsuite/Makefile.in: Rebuild.


Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/src/src/gold/testsuite/Makefile.am,v
retrieving revision 1.159
diff -u -r1.159 Makefile.am
--- testsuite/Makefile.am	24 May 2011 23:31:07 -0000	1.159
+++ testsuite/Makefile.am	27 May 2011 18:37:36 -0000
@@ -954,7 +954,7 @@
 ver_test_1.so: ver_test_1.o ver_test_2.so ver_test_3.o ver_test_4.so gcctestdir/ld
 	$(CXXLINK) -Bgcctestdir/ -shared ver_test_1.o ver_test_2.so ver_test_3.o ver_test_4.so
 ver_test_2.so: ver_test_2.o $(srcdir)/ver_test_2.script ver_test_4.so gcctestdir/ld
-	$(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_2.script ver_test_2.o ver_test_4.so
+	$(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_2.script -Wl,-R,. ver_test_2.o ver_test_4.so
 ver_test_4.so: ver_test_4.o $(srcdir)/ver_test_4.script gcctestdir/ld
 	$(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_4.script ver_test_4.o
 ver_test_1.o: ver_test_1.cc
@@ -1027,7 +1027,7 @@
 ver_test_9_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
 ver_test_9_LDADD = ver_test_9.so
 ver_test_9.so: ver_test_9.o ver_test_4.so ver_test_5.so gcctestdir/ld
-	$(CXXLINK) -Bgcctestdir/ -shared ver_test_9.o ver_test_5.so ver_test_4.so
+	$(CXXLINK) -Bgcctestdir/ -shared -Wl,-R,. ver_test_9.o ver_test_5.so ver_test_4.so
 ver_test_9.o: ver_test_9.cc
 	$(CXXCOMPILE) -c -fpic -o $@ $<
 

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