X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Falsa-lib%2F0004-conditional-enabling-of-libdl-in-m4.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Falsa-lib%2F0004-conditional-enabling-of-libdl-in-m4.patch;h=c533419baa2951225954feb08f08470adc96df84;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/alsa-lib/0004-conditional-enabling-of-libdl-in-m4.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/alsa-lib/0004-conditional-enabling-of-libdl-in-m4.patch new file mode 100644 index 0000000..c533419 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/alsa-lib/0004-conditional-enabling-of-libdl-in-m4.patch @@ -0,0 +1,35 @@ +alsa-lib: conditionally enable libdl in AM_PATH_ALSA m4 macro + +The AM_PATH_ALSA macro in utils/alsa.m4 unconditionally uses -ldl. This +breaks compilation of alsa-utils (and probably other packages using this +macro) for targets that do not support dynamic loading, such as for +Blackfin FLAT binaries. + +This patch updates the macro to check if dlopen is available, and use that +result to conditionally add -ldl to the list of libraries. + +Signed-off-by: Thomas De Schampheleire + +--- + +diff --git a/utils/alsa.m4 b/utils/alsa.m4 +--- a/utils/alsa.m4 ++++ b/utils/alsa.m4 +@@ -44,6 +44,8 @@ if test "$alsa_inc_prefix" != "" ; then + fi + AC_MSG_RESULT($ALSA_CFLAGS) + ++AC_CHECK_LIB(c, dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")]) ++ + dnl add any special lib dirs + AC_MSG_CHECKING(for ALSA LDFLAGS) + if test "$alsa_prefix" != "" ; then +@@ -52,7 +54,7 @@ if test "$alsa_prefix" != "" ; then + fi + + dnl add the alsa library +-ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread" ++ALSA_LIBS="$ALSA_LIBS -lasound -lm $LIBDL -lpthread" + LIBS="$ALSA_LIBS $LIBS" + AC_MSG_RESULT($ALSA_LIBS) +