summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorJesse Zhang <sen.zhang@windriver.com>2013-06-17 12:22:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-18 17:33:14 +0100
commita40435e3397137205e169260b4463a19b5071b41 (patch)
tree7b6c11ff146fdc5a7506f4de33660db67eeef4c6 /meta/recipes-multimedia
parentc281cd149bdbce29fc69cb34c65c4295cfed2060 (diff)
downloadpoky-a40435e3397137205e169260b4463a19b5071b41.tar.gz
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. (From OE-Core rev: d0af30c92fdea6f48afb4ab1fde69f1b636e8203) Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Jesse Zhang <sen.zhang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch63
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb1
2 files changed, 64 insertions, 0 deletions
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 0000000000..1e43c256ad
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch
@@ -0,0 +1,63 @@
1Change function type from "extern __inline__" to "static __inline__"
2
3"extern __inline__ function()" is the inlined version that
4can be used in this compilation unit, but there will be another
5definition of this function somewhere, so compiler will not emit
6any code for the function body. This causes problem in -O0,
7where functions are never inlined, the function call is preserved,
8but linker can't find the symbol, thus the error happens.
9
10since no packages provide atomic_add and atomic_sub, and -O0
11Optimize is hoped to keep for debug, we can change extern to
12static to fix this problem.
13
14Upstream-Status: Pending
15
16Signed-off-by: Roy.Li <rongqing.li@windriver.com>
17---
18 include/iatomic.h | 8 ++++----
19 1 files changed, 4 insertions(+), 4 deletions(-)
20
21diff --git a/include/iatomic.h b/include/iatomic.h
22index e92dbfd..364bc5c 100644
23--- a/include/iatomic.h
24+++ b/include/iatomic.h
25@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t;
26 * Atomically adds @i to @v. Note that the guaranteed useful range
27 * of an atomic_t is only 24 bits.
28 */
29-extern __inline__ void atomic_add(int i, atomic_t * v)
30+static __inline__ void atomic_add(int i, atomic_t * v)
31 {
32 unsigned long temp;
33
34@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
35 * Atomically subtracts @i from @v. Note that the guaranteed
36 * useful range of an atomic_t is only 24 bits.
37 */
38-extern __inline__ void atomic_sub(int i, atomic_t * v)
39+static __inline__ void atomic_sub(int i, atomic_t * v)
40 {
41 unsigned long temp;
42
43@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
44 /*
45 * Same as above, but return the result value
46 */
47-extern __inline__ int atomic_add_return(int i, atomic_t * v)
48+static __inline__ int atomic_add_return(int i, atomic_t * v)
49 {
50 unsigned long temp, result;
51
52@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
53 return result;
54 }
55
56-extern __inline__ int atomic_sub_return(int i, atomic_t * v)
57+static __inline__ int atomic_sub_return(int i, atomic_t * v)
58 {
59 unsigned long temp, result;
60
61--
621.7.4.1
63
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 49f4486d62..2695e6b7a2 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"
19SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \ 19SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
20 file://fix-tstamp-declaration.patch \ 20 file://fix-tstamp-declaration.patch \
21 file://obsolete_automake_macros.patch \ 21 file://obsolete_automake_macros.patch \
22 file://fix-O0-Optimize-unable-inline-function.patch \
22 " 23 "
23SRC_URI[md5sum] = "2dfa35d28471d721e592b616beedf965" 24SRC_URI[md5sum] = "2dfa35d28471d721e592b616beedf965"
24SRC_URI[sha256sum] = "8c9f8161603cc3db640619650401292c3e110da63429ab6938aac763319f6e7d" 25SRC_URI[sha256sum] = "8c9f8161603cc3db640619650401292c3e110da63429ab6938aac763319f6e7d"