All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix alsa-lib compiles fails on mips
@ 2013-08-22  9:59 Kai Kang
  2013-08-22  9:59 ` [PATCH 1/1] alsa-lib: fix function definitions error for mips Kai Kang
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Kang @ 2013-08-22  9:59 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit b2ff1add530b1fec2fb7f385227a03db47015c37:

  poky.conf: Don't force the addition of extra DISTRO_FEATURES (2013-08-20 22:58:04 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/alsa-lib
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/alsa-lib

Kai Kang (1):
  alsa-lib: fix function definitions error for mips

 ...-iatomic.h-functions-definitions-for-mips.patch | 68 ++++++++++++++++++++++
 meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb  |  1 +
 2 files changed, 69 insertions(+)
 create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch

-- 
1.8.1.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] alsa-lib: fix function definitions error for mips
  2013-08-22  9:59 [PATCH 0/1] Fix alsa-lib compiles fails on mips Kai Kang
@ 2013-08-22  9:59 ` Kai Kang
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Kang @ 2013-08-22  9:59 UTC (permalink / raw)
  To: openembedded-core

Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
__inline__' that may cause compile fails when cross compile for mips.
The error message looks like:

| pcm/.libs/libpcm.a(pcm_meter.o): In function
`snd_pcm_meter_update_scope':
| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to
`atomic_sub'

Replace the 'extern __inline__' with 'static __inline__' to fix this
issue.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 ...-iatomic.h-functions-definitions-for-mips.patch | 68 ++++++++++++++++++++++
 meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb  |  1 +
 2 files changed, 69 insertions(+)
 create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch

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 0000000..f1a7947
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch
@@ -0,0 +1,68 @@
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001
+From: Kai Kang <jiashuo.kang at gmail.com>
+Date: Thu, 15 Aug 2013 17:17:19 +0800
+Subject: [PATCH] Update iatomic.h functions definitions for mips
+
+Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
+__inline__' that may cause compile fails when cross compile for mips.
+The error message looks like:
+
+| pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope':
+| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub'
+
+Replace the 'extern __inline__' with 'static __inline__' to fix this
+issue.
+
+Signed-off-by: Kai Kang <jiashuo.kang at gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ include/iatomic.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/iatomic.h b/include/iatomic.h
+index 5711fe8..2393297 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.8.1.2
+
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 5455944..0e1ea76 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"
 SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
            file://Check-if-wordexp-function-is-supported.patch \
            file://fix-tstamp-declaration.patch \
+           file://Update-iatomic.h-functions-definitions-for-mips.patch \
           "
 SRC_URI[md5sum] = "69129a7c37697f81ac092335e9fa452b"
 SRC_URI[sha256sum] = "690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19"
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-22  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22  9:59 [PATCH 0/1] Fix alsa-lib compiles fails on mips Kai Kang
2013-08-22  9:59 ` [PATCH 1/1] alsa-lib: fix function definitions error for mips Kai Kang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.