aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/sbc-fix-build-non-x86.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-12-21 23:38:22 +0100
committerMarius Bakke <marius@gnu.org>2020-12-21 23:38:22 +0100
commit85ba5e9335207beef9a650e96d5d64787beb9256 (patch)
tree640dfe16f0c9b7f1aba41ec9307af1854fa3ba26 /gnu/packages/patches/sbc-fix-build-non-x86.patch
parent166472e2c8535e5b5e19e34aeaa0f84cb978b4e3 (diff)
downloadguix-85ba5e9335207beef9a650e96d5d64787beb9256.tar.gz
guix-85ba5e9335207beef9a650e96d5d64787beb9256.zip
gnu: sbc: Fix build on non-x86 architectures.
* gnu/packages/patches/sbc-fix-build-non-x86.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/linux.scm (sbc)[source](patches): New field.
Diffstat (limited to 'gnu/packages/patches/sbc-fix-build-non-x86.patch')
-rw-r--r--gnu/packages/patches/sbc-fix-build-non-x86.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/packages/patches/sbc-fix-build-non-x86.patch b/gnu/packages/patches/sbc-fix-build-non-x86.patch
new file mode 100644
index 0000000000..56ea916d42
--- /dev/null
+++ b/gnu/packages/patches/sbc-fix-build-non-x86.patch
@@ -0,0 +1,17 @@
+Don't refer to x86-specific function on other architectures to avoid linker error.
+
+Submitted upstream at <https://marc.info/?l=linux-bluetooth&m=160857625608440&w=2>
+
+diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c
+--- a/sbc/sbc_primitives.c
++++ b/sbc/sbc_primitives.c
+@@ -593,7 +593,9 @@ static int sbc_calc_scalefactors_j(
+
+ static void sbc_init_primitives_x86(struct sbc_encoder_state *state)
+ {
++#if defined(__x86_64__) || defined(__i386__)
+ __builtin_cpu_init();
++#endif
+
+ #ifdef SBC_BUILD_WITH_MMX_SUPPORT
+ if (__builtin_cpu_supports("mmx"))