[patch] boehm-gc: link libgcjgc with -ldl

2013-09-04 Thread Matthias Klose
The boehm-gc tests currently fail to build with a linker with
--no-copy-dt-needed-entries as the default. dlopen is referenced in the libgcjgc
library itself, so link it with -ldl.  The macro name EXTRA_TEST_LIBS is a bit
unfortunate now, but it is the right way to find the library name, as done for
the tests itself.

Ok for the trunk and the 4.8 branch?

  Matthias

* Makefile.am (libgcjgc_la_LIBADD): Add EXTRA_TEST_LIBS.
* Makefile.in: Regenerate.

--- a/src/boehm-gc/Makefile.am
+++ a/src/boehm-gc/Makefile.am
@@ -35,7 +35,7 @@
 
 # Include THREADLIBS here to ensure that the correct versions of
 # linuxthread semaphore functions get linked:
-libgcjgc_la_LIBADD = $(addobjs) $(THREADLIBS)
+libgcjgc_la_LIBADD = $(addobjs) $(THREADLIBS) $(EXTRA_TEST_LIBS)
 libgcjgc_la_DEPENDENCIES = $(addobjs)
 libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath 
$(toolexeclibdir)
 libgcjgc_la_LINK = $(LINK) $(libgcjgc_la_LDFLAGS)


Re: [patch] boehm-gc: link libgcjgc with -ldl

2013-09-04 Thread Andrew Haley
On 09/04/2013 11:00 AM, Matthias Klose wrote:
 The boehm-gc tests currently fail to build with a linker with
 --no-copy-dt-needed-entries as the default.

Hmm, isn't that a bug in the linker?

Andrew.



Re: [patch] boehm-gc: link libgcjgc with -ldl

2013-09-04 Thread Matthias Klose
Am 04.09.2013 12:21, schrieb Andrew Haley:
 On 09/04/2013 11:00 AM, Matthias Klose wrote:
 The boehm-gc tests currently fail to build with a linker with
 --no-copy-dt-needed-entries as the default.
 
 Hmm, isn't that a bug in the linker?

No, it's the default in gold and in the bfd linker since 2.23.

  Matthias



Re: [patch] boehm-gc: link libgcjgc with -ldl

2013-09-04 Thread Andrew Haley
On 09/04/2013 11:24 AM, Matthias Klose wrote:
 Am 04.09.2013 12:21, schrieb Andrew Haley:
 On 09/04/2013 11:00 AM, Matthias Klose wrote:
 The boehm-gc tests currently fail to build with a linker with
 --no-copy-dt-needed-entries as the default.

 Hmm, isn't that a bug in the linker?
 
 No, it's the default in gold and in the bfd linker since 2.23.

Oh, right.  I wonder how many other things this will break.  OK.

Andrew.