summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch45
-rw-r--r--meta/recipes-multimedia/sbc/sbc_1.5.bb (renamed from meta/recipes-multimedia/sbc/sbc_1.4.bb)7
2 files changed, 49 insertions, 3 deletions
diff --git a/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch b/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch
new file mode 100644
index 0000000000..11cec74fbb
--- /dev/null
+++ b/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch
@@ -0,0 +1,45 @@
1From f4a1224323e386090a44bf70ee0ac9877ba7fb0d Mon Sep 17 00:00:00 2001
2From: Marius Bakke <marius@gnu.org>
3Date: Tue, 22 Dec 2020 11:04:26 +0000
4Subject: [PATCH] sbc_primitives: Fix build on non-x86.
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Don't call __builtin_cpu_init unless targeting i386 or x86_64.
10Otherwise we get an error at link time:
11
12 CC sbc/sbc_primitives.lo
13sbc/sbc_primitives.c: In function ‘sbc_init_primitives_x86’:
14sbc/sbc_primitives.c:596:2: warning: implicit declaration of function ‘__builtin_cpu_init’; did you mean ‘__builtin_irint’? [-Wimplicit-function-declaration]
15[...]
16 CCLD src/sbcdec
17ld: sbc/.libs/libsbc-private.a(sbc_primitives.o): in function `sbc_init_primitives':
18sbc_primitives.c:(.text+0x3a30): undefined reference to `__builtin_cpu_init'
19
20Upstream-Status: Backport
21Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
22---
23 sbc/sbc_primitives.c | 2 ++
24 1 file changed, 2 insertions(+)
25
26diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c
27index 97a75be..09c214a 100644
28--- a/sbc/sbc_primitives.c
29+++ b/sbc/sbc_primitives.c
30@@ -593,6 +593,7 @@ static int sbc_calc_scalefactors_j(
31
32 static void sbc_init_primitives_x86(struct sbc_encoder_state *state)
33 {
34+#if defined(__x86_64__) || defined(__i386__)
35 __builtin_cpu_init();
36
37 #ifdef SBC_BUILD_WITH_MMX_SUPPORT
38@@ -604,6 +605,7 @@ static void sbc_init_primitives_x86(struct sbc_encoder_state *state)
39 if (__builtin_cpu_supports("sse4.2"))
40 sbc_init_primitives_sse(state);
41 #endif
42+#endif
43 }
44
45 /*
diff --git a/meta/recipes-multimedia/sbc/sbc_1.4.bb b/meta/recipes-multimedia/sbc/sbc_1.5.bb
index 674d77ef48..04d82320c9 100644
--- a/meta/recipes-multimedia/sbc/sbc_1.4.bb
+++ b/meta/recipes-multimedia/sbc/sbc_1.5.bb
@@ -12,10 +12,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
12 12
13DEPENDS = "libsndfile1" 13DEPENDS = "libsndfile1"
14 14
15SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz" 15SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz \
16 file://0001-sbc_primitives-Fix-build-on-non-x86.patch \
17 "
16 18
17SRC_URI[md5sum] = "800fb0908899baa48dc216d8e156cc05" 19SRC_URI[sha256sum] = "0cbad69823a99e8421fe0700e8cf9eeb8fa0c1ad28e8dbc2182b3353507931d2"
18SRC_URI[sha256sum] = "518bf46e6bb3dc808a95e1eabad26fdebe8a099c1e781c27ed7fca6c2f4a54c9"
19 20
20inherit autotools pkgconfig 21inherit autotools pkgconfig
21 22