summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch68
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb1
2 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch
new file mode 100644
index 0000000000..f1a7947c2b
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch
@@ -0,0 +1,68 @@
1Upstream-Status: Backport
2
3Signed-off-by: Kai Kang <kai.kang@windriver.com>
4
5From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001
6From: Kai Kang <jiashuo.kang at gmail.com>
7Date: Thu, 15 Aug 2013 17:17:19 +0800
8Subject: [PATCH] Update iatomic.h functions definitions for mips
9
10Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
11__inline__' that may cause compile fails when cross compile for mips.
12The error message looks like:
13
14| pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope':
15| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub'
16
17Replace the 'extern __inline__' with 'static __inline__' to fix this
18issue.
19
20Signed-off-by: Kai Kang <jiashuo.kang at gmail.com>
21Signed-off-by: Takashi Iwai <tiwai@suse.de>
22---
23 include/iatomic.h | 8 ++++----
24 1 file changed, 4 insertions(+), 4 deletions(-)
25
26diff --git a/include/iatomic.h b/include/iatomic.h
27index 5711fe8..2393297 100644
28--- a/include/iatomic.h
29+++ b/include/iatomic.h
30@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t;
31 * Atomically adds @i to @v. Note that the guaranteed useful range
32 * of an atomic_t is only 24 bits.
33 */
34-extern __inline__ void atomic_add(int i, atomic_t * v)
35+static __inline__ void atomic_add(int i, atomic_t * v)
36 {
37 unsigned long temp;
38
39@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
40 * Atomically subtracts @i from @v. Note that the guaranteed
41 * useful range of an atomic_t is only 24 bits.
42 */
43-extern __inline__ void atomic_sub(int i, atomic_t * v)
44+static __inline__ void atomic_sub(int i, atomic_t * v)
45 {
46 unsigned long temp;
47
48@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
49 /*
50 * Same as above, but return the result value
51 */
52-extern __inline__ int atomic_add_return(int i, atomic_t * v)
53+static __inline__ int atomic_add_return(int i, atomic_t * v)
54 {
55 unsigned long temp, result;
56
57@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
58 return result;
59 }
60
61-extern __inline__ int atomic_sub_return(int i, atomic_t * v)
62+static __inline__ int atomic_sub_return(int i, atomic_t * v)
63 {
64 unsigned long temp, result;
65
66--
671.8.1.2
68
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb
index 545594466c..0e1ea76033 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb
@@ -17,6 +17,7 @@ ARM_INSTRUCTION_SET = "arm"
17SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \ 17SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
18 file://Check-if-wordexp-function-is-supported.patch \ 18 file://Check-if-wordexp-function-is-supported.patch \
19 file://fix-tstamp-declaration.patch \ 19 file://fix-tstamp-declaration.patch \
20 file://Update-iatomic.h-functions-definitions-for-mips.patch \
20 " 21 "
21SRC_URI[md5sum] = "69129a7c37697f81ac092335e9fa452b" 22SRC_URI[md5sum] = "69129a7c37697f81ac092335e9fa452b"
22SRC_URI[sha256sum] = "690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19" 23SRC_URI[sha256sum] = "690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19"