summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/pulseaudio
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-04-30 15:52:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-09 21:42:50 +0100
commitf92f71c471c7e97e679d48edd52f07deb3d6282e (patch)
tree68dc4f017b00b57abf7acde8d655bc1fe337764b /meta/recipes-multimedia/pulseaudio
parentbc84461b32aa4f96a83a89c8da993e731b1ea8fd (diff)
downloadpoky-f92f71c471c7e97e679d48edd52f07deb3d6282e.tar.gz
libatomics-ops: Make it build for SH4
(From OE-Core rev: 0023aa21687287754c972c5e8edd527822e4e7c0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio')
-rw-r--r--meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/sh4-atomic-ops.patch70
-rw-r--r--meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb6
2 files changed, 74 insertions, 2 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/sh4-atomic-ops.patch b/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/sh4-atomic-ops.patch
new file mode 100644
index 0000000000..dfdd29cad5
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/sh4-atomic-ops.patch
@@ -0,0 +1,70 @@
1This patch is taken from Gentoo
2http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch?revision=1.1&view=markup
3
4Upstream-Status: Pending
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: libatomic_ops-1.2/src/atomic_ops.h
8===================================================================
9--- libatomic_ops-1.2.orig/src/atomic_ops.h 2012-04-30 13:56:17.000000000 -0700
10+++ libatomic_ops-1.2/src/atomic_ops.h 2012-04-30 13:58:28.747602349 -0700
11@@ -223,6 +223,10 @@
12 # if defined(__mips__)
13 # include "atomic_ops/sysdeps/gcc/mips.h"
14 # endif
15+# if defined(__sh__) || defined(SH4)
16+# include "atomic_ops/sysdeps/gcc/sh.h"
17+# define AO_CAN_EMUL_CAS
18+# endif /* __sh__ */
19 #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
20
21 #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
22Index: libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am
23===================================================================
24--- libatomic_ops-1.2.orig/src/atomic_ops/sysdeps/Makefile.am 2012-04-30 10:52:18.000000000 -0700
25+++ libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am 2012-04-30 14:00:11.511609965 -0700
26@@ -28,7 +28,7 @@
27 gcc/powerpc.h gcc/sparc.h \
28 gcc/hppa.h gcc/m68k.h gcc/s390.h \
29 gcc/ia64.h gcc/x86_64.h gcc/cris.h \
30- gcc/mips.h \
31+ gcc/mips.h gcc/sh.h \
32 \
33 icc/ia64.h \
34 \
35Index: libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sh.h
36===================================================================
37--- /dev/null 1970-01-01 00:00:00.000000000 +0000
38+++ libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sh.h 2012-04-30 13:58:28.755602350 -0700
39@@ -0,0 +1,31 @@
40+/*
41+ * Copyright (c) 2009 by Takashi YOSHII. All rights reserved.
42+ *
43+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
44+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
45+ *
46+ * Permission is hereby granted to use or copy this program
47+ * for any purpose, provided the above notices are retained on all copies.
48+ * Permission to modify the code and to distribute modified code is granted,
49+ * provided the above notices are retained, and a notice that the code was
50+ * modified is included with the above copyright notice.
51+ */
52+
53+#include "../all_atomic_load_store.h"
54+#include "../ordered.h"
55+
56+/* sh has tas.b(byte) only */
57+#include "../test_and_set_t_is_char.h"
58+
59+AO_INLINE AO_TS_VAL_t
60+AO_test_and_set_full(volatile AO_TS_t *addr)
61+{
62+ int oldval;
63+ __asm__ __volatile__(
64+ "tas.b @%1; movt %0"
65+ : "=r" (oldval)
66+ : "r" (addr)
67+ : "t", "memory");
68+ return oldval? AO_TS_CLEAR : AO_TS_SET;
69+}
70+#define AO_HAVE_test_and_set_full
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb
index d0162e67b0..eba43cd216 100644
--- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb
+++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb
@@ -6,13 +6,15 @@ LICENSE = "GPLv2 & MIT"
6LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ 6LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab \ 7 file://doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab \
8 " 8 "
9PR = "r9" 9PR = "r10"
10 10
11SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ 11SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \
12 file://fedora/libatomic_ops-1.2-ppclwzfix.patch \ 12 file://fedora/libatomic_ops-1.2-ppclwzfix.patch \
13 file://gentoo/libatomic_ops-1.2-mips.patch \ 13 file://gentoo/libatomic_ops-1.2-mips.patch \
14 file://doublefix.patch \ 14 file://doublefix.patch \
15 file://libatomics-ops_fix_for_x32.patch" 15 file://libatomics-ops_fix_for_x32.patch \
16 file://gentoo/sh4-atomic-ops.patch \
17 "
16 18
17SRC_URI[md5sum] = "1b65e48271c81e3fa2d7a9a69bab7504" 19SRC_URI[md5sum] = "1b65e48271c81e3fa2d7a9a69bab7504"
18SRC_URI[sha256sum] = "a3d8768aa8fd2f6ae79be2d756b3a6b48816b3889ae906be3d5ffb2de5a5c781" 20SRC_URI[sha256sum] = "a3d8768aa8fd2f6ae79be2d756b3a6b48816b3889ae906be3d5ffb2de5a5c781"