diff mbox

Fix elf2flt compile on modern systems

Message ID 20140306184834.GA15649@shaftnet.org
State New
Headers show

Commit Message

Solomon Peachy March 6, 2014, 6:48 p.m. UTC
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.

Cheers,

 - Solomon
diff mbox

Patch

diff --git a/crosstool-ng/scripts/build/binutils/binutils.sh b/crosstool-ng/scripts/build/binutils/binutils.sh
index 059566d..741ed69 100644
--- a/crosstool-ng/scripts/build/binutils/binutils.sh
+++ b/crosstool-ng/scripts/build/binutils/binutils.sh
@@ -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}                                          \