* [PATCH 0/2] two patches for alsa-lib
@ 2013-06-17 12:33 Jesse Zhang
2013-06-17 12:33 ` [PATCH 1/2] alsa-lib: Change function type to "static __inline__" Jesse Zhang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jesse Zhang @ 2013-06-17 12:33 UTC (permalink / raw)
To: openembedded-core
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
--
1.7.11.7
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] alsa-lib: Change function type to "static __inline__"
2013-06-17 12:33 [PATCH 0/2] two patches for alsa-lib Jesse Zhang
@ 2013-06-17 12:33 ` Jesse Zhang
2013-06-17 12:33 ` [PATCH 2/2] alsa-lib: check if wordexp is supported in libc Jesse Zhang
2013-06-17 12:35 ` [PATCH 0/2] two patches for alsa-lib Paul Eggleton
2 siblings, 0 replies; 5+ messages in thread
From: Jesse Zhang @ 2013-06-17 12:33 UTC (permalink / raw)
To: openembedded-core
"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 <rongqing.li@windriver.com>
Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
---
.../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
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch b/meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch
new file mode 100644
index 0000000..eb33406
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch
@@ -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 <rongqing.li@windriver.com>
+---
+ 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
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
index 49f4486..2695e6b 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
@@ -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"
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] alsa-lib: check if wordexp is supported in libc
2013-06-17 12:33 [PATCH 0/2] two patches for alsa-lib Jesse Zhang
2013-06-17 12:33 ` [PATCH 1/2] alsa-lib: Change function type to "static __inline__" Jesse Zhang
@ 2013-06-17 12:33 ` Jesse Zhang
2013-06-17 12:35 ` [PATCH 0/2] two patches for alsa-lib Paul Eggleton
2 siblings, 0 replies; 5+ messages in thread
From: Jesse Zhang @ 2013-06-17 12:33 UTC (permalink / raw)
To: openembedded-core
eglibc 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.
Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
---
.../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
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
new file mode 100644
index 0000000..d605f0f
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
@@ -0,0 +1,48 @@
+From 2555c5d62229cf269974f6ec6e4689ab97bbda42 Mon Sep 17 00:00:00 2001
+From: "Hong H. Pham" <hong.pham@windriver.com>
+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 <hong.pham@windriver.com>
+---
+ 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
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
index 2695e6b..6f22d06 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
@@ -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"
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] two patches for alsa-lib
2013-06-17 12:33 [PATCH 0/2] two patches for alsa-lib Jesse Zhang
2013-06-17 12:33 ` [PATCH 1/2] alsa-lib: Change function type to "static __inline__" Jesse Zhang
2013-06-17 12:33 ` [PATCH 2/2] alsa-lib: check if wordexp is supported in libc Jesse Zhang
@ 2013-06-17 12:35 ` Paul Eggleton
2013-06-17 12:42 ` Jesse Zhang
2 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2013-06-17 12:35 UTC (permalink / raw)
To: Jesse Zhang; +Cc: openembedded-core
Hi Jesse,
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-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-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
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] two patches for alsa-lib
2013-06-17 12:35 ` [PATCH 0/2] two patches for alsa-lib Paul Eggleton
@ 2013-06-17 12:42 ` Jesse Zhang
0 siblings, 0 replies; 5+ messages in thread
From: Jesse Zhang @ 2013-06-17 12:42 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-core
Sure. I've updated my branch in poky-contrib.
jesse
On 06/17/2013 08:35 PM, Paul Eggleton wrote:
> Hi Jesse,
>
> 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-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-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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-17 12:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 12:33 [PATCH 0/2] two patches for alsa-lib Jesse Zhang
2013-06-17 12:33 ` [PATCH 1/2] alsa-lib: Change function type to "static __inline__" Jesse Zhang
2013-06-17 12:33 ` [PATCH 2/2] alsa-lib: check if wordexp is supported in libc Jesse Zhang
2013-06-17 12:35 ` [PATCH 0/2] two patches for alsa-lib Paul Eggleton
2013-06-17 12:42 ` Jesse Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox