Fix elf2flt compile on modern systems

Submitted by Solomon Peachy on March 6, 2014, 6:48 p.m.


Message ID
State New
Headers show

Commit Message

Solomon Peachy March 6, 2014, 6:48 p.m.
Without this fix, elf2flt will blow up complaining that it can't resolve
dlopen() and its friends.  One has to explicitly pass '-ldl' onto the 
final linking command line.

Incidentally, the elf2flt CVS host has been down for some time now; 
There's a git repo we could pull from hosted on the buildroot site, but 
I don't know how up-to-date it is.


 - Solomon

Patch hide | download patch | download mbox

diff --git a/crosstool-ng/scripts/build/binutils/ b/crosstool-ng/scripts/build/binutils/
index 059566d..741ed69 100644
--- a/crosstool-ng/scripts/build/binutils/
+++ b/crosstool-ng/scripts/build/binutils/
@@ -288,7 +288,8 @@  do_elf2flt_backend() {
     CT_DoLog EXTRA "Configuring elf2flt"
     CT_DoExecLog CFG                                            \
     CFLAGS="${cflags}"                                          \
-    LDFLAGS="${ldflags} -ldl"                                   \
+    LDFLAGS="${ldflags}"                                        \
+    LIBS="-ldl"                                                 \
     "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure"     \
         --build=${CT_BUILD}                                     \
         --host=${host}                                          \