diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch | 29 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch | 30 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch | 96 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.1.bb (renamed from meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb) | 12 |
4 files changed, 3 insertions, 164 deletions
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch deleted file mode 100644 index 7668df35d7..0000000000 --- a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | From 4945dca11bc4ddec60bd858f45212dc8f39638e0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nicolas Dufresne <nicolas.dufresne@collabora.com> | ||
| 3 | Date: Tue, 5 Jul 2016 18:07:45 -0400 | ||
| 4 | Subject: [PATCH 1/6] build: Protect against unsupported CPU types | ||
| 5 | |||
| 6 | Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> | ||
| 7 | Upstream-Status: Accepted [expected in 0.4] | ||
| 8 | --- | ||
| 9 | configure.ac | 3 ++- | ||
| 10 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/configure.ac b/configure.ac | ||
| 13 | index 6f9553b..f5304b8 100644 | ||
| 14 | --- a/configure.ac | ||
| 15 | +++ b/configure.ac | ||
| 16 | @@ -70,8 +70,9 @@ AS_CASE(["${host_cpu}"], | ||
| 17 | [ | ||
| 18 | HAVE_ARM=1 | ||
| 19 | ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" | ||
| 20 | - ] | ||
| 21 | + ], | ||
| 22 | # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines | ||
| 23 | + [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] | ||
| 24 | ) | ||
| 25 | AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"]) | ||
| 26 | AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"]) | ||
| 27 | -- | ||
| 28 | 2.11.0 | ||
| 29 | |||
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch deleted file mode 100644 index 2e202b03c1..0000000000 --- a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | From b5bda3431159b6505dcd069641c863018c4d4309 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nicolas Dufresne <nicolas.dufresne@collabora.com> | ||
| 3 | Date: Wed, 6 Jul 2016 15:18:15 -0400 | ||
| 4 | Subject: [PATCH 2/6] build: Add ARM 64bit support | ||
| 5 | |||
| 6 | Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> | ||
| 7 | Upstream-Status: Accepted [expected in 0.4] | ||
| 8 | --- | ||
| 9 | configure.ac | 5 +++++ | ||
| 10 | 1 file changed, 5 insertions(+) | ||
| 11 | |||
| 12 | diff --git a/configure.ac b/configure.ac | ||
| 13 | index f5304b8..be20514 100644 | ||
| 14 | --- a/configure.ac | ||
| 15 | +++ b/configure.ac | ||
| 16 | @@ -71,6 +71,11 @@ AS_CASE(["${host_cpu}"], | ||
| 17 | HAVE_ARM=1 | ||
| 18 | ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" | ||
| 19 | ], | ||
| 20 | + [aarch64*], | ||
| 21 | + [ | ||
| 22 | + HAVE_NEON=1 | ||
| 23 | + ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64" | ||
| 24 | + ], | ||
| 25 | # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines | ||
| 26 | [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] | ||
| 27 | ) | ||
| 28 | -- | ||
| 29 | 2.11.0 | ||
| 30 | |||
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch deleted file mode 100644 index 82e270fac1..0000000000 --- a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch +++ /dev/null | |||
| @@ -1,96 +0,0 @@ | |||
| 1 | From 7722fb8a3189fea0f6381f02a0e4f63c847f0393 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 3 | Date: Sat, 6 Aug 2016 11:02:43 +0200 | ||
| 4 | Subject: [PATCH 3/6] build: fix architecture detection | ||
| 5 | |||
| 6 | The current architecture detection, based on the "host_cpu" part of the | ||
| 7 | tuple does not work properly for a number of reason: | ||
| 8 | |||
| 9 | - The code assumes that if host_cpu starts with "arm" then ARM | ||
| 10 | instructions are available, which is incorrect. Indeed, Cortex-M | ||
| 11 | platforms can run Linux, they are ARM platforms (so host_cpu = arm), | ||
| 12 | but they don't support ARM instructions: they support only the | ||
| 13 | Thumb-2 instruction set. | ||
| 14 | |||
| 15 | - The armv7 case is also not very useful, as it is not standard at all | ||
| 16 | to pass armv7 as host_cpu even if the host system is actually ARMv7 | ||
| 17 | based. | ||
| 18 | |||
| 19 | - For the same reason, the armv8 case is not very useful: ARMv8 is | ||
| 20 | AArch64, and there is already a separate case to handle this | ||
| 21 | architecture. | ||
| 22 | |||
| 23 | So, this commit moves away from a host_cpu based logic, and instead | ||
| 24 | tests using AC_CHECK_DECLS() the built-in definitions of the compiler: | ||
| 25 | |||
| 26 | - If we have __ARM_ARCH_ISA_ARM defined, then it's an ARM processor | ||
| 27 | that supports the ARM instruction set (this allows to exclude Thumb-2 | ||
| 28 | only processors). | ||
| 29 | |||
| 30 | - If we have __ARM_ARCH_7A__, then we have an ARMv7-A processor, and | ||
| 31 | we can enable the corresponding optimizations | ||
| 32 | |||
| 33 | - Same for __aarch64__, __i386__ and __x86_64__. | ||
| 34 | |||
| 35 | In addition, we remove the AC_MSG_ERROR() that makes the build fail for | ||
| 36 | all architectures but the ones that are explicitly supported. Indeed, | ||
| 37 | webrtc-audio-processing builds just fine for other architectures (tested | ||
| 38 | on MIPS), it's just that none of the architecture-specific optimizations | ||
| 39 | will be used. | ||
| 40 | |||
| 41 | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 42 | Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> | ||
| 43 | Upstream-Status: Accepted [expected in 0.4] | ||
| 44 | --- | ||
| 45 | configure.ac | 35 +++++++++++------------------------ | ||
| 46 | 1 file changed, 11 insertions(+), 24 deletions(-) | ||
| 47 | |||
| 48 | diff --git a/configure.ac b/configure.ac | ||
| 49 | index be20514..e898014 100644 | ||
| 50 | --- a/configure.ac | ||
| 51 | +++ b/configure.ac | ||
| 52 | @@ -55,30 +55,17 @@ AS_CASE(["${host}"], | ||
| 53 | ) | ||
| 54 | AC_SUBST(PLATFORM_CFLAGS) | ||
| 55 | |||
| 56 | -AS_CASE(["${host_cpu}"], | ||
| 57 | - [i?86|x86_64], | ||
| 58 | - [ | ||
| 59 | - HAVE_X86=1 | ||
| 60 | - ], | ||
| 61 | - [armv7*|armv8*], | ||
| 62 | - [ | ||
| 63 | - HAVE_ARM=1 | ||
| 64 | - HAVE_ARMV7=1 | ||
| 65 | - ARCH_CFLAGS="-DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7" | ||
| 66 | - ], | ||
| 67 | - [arm*], | ||
| 68 | - [ | ||
| 69 | - HAVE_ARM=1 | ||
| 70 | - ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" | ||
| 71 | - ], | ||
| 72 | - [aarch64*], | ||
| 73 | - [ | ||
| 74 | - HAVE_NEON=1 | ||
| 75 | - ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64" | ||
| 76 | - ], | ||
| 77 | - # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines | ||
| 78 | - [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] | ||
| 79 | -) | ||
| 80 | +# Testing __ARM_ARCH_ISA_ARM since the code contains ARM instructions, | ||
| 81 | +# which don't work on Thumb-2 only platforms (ARMv7-M). | ||
| 82 | +AC_CHECK_DECLS([__ARM_ARCH_ISA_ARM], | ||
| 83 | + [HAVE_ARM=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM"]) | ||
| 84 | +AC_CHECK_DECLS([__ARM_ARCH_7A__], | ||
| 85 | + [HAVE_ARMV7=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM_V7"]) | ||
| 86 | +AC_CHECK_DECLS([__aarch64__], | ||
| 87 | + [HAVE_NEON=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"]) | ||
| 88 | +AC_CHECK_DECLS([__i386__], [HAVE_X86=1]) | ||
| 89 | +AC_CHECK_DECLS([__x86_64__], [HAVE_X86=1]) | ||
| 90 | + | ||
| 91 | AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"]) | ||
| 92 | AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"]) | ||
| 93 | AM_CONDITIONAL(HAVE_ARMV7, [test "x${HAVE_ARMV7}" = "x1"]) | ||
| 94 | -- | ||
| 95 | 2.11.0 | ||
| 96 | |||
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.1.bb index dbba2f488c..b94dcf9f18 100644 --- a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb +++ b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.1.bb | |||
| @@ -9,21 +9,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=da08a38a32a340c5d91e13ee86a118f2 \ | |||
| 9 | file://webrtc/common.h;beginline=1;endline=9;md5=41f7322d91deabaf0acbbd0b8d0bc548 \ | 9 | file://webrtc/common.h;beginline=1;endline=9;md5=41f7322d91deabaf0acbbd0b8d0bc548 \ |
| 10 | " | 10 | " |
| 11 | 11 | ||
| 12 | # Note that patch 3 effectively reverts patches 1 and 2. The only reason | ||
| 13 | # why patches 1 and 2 are included is that otherwise patch 3 wouldn't | ||
| 14 | # apply cleanly. | ||
| 15 | SRC_URI = "http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/${BP}.tar.xz \ | 12 | SRC_URI = "http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/${BP}.tar.xz \ |
| 16 | file://0001-build-Protect-against-unsupported-CPU-types.patch \ | ||
| 17 | file://0002-build-Add-ARM-64bit-support.patch \ | ||
| 18 | file://0003-build-fix-architecture-detection.patch \ | ||
| 19 | file://0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch \ | 13 | file://0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch \ |
| 20 | file://0005-typedefs.h-add-support-for-PowerPC.patch \ | 14 | file://0005-typedefs.h-add-support-for-PowerPC.patch \ |
| 21 | file://0006-common_audio-implement-endianness-conversion-in-wav-.patch \ | 15 | file://0006-common_audio-implement-endianness-conversion-in-wav-.patch \ |
| 22 | file://riscv_support.patch \ | 16 | file://riscv_support.patch \ |
| 23 | " | 17 | " |
| 24 | 18 | ||
| 25 | SRC_URI[md5sum] = "336ae032f608e65808ac577cde0ab72c" | 19 | SRC_URI[md5sum] = "6e10724ca34bcbc715a4c208273acb0c" |
| 26 | SRC_URI[sha256sum] = "756e291d4f557d88cd50c4fe3b8454ec238362d22cedb3e6173240d90f0a80fa" | 20 | SRC_URI[sha256sum] = "a0fdd938fd85272d67e81572c5a4d9e200a0c104753cb3c209ded175ce3c5dbf" |
| 27 | 21 | ||
| 28 | LDFLAGS_append_libc-musl = " -lexecinfo" | 22 | LDFLAGS_append_libc-musl = " -lexecinfo" |
| 29 | inherit autotools | 23 | inherit autotools pkgconfig |
