diff mbox

boehm-gc: link libgcjgc with -ldl

Message ID 522704CF.2050303@ubuntu.com
State New
Headers show

Commit Message

Matthias Klose Sept. 4, 2013, 10 a.m. UTC
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.

Comments

Andrew Haley Sept. 4, 2013, 10:21 a.m. UTC | #1
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.
Matthias Klose Sept. 4, 2013, 10:24 a.m. UTC | #2
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
Andrew Haley Sept. 4, 2013, 10:24 a.m. UTC | #3
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.
diff mbox

Patch

--- 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)