two patches for alsa-lib
cover two patches for alsa-lib
The following changes since commit c18249353697f8b3741ae2024308d195671d3598:
rt-tests: fix error check in hackbench (2013-06-17 13:53:42 +0800)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib szhang/alsa
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=szhang/alsa
Jesse Zhang (2):
alsa-lib: Change function type to "static __inline__"
alsa-lib: check if wordexp is supported in libc
.../Check-if-wordexp-function-is-supported.patch | 48 +++++++++++++++++ .../fix-O0-Optimize-unable-inline-function.patch | 61 ++++++++++++++++++++++ meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb | 2 + 3 files changed, 111 insertions(+) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch
Signature · 1 line
1.7.11.7
PATCH 1/2 alsa-lib: Change function type to "static __inline__"
"extern __inline__ function()" is the inlined version that can be used in this compilation unit, but there will be another definition of this function somewhere, so compiler will not emit any code for the function body. This causes problem in -O0, where functions are never inlined, the function call is preserved, but linker can't find the symbol, thus the error happens.
since no packages provide atomic_add and atomic_sub, and -O0 Optimize is hoped to keep for debug, we can change extern to static to fix this problem.
--- .../fix-O0-Optimize-unable-inline-function.patch | 61 ++++++++++++++++++++++ meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb | 1 + 2 files changed, 62 insertions(+) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch
meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch new file +61 -0
@@ -0,0 +1,61 @@ +Change function type from "extern __inline__" to "static __inline__" + +"extern __inline__ function()" is the inlined version that +can be used in this compilation unit, but there will be another +definition of this function somewhere, so compiler will not emit +any code for the function body. This causes problem in -O0, +where functions are never inlined, the function call is preserved, +but linker can't find the symbol, thus the error happens. + +since no packages provide atomic_add and atomic_sub, and -O0 +Optimize is hoped to keep for debug, we can change extern to +static to fix this problem. + +Signed-off-by: Roy.Li <[email protected]> +--- + include/iatomic.h | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/include/iatomic.h b/include/iatomic.h +index e92dbfd..364bc5c 100644 +--- a/include/iatomic.h ++++ b/include/iatomic.h +@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t; + * Atomically adds @i to @v. Note that the guaranteed useful range + * of an atomic_t is only 24 bits. + */ +-extern __inline__ void atomic_add(int i, atomic_t * v) ++static __inline__ void atomic_add(int i, atomic_t * v) + { + unsigned long temp; + +@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v) + * Atomically subtracts @i from @v. Note that the guaranteed + * useful range of an atomic_t is only 24 bits. + */ +-extern __inline__ void atomic_sub(int i, atomic_t * v) ++static __inline__ void atomic_sub(int i, atomic_t * v) + { + unsigned long temp; + +@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v) + /* + * Same as above, but return the result value + */ +-extern __inline__ int atomic_add_return(int i, atomic_t * v) ++static __inline__ int atomic_add_return(int i, atomic_t * v) + { + unsigned long temp, result; + +@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) + return result; + } + +-extern __inline__ int atomic_sub_return(int i, atomic_t * v) ++static __inline__ int atomic_sub_return(int i, atomic_t * v) + { + unsigned long temp, result; + +-- +1.7.4.1 +
meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb +1 -0
@@ -19,6 +19,7 @@ PR = "r0" SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \ file://fix-tstamp-declaration.patch \ file://obsolete_automake_macros.patch \ + file://fix-O0-Optimize-unable-inline-function.patch \ " SRC_URI[md5sum] = "2dfa35d28471d721e592b616beedf965" SRC_URI[sha256sum] = "8c9f8161603cc3db640619650401292c3e110da63429ab6938aac763319f6e7d"
Signature · 1 line
1.7.11.7
PATCH 2/2 alsa-lib: check if wordexp is supported in libc
In reply to Jesse Zhangeglibc could be configured to build without the wordexp feature. To ensure that the wordexp feature could be used, the configure script must check if wordexp() is supported in libc in addition to checking if wordexp.h exists.
--- .../Check-if-wordexp-function-is-supported.patch | 48 ++++++++++++++++++++++ meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb | 1 + 2 files changed, 49 insertions(+) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 2555c5d62229cf269974f6ec6e4689ab97bbda42 Mon Sep 17 00:00:00 2001 +From: "Hong H. Pham" <[email protected]> +Date: Tue, 26 Feb 2013 19:40:04 -0500 +Subject: [PATCH] Check if wordexp function is supported + +eglibc could be configured to build without wordexp, so it is not enough +to check if wordexp.h exists (the header file could be installed, but it's +possible that the wordexp() function is not supported). An additional +check if wordexp() is supported by the system C library is needed. + +Signed-off-by: Hong H. Pham <[email protected]> +--- + configure.in | 5 ++++- + src/userfile.c | 2 +- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index 4bcb0d6..ba1c2dd 100644 +--- a/configure.in ++++ b/configure.in +@@ -333,7 +333,10 @@ arm*) + esac + + dnl Check for wordexp.h +-AC_CHECK_HEADERS([wordexp.h]) ++AC_CHECK_HEADERS([wordexp.h], ++ dnl Make sure wordexp is supported by the C library ++ AC_CHECK_FUNCS([wordexp]) ++) + + dnl Check for resmgr support... + AC_MSG_CHECKING(for resmgr support) +diff --git a/src/userfile.c b/src/userfile.c +index 3a73836..b8ce809 100644 +--- a/src/userfile.c ++++ b/src/userfile.c +@@ -32,7 +32,7 @@ + * stores the first matchine one. The returned string is strdup'ed. + */ + +-#ifdef HAVE_WORDEXP_H ++#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP)) + #include <wordexp.h> + #include <assert.h> + int snd_user_file(const char *file, char **result) +-- +1.7.10.4 +
meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb +1 -0
@@ -20,6 +20,7 @@ SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \ file://fix-tstamp-declaration.patch \ file://obsolete_automake_macros.patch \ file://fix-O0-Optimize-unable-inline-function.patch \ + file://Check-if-wordexp-function-is-supported.patch \ " SRC_URI[md5sum] = "2dfa35d28471d721e592b616beedf965" SRC_URI[sha256sum] = "8c9f8161603cc3db640619650401292c3e110da63429ab6938aac763319f6e7d"
Signature · 1 line
1.7.11.7
Hi Jesse,
Quoted 19 lines · On Monday 17 June 2013 20:33:24 Jesse Zhang wrote:
The following changes since commit
c18249353697f8b3741ae2024308d195671d3598:rt-tests: fix error check in hackbench (2013-06-17 13:53:42 +0800)
are available in the git repository at:
git://git.yoctoproject.org/poky-contribszhang/alsa
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=szhang/alsaJesse Zhang (2):
alsa-lib: Change function type to "static__inline__"
alsa-lib: check if wordexp is supported in libc.../Check-if-wordexp-function-is-supported.patch | 48 +++++++++++++++++ .../fix-O0-Optimize-unable-inline-function.patch | 61 ++++++++++++++++++++++ meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb | 2 + 3 files changed, 111 insertions(+) create mode 100644
Quoted 4 lines
meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supporte d.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-functio n.patch
Could you please add Upstream-Status to the inner patches?
Thanks,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Sure. I've updated my branch in poky-contrib.
jesse
Quoted 32 lines · Paul Eggleton
Hi Jesse,
Quoted 19 lines · On Monday 17 June 2013 20:33:24 Jesse Zhang wrote:
The following changes since commit
c18249353697f8b3741ae2024308d195671d3598:rt-tests: fix error check in hackbench (2013-06-17 13:53:42 +0800)
are available in the git repository at:
git://git.yoctoproject.org/poky-contribszhang/alsa
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=szhang/alsaJesse Zhang (2):
alsa-lib: Change function type to "static__inline__"
alsa-lib: check if wordexp is supported in libc.../Check-if-wordexp-function-is-supported.patch | 48 +++++++++++++++++ .../fix-O0-Optimize-unable-inline-function.patch | 61 ++++++++++++++++++++++ meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb | 2 + 3 files changed, 111 insertions(+) create mode 100644Quoted 4 lines
meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supporte d.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-functio n.patch
Could you please add Upstream-Status to the inner patches?
Thanks,
Paul