From: Thomas Petazzoni Date: Thu, 1 Nov 2018 17:05:23 +0000 (+0100) Subject: package/alsa-lib: drop patch 0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa627bacc2eeffaba9f0287fa039864b2232d60c;p=buildroot.git package/alsa-lib: drop patch 0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patch The description of this patch was no longer correct: it no longer provided dummy definitions of RTLD_* macros since commit ccad7db515fa79d2331e4e949aafb32eca0b5214 ("alsa-lib: bump to version 1.1.6"). All it did is make two inclusions optional. However, this is no longer needed, since the alsa-lib code base contains four inclusions of , which are all properly handled: - include/local.h, the include is guarded by #ifdef HAVE_LIBDL - modules/mixer/simple/sbasedl.c, modules are only built if BUILD_MODULES is enabled, and BUILD_MODULES is only enabled if HAVE_LIBDL is enabled - src/mixer/simple_abst.c, this file is only built if BUILD_MODULES is enabled, which itself is only enabled if HAVE_LIBDL is enabled - src/pcm/pcm_meter.c, this file is only built if BUILD_PCM_PLUGIN_METER is enabled, and this is not enabled if HAVE_LIBDL is not enabled. Conclusion: the patch can be dropped. The third patch is renumbered as appropriate. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- diff --git a/package/alsa-lib/0002-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch b/package/alsa-lib/0002-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch new file mode 100644 index 0000000000..181e56deb4 --- /dev/null +++ b/package/alsa-lib/0002-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch @@ -0,0 +1,48 @@ +From 2aba563bd077fda94fb9c2c33002ee0ac119b345 Mon Sep 17 00:00:00 2001 +From: Thomas De Schampheleire +Date: Fri, 13 Apr 2018 09:13:46 +0200 +Subject: [PATCH] alsa-lib: conditionally enable libdl in AM_PATH_ALSA m4 macro +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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 +[Jörg: update for 1.1.6] +Signed-off-by: Jörg Krause +--- + utils/alsa.m4 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/utils/alsa.m4 b/utils/alsa.m4 +index e12310df..a5c5a292 100644 +--- 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) + +-- +2.14.3 + diff --git a/package/alsa-lib/0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patch b/package/alsa-lib/0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patch deleted file mode 100644 index f489f913d9..0000000000 --- a/package/alsa-lib/0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patch +++ /dev/null @@ -1,57 +0,0 @@ -From ff91d50a250e10a419bcd35176f3069161ac33bb Mon Sep 17 00:00:00 2001 -From: Sonic Zhang -Date: Fri, 13 Apr 2018 09:11:23 +0200 -Subject: [PATCH] alsa-lib: provide dummy definitions of RTLD_* if necessary -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The FLAT GNU toolchain (e.g. blackfin) doesn't include the dlfcn.h header -file, so we need to guard that include. Additionally, provide dummy -definitions for parameters RTLD_GLOBAL / RTLD_NOW which are normally -provided by dlfcn.h. - -Signed-off-by: Sonic Zhang -[Thomas: don't add separate dlmisc.h, move dummy defs to global.h] -Signed-off-by: Thomas De Schampheleire -[Jörg: update for 1.1.6] -Signed-off-by: Jörg Krause ---- - modules/mixer/simple/sbasedl.c | 4 +++- - src/mixer/simple_abst.c | 3 +++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c -index d8cbf0f1..daa0ab30 100644 ---- a/modules/mixer/simple/sbasedl.c -+++ b/modules/mixer/simple/sbasedl.c -@@ -27,8 +27,10 @@ - #include - #include - #include --#include - #include "config.h" -+#ifdef HAVE_DLFCN -+#include -+#endif - #include "asoundlib.h" - #include "mixer_abst.h" - #include "sbase.h" -diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c -index 9c61cb58..0ca58fe0 100644 ---- a/src/mixer/simple_abst.c -+++ b/src/mixer/simple_abst.c -@@ -34,7 +34,10 @@ - #include - #include - #include -+#include "config.h" -+#ifdef HAVE_DLFCN - #include -+#endif - #include "mixer_local.h" - #include "mixer_simple.h" - --- -2.14.3 - diff --git a/package/alsa-lib/0003-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch b/package/alsa-lib/0003-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch deleted file mode 100644 index 181e56deb4..0000000000 --- a/package/alsa-lib/0003-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 2aba563bd077fda94fb9c2c33002ee0ac119b345 Mon Sep 17 00:00:00 2001 -From: Thomas De Schampheleire -Date: Fri, 13 Apr 2018 09:13:46 +0200 -Subject: [PATCH] alsa-lib: conditionally enable libdl in AM_PATH_ALSA m4 macro -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -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 -[Jörg: update for 1.1.6] -Signed-off-by: Jörg Krause ---- - utils/alsa.m4 | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/utils/alsa.m4 b/utils/alsa.m4 -index e12310df..a5c5a292 100644 ---- 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) - --- -2.14.3 -