Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes
@ 2014-02-23 10:11 Thomas De Schampheleire
  2014-02-23 10:11 ` [Buildroot] [PATCH 1 of 5 v2] alsa-lib: add sequence number to existing patches Thomas De Schampheleire
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-02-23 10:11 UTC (permalink / raw)
  To: buildroot


v2: disable alsa-utils on no-mmu instead of trying to use vfork

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
Note: after 2014.02, I take the action to send the patches upstream.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1 of 5 v2] alsa-lib: add sequence number to existing patches
  2014-02-23 10:11 [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Thomas De Schampheleire
@ 2014-02-23 10:11 ` Thomas De Schampheleire
  2014-02-23 10:12   ` Thomas Petazzoni
  2014-02-23 10:11 ` [Buildroot] [PATCH 2 of 5 v2] alsa-lib: fix build when dynamic load is not supported (e.g. blackfin FLAT) Thomas De Schampheleire
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-02-23 10:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---

diff --git a/package/alsa-lib/alsa-lib-avr32-bad-inline.patch b/package/alsa-lib/alsa-lib-0001-avr32-bad-inline.patch
rename from package/alsa-lib/alsa-lib-avr32-bad-inline.patch
rename to package/alsa-lib/alsa-lib-0001-avr32-bad-inline.patch
diff --git a/package/alsa-lib/alsa-lib-no-mmu.patch b/package/alsa-lib/alsa-lib-0002-no-mmu.patch
rename from package/alsa-lib/alsa-lib-no-mmu.patch
rename to package/alsa-lib/alsa-lib-0002-no-mmu.patch

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2 of 5 v2] alsa-lib: fix build when dynamic load is not supported (e.g. blackfin FLAT)
  2014-02-23 10:11 [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Thomas De Schampheleire
  2014-02-23 10:11 ` [Buildroot] [PATCH 1 of 5 v2] alsa-lib: add sequence number to existing patches Thomas De Schampheleire
@ 2014-02-23 10:11 ` Thomas De Schampheleire
  2014-02-23 10:11 ` [Buildroot] [PATCH 3 of 5 v2] alsa-lib: add patch to remove hardcoded -ldl Thomas De Schampheleire
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-02-23 10:11 UTC (permalink / raw)
  To: buildroot

The FLAT GNU toolchain doesn't include the dlfcn.h header file.
Provide the necessary declarations (RTLD_*) to make alsa-lib happy.

Fixes
http://autobuild.buildroot.org/results/706/7069e1f43cbed745d65f7dd9904a3fff034530ac/build-end.log

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
[Thomas: change sequence number from 003 to 0003, update patch and commit
         message ]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/alsa-lib/alsa-lib-0003-dlmisc.patch |  57 +++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/package/alsa-lib/alsa-lib-0003-dlmisc.patch b/package/alsa-lib/alsa-lib-0003-dlmisc.patch
new file mode 100644
--- /dev/null
+++ b/package/alsa-lib/alsa-lib-0003-dlmisc.patch
@@ -0,0 +1,57 @@
+alsa-lib: provide dummy definitions of RTLD_* if necessary
+
+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 <sonic.zhang@analog.com>
+[Thomas: don't add separate dlmisc.h, move dummy defs to global.h]
+Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
+
+diff --git a/include/global.h b/include/global.h
+--- a/include/global.h
++++ b/include/global.h
+@@ -97,6 +97,16 @@ extern struct snd_dlsym_link *snd_dlsym_
+ /** \brief Returns the version of a dynamic symbol as a string. */
+ #define SND_DLSYM_VERSION(version) __STRING(version)
+ 
++/* RTLD_NOW and RTLD_GLOBAL (used for 'mode' in snd_dlopen) are not defined
++ * on all arches (e.g. blackfin), so provide a dummy definition here. */
++#ifndef RTLD_NOW
++#define RTLD_NOW 0
++#endif
++
++#ifndef RTLD_GLOBAL
++#define RTLD_GLOBAL 0
++#endif
++
+ void *snd_dlopen(const char *file, int mode);
+ void *snd_dlsym(void *handle, const char *name, const char *version);
+ int snd_dlclose(void *handle);
+diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c
+--- a/modules/mixer/simple/sbasedl.c
++++ b/modules/mixer/simple/sbasedl.c
+@@ -27,7 +27,9 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <math.h>
++#ifdef HAVE_LIBDL
+ #include <dlfcn.h>
++#endif
+ #include "config.h"
+ #include "asoundlib.h"
+ #include "mixer_abst.h"
+diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c
+--- a/src/mixer/simple_abst.c
++++ b/src/mixer/simple_abst.c
+@@ -34,7 +34,9 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <math.h>
++#ifdef HAVE_LIBDL
+ #include <dlfcn.h>
++#endif
+ #include "config.h"
+ #include "asoundlib.h"
+ #include "mixer_simple.h"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 3 of 5 v2] alsa-lib: add patch to remove hardcoded -ldl
  2014-02-23 10:11 [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Thomas De Schampheleire
  2014-02-23 10:11 ` [Buildroot] [PATCH 1 of 5 v2] alsa-lib: add sequence number to existing patches Thomas De Schampheleire
  2014-02-23 10:11 ` [Buildroot] [PATCH 2 of 5 v2] alsa-lib: fix build when dynamic load is not supported (e.g. blackfin FLAT) Thomas De Schampheleire
@ 2014-02-23 10:11 ` Thomas De Schampheleire
  2014-02-23 10:11 ` [Buildroot] [PATCH 4 of 5 v2] alsa-utils: disable on no-mmu platforms (fork) Thomas De Schampheleire
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-02-23 10:11 UTC (permalink / raw)
  To: buildroot

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.

Fixes
http://autobuild.buildroot.org/results/de2/de286880973be956f6c504aa9a758171d6f49674/build-end.log

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/alsa-lib/alsa-lib-0004-conditional-enabling-of-libdl-in-m4.patch |  35 ++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/package/alsa-lib/alsa-lib-0004-conditional-enabling-of-libdl-in-m4.patch b/package/alsa-lib/alsa-lib-0004-conditional-enabling-of-libdl-in-m4.patch
new file mode 100644
--- /dev/null
+++ b/package/alsa-lib/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 <thomas.de.schampheleire@gmail.com>
+
+---
+
+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)
+ 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 4 of 5 v2] alsa-utils: disable on no-mmu platforms (fork)
  2014-02-23 10:11 [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Thomas De Schampheleire
                   ` (2 preceding siblings ...)
  2014-02-23 10:11 ` [Buildroot] [PATCH 3 of 5 v2] alsa-lib: add patch to remove hardcoded -ldl Thomas De Schampheleire
@ 2014-02-23 10:11 ` Thomas De Schampheleire
  2014-02-23 10:11 ` [Buildroot] [PATCH 5 of 5 v2] alsa-utils/Config.in: move comment to top, to fix nesting of config options Thomas De Schampheleire
  2014-02-23 11:33 ` [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Peter Korsgaard
  5 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-02-23 10:11 UTC (permalink / raw)
  To: buildroot

alsa-utils uses fork which is not available on targets without MMU support.
It seems to be possible to replace fork with vfork in alsa-utils, but we do
not like to carry such patches in buildroot without them being accepted
upstream.

Fixes
http://autobuild.buildroot.org/results/9f8/9f8e572c9f1c677155cc7d1828371bcf572ff878

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/alsa-utils/Config.in |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in
--- a/package/alsa-utils/Config.in
+++ b/package/alsa-utils/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_ALSA_UTILS
 	bool "alsa-utils"
+	depends on BR2_USE_MMU # fork
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	select BR2_PACKAGE_ALSA_LIB
@@ -10,6 +11,7 @@ config BR2_PACKAGE_ALSA_UTILS
 	  http://www.alsa-project.org/
 
 comment "alsa-utils needs a toolchain w/ largefile, threads"
+	depends on BR2_USE_MMU # fork
 	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
 
 if BR2_PACKAGE_ALSA_UTILS

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 5 of 5 v2] alsa-utils/Config.in: move comment to top, to fix nesting of config options
  2014-02-23 10:11 [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Thomas De Schampheleire
                   ` (3 preceding siblings ...)
  2014-02-23 10:11 ` [Buildroot] [PATCH 4 of 5 v2] alsa-utils: disable on no-mmu platforms (fork) Thomas De Schampheleire
@ 2014-02-23 10:11 ` Thomas De Schampheleire
  2014-02-23 11:33 ` [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Peter Korsgaard
  5 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-02-23 10:11 UTC (permalink / raw)
  To: buildroot

To allow proper nesting of suboptions of a package, the suboptions should
come directly after the main option, and cannot be interleaved with a
comment.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/alsa-utils/Config.in |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in
--- a/package/alsa-utils/Config.in
+++ b/package/alsa-utils/Config.in
@@ -1,3 +1,7 @@
+comment "alsa-utils needs a toolchain w/ largefile, threads"
+	depends on BR2_USE_MMU # fork
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_ALSA_UTILS
 	bool "alsa-utils"
 	depends on BR2_USE_MMU # fork
@@ -10,10 +14,6 @@ config BR2_PACKAGE_ALSA_UTILS
 
 	  http://www.alsa-project.org/
 
-comment "alsa-utils needs a toolchain w/ largefile, threads"
-	depends on BR2_USE_MMU # fork
-	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
-
 if BR2_PACKAGE_ALSA_UTILS
 menu "ALSA utils selection"
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1 of 5 v2] alsa-lib: add sequence number to existing patches
  2014-02-23 10:11 ` [Buildroot] [PATCH 1 of 5 v2] alsa-lib: add sequence number to existing patches Thomas De Schampheleire
@ 2014-02-23 10:12   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2014-02-23 10:12 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Sun, 23 Feb 2014 11:11:15 +0100, Thomas De Schampheleire wrote:
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
> 
> ---
> 
> diff --git a/package/alsa-lib/alsa-lib-avr32-bad-inline.patch b/package/alsa-lib/alsa-lib-0001-avr32-bad-inline.patch
> rename from package/alsa-lib/alsa-lib-avr32-bad-inline.patch
> rename to package/alsa-lib/alsa-lib-0001-avr32-bad-inline.patch
> diff --git a/package/alsa-lib/alsa-lib-no-mmu.patch b/package/alsa-lib/alsa-lib-0002-no-mmu.patch
> rename from package/alsa-lib/alsa-lib-no-mmu.patch
> rename to package/alsa-lib/alsa-lib-0002-no-mmu.patch

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes
  2014-02-23 10:11 [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Thomas De Schampheleire
                   ` (4 preceding siblings ...)
  2014-02-23 10:11 ` [Buildroot] [PATCH 5 of 5 v2] alsa-utils/Config.in: move comment to top, to fix nesting of config options Thomas De Schampheleire
@ 2014-02-23 11:33 ` Peter Korsgaard
  5 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2014-02-23 11:33 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

 > v2: disable alsa-utils on no-mmu instead of trying to use vfork

 > Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

 > ---
 > Note: after 2014.02, I take the action to send the patches upstream.

Committed series, thanks!

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-23 11:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 10:11 [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Thomas De Schampheleire
2014-02-23 10:11 ` [Buildroot] [PATCH 1 of 5 v2] alsa-lib: add sequence number to existing patches Thomas De Schampheleire
2014-02-23 10:12   ` Thomas Petazzoni
2014-02-23 10:11 ` [Buildroot] [PATCH 2 of 5 v2] alsa-lib: fix build when dynamic load is not supported (e.g. blackfin FLAT) Thomas De Schampheleire
2014-02-23 10:11 ` [Buildroot] [PATCH 3 of 5 v2] alsa-lib: add patch to remove hardcoded -ldl Thomas De Schampheleire
2014-02-23 10:11 ` [Buildroot] [PATCH 4 of 5 v2] alsa-utils: disable on no-mmu platforms (fork) Thomas De Schampheleire
2014-02-23 10:11 ` [Buildroot] [PATCH 5 of 5 v2] alsa-utils/Config.in: move comment to top, to fix nesting of config options Thomas De Schampheleire
2014-02-23 11:33 ` [Buildroot] [PATCH 0 of 5 v2] alsa-lib/alsa-utils: autobuild fixes Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox