package/alsa-utils: re-enable in BR2_STATIC_LIBS configuration
PATCH 1/3 package/alsa-utils: re-enable in BR2_STATIC_LIBS configuration
In commit 4707383c5d501a9ad7698579e5d0a4e2ab758c7e ("alsa-utils: needs dynamic library support"), we added a !BR2_STATIC_LIBS dependency because topology/topology.c was including <dlfcn.h>.
However, it turns out that this include is not needed/used at all, so we can instead drop it, and re-enable the package in BR2_STATIC_LIBS configuration.
This was discovered when analyzing why we have package/alsa-lib/0003-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch. This patch fixes the AM_PATH_ALSA autoconf macro, used by alsa-utils, so
that ALSA_LIBS doesn't carry the -ldl option, fixing static-linking scenarios. This patch had become useless since alsa-utils was no
longer available in BR2_STATIC_LIBS configuration.
--- ...-topology.c-drop-unneeded-dlfcn.h-include.patch | 29 ++++++++++++++++++++++ package/alsa-utils/Config.in | 5 ++-- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 package/alsa-utils/0001-topology-topology.c-drop-unneeded-dlfcn.h-include.patch
package/alsa-utils/0001-topology-topology.c-drop-unneeded-dlfcn.h-include.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 4c9462a5ef2f680b24ddf6bae7ac7c693fa6a136 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +Date: Thu, 1 Nov 2018 15:15:31 +0100 +Subject: [PATCH] topology/topology.c: drop unneeded <dlfcn.h> include + +This include is not used/needed and prevents building on systems that +don't provide <dlfcn.h>. + +Signed-off-by: Thomas Petazzoni <[email protected]> +Upstream: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-November/141375.html +--- + topology/topology.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/topology/topology.c b/topology/topology.c +index 097c255..b72e341 100644 +--- a/topology/topology.c ++++ b/topology/topology.c +@@ -27,7 +27,6 @@ + #include <errno.h> + #include <string.h> + #include <sys/stat.h> +-#include <dlfcn.h> + #include <getopt.h> + #include <assert.h> + +-- +2.14.4 +
package/alsa-utils/Config.in +2 -3
@@ -1,12 +1,11 @@ -comment "alsa-utils needs a toolchain w/ threads, dynamic library" +comment "alsa-utils needs a toolchain w/ threads" depends on BR2_USE_MMU # fork - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_HAS_THREADS menuconfig BR2_PACKAGE_ALSA_UTILS bool "alsa-utils" depends on BR2_USE_MMU # fork depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib - depends on !BR2_STATIC_LIBS # uses dlfcn.h select BR2_PACKAGE_ALSA_LIB help This package contains the command line utilities for the ALSA
Signature · 1 line
2.14.4
PATCH 2/3 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 <dlfcn.h> inclusions optional.
However, this is no longer needed, since the alsa-lib code base contains four inclusions of <dlfcn.h>, 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.
---
...ditionally-enable-libdl-in-AM_PATH_ALSA-.patch} | 0
...ovide-dummy-definitions-of-RTLD_-if-neces.patch | 57 ----------------------
2 files changed, 57 deletions(-)
rename package/alsa-lib/{0003-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch => 0002-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch} (100%)
delete mode 100644 package/alsa-lib/0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patchpackage/alsa-lib/0002-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch renamed from package/alsa-lib/0003-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch +0 -0
package/alsa-lib/0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patch deleted +0 -57
57 lines not on this page · raw message
Signature · 1 line
2.14.4
PATCH 2/3 package/alsa-lib: drop patch 0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patch
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
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 <dlfcn.h> inclusions optional.However, this is no longer needed, since the alsa-lib code base contains four inclusions of <
dlfcn.h>, which are all properly handled:-
include/local.h, the include is guarded by #ifdefHAVE_LIBDL-
modules/mixer/simple/sbasedl.c, modules are only built ifBUILD_MODULESis enabled, andBUILD_MODULESis only enabled ifHAVE_LIBDLis enabled-
src/mixer/simple_abst.c, this file is only built ifBUILD_MODULESis enabled, which itself is only enabled ifHAVE_LIBDLis enabled
Quoted 8 lines
-
src/pcm/pcm_meter.c, this file is only built ifBUILD_PCM_PLUGIN_METERis enabled, and this is not enabled ifHAVE_LIBDLis not enabled.Conclusion: the patch can be dropped. The third patch is renumbered as appropriate.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/3 package/alsa-lib: update upstream status of patches
In reply to Thomas PetazzoniThe remaining two patches have been submitted upstream for inclusion, so let's update their upstream status.
While at it, I update @free-electrons.com to @bootlin.com in the first patch.
--- package/alsa-lib/0001-Don-t-use-fork-on-noMMU-platforms.patch | 5 +++-- .../0002-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)
package/alsa-lib/0001-Don-t-use-fork-on-noMMU-platforms.patch +3 -2
@@ -1,14 +1,15 @@ From 41c029755502acf01ed634db437ac06d09be6c41 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> +From: Thomas Petazzoni <[email protected]> Date: Fri, 13 Apr 2018 09:02:37 +0200 Subject: [PATCH] Don't use fork() on noMMU platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Signed-off-by: Thomas Petazzoni <[email protected]> +Signed-off-by: Thomas Petazzoni <[email protected]> [J?rg: update patch for 1.1.6] Signed-off-by: J?rg Krause <[email protected]> +Upstream: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-November/141376.html --- configure.ac | 2 ++ src/pcm/pcm_direct.c | 10 +++++++++-
package/alsa-lib/0002-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch +1 -0
@@ -17,6 +17,7 @@ result to conditionally add -ldl to the list of libraries. Signed-off-by: Thomas De Schampheleire <[email protected]> [J?rg: update for 1.1.6] Signed-off-by: J?rg Krause <[email protected]> +Upstream: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-November/141377.html --- utils/alsa.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.14.4
PATCH 3/3 package/alsa-lib: update upstream status of patches
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
The remaining two patches have been submitted upstream for inclusion, so let's update their upstream status.
While at it, I update @free-electrons.com to @bootlin.com in the first patch.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/3 package/alsa-utils: re-enable in BR2_STATIC_LIBS configuration
In reply to Thomas PetazzoniQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
In commit
4707383c5d501a9ad7698579e5d0a4e2ab758c7e("alsa-utils: needs dynamic library support"), we added a !BR2_STATIC_LIBS dependency becausetopology/topology.cwas including <dlfcn.h>.However, it turns out that this include is not needed/used at all, so we can instead drop it, and re-enable the package in
BR2_STATIC_LIBSconfiguration.
Quoted 8 lines
This was discovered when analyzing why we have
package/alsa-lib/0003-alsa-lib-conditionally-enable-libdl-in-AM_PATH_ALSA-.patch. This patch fixes theAM_PATH_ALSAautoconf macro, used by alsa-utils, so
thatALSA_LIBSdoesn't carry the -ldl option, fixing static-linking scenarios. This patch had become useless since alsa-utils was no
longer available inBR2_STATIC_LIBSconfiguration.Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard