aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/alsa/alsa-lib/fix-O0-Optimize-unable-inline-function.patch
blob: 1e43c256ad8741dae4d8162792a8a8b9e7ae95bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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.

Upstream-Status: Pending

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