Discussion:
[uClinux-dev] [PATCHv2 1/6] dlopen is used by newer binutils, so check for it
Waldemar Brodkorb
2016-01-05 18:13:12 UTC
Permalink
Add a check for dlopen to configure.ac

Signed-off-by: Waldemar Brodkorb <***@uclibc-ng.org>
---
v1 -> v2:
- the link order is important, so add LIBS variable suggested by Greg Ungerer

---
configure.ac | 1 +
1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index ca95d53..dcf0f92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,7 @@ dnl redirect some functions to the system symbols, but other local symbols
dnl come from libiberty/libbfd.
dnl int getopt(int, char * const [], const char *) __asm("_" "getopt" "$UNIX2003");
AC_CHECK_LIB(c, malloc, LIBS="-lc $LIBS")
+AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl")

dnl Checks for header files.
AC_HEADER_STDC
--
1.7.10.4

_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-01-06 04:40:33 UTC
Permalink
Post by Waldemar Brodkorb
Add a check for dlopen to configure.ac
Thanks Waldemar. That works for me now.

I pushed this into the public elf2flt git tree:

https://github.com/uclinux-dev/elf2flt

I also added a patch after this that regenerates the configure
local script.

Thanks
Greg
Post by Waldemar Brodkorb
---
- the link order is important, so add LIBS variable suggested by Greg Ungerer
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index ca95d53..dcf0f92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,7 @@ dnl redirect some functions to the system symbols, but other local symbols
dnl come from libiberty/libbfd.
dnl int getopt(int, char * const [], const char *) __asm("_" "getopt" "$UNIX2003");
AC_CHECK_LIB(c, malloc, LIBS="-lc $LIBS")
+AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl")
dnl Checks for header files.
AC_HEADER_STDC
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Loading...