diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing')
4 files changed, 33 insertions, 155 deletions
diff --git a/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch b/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch deleted file mode 100644 index 7668df35..00000000 --- a/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4945dca11bc4ddec60bd858f45212dc8f39638e0 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne <nicolas.dufresne@collabora.com> -Date: Tue, 5 Jul 2016 18:07:45 -0400 -Subject: [PATCH 1/6] build: Protect against unsupported CPU types - -Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> -Upstream-Status: Accepted [expected in 0.4] ---- - configure.ac | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 6f9553b..f5304b8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -70,8 +70,9 @@ AS_CASE(["${host_cpu}"], - [ - HAVE_ARM=1 - ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" -- ] -+ ], - # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines -+ [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] - ) - AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"]) - AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"]) --- -2.11.0 - diff --git a/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch b/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch deleted file mode 100644 index 2e202b03..00000000 --- a/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b5bda3431159b6505dcd069641c863018c4d4309 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne <nicolas.dufresne@collabora.com> -Date: Wed, 6 Jul 2016 15:18:15 -0400 -Subject: [PATCH 2/6] build: Add ARM 64bit support - -Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> -Upstream-Status: Accepted [expected in 0.4] ---- - configure.ac | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/configure.ac b/configure.ac -index f5304b8..be20514 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -71,6 +71,11 @@ AS_CASE(["${host_cpu}"], - HAVE_ARM=1 - ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" - ], -+ [aarch64*], -+ [ -+ HAVE_NEON=1 -+ ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64" -+ ], - # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines - [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] - ) --- -2.11.0 - diff --git a/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch b/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch deleted file mode 100644 index 82e270fa..00000000 --- a/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 7722fb8a3189fea0f6381f02a0e4f63c847f0393 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> -Date: Sat, 6 Aug 2016 11:02:43 +0200 -Subject: [PATCH 3/6] build: fix architecture detection - -The current architecture detection, based on the "host_cpu" part of the -tuple does not work properly for a number of reason: - - - The code assumes that if host_cpu starts with "arm" then ARM - instructions are available, which is incorrect. Indeed, Cortex-M - platforms can run Linux, they are ARM platforms (so host_cpu = arm), - but they don't support ARM instructions: they support only the - Thumb-2 instruction set. - - - The armv7 case is also not very useful, as it is not standard at all - to pass armv7 as host_cpu even if the host system is actually ARMv7 - based. - - - For the same reason, the armv8 case is not very useful: ARMv8 is - AArch64, and there is already a separate case to handle this - architecture. - -So, this commit moves away from a host_cpu based logic, and instead -tests using AC_CHECK_DECLS() the built-in definitions of the compiler: - - - If we have __ARM_ARCH_ISA_ARM defined, then it's an ARM processor - that supports the ARM instruction set (this allows to exclude Thumb-2 - only processors). - - - If we have __ARM_ARCH_7A__, then we have an ARMv7-A processor, and - we can enable the corresponding optimizations - - - Same for __aarch64__, __i386__ and __x86_64__. - -In addition, we remove the AC_MSG_ERROR() that makes the build fail for -all architectures but the ones that are explicitly supported. Indeed, -webrtc-audio-processing builds just fine for other architectures (tested -on MIPS), it's just that none of the architecture-specific optimizations -will be used. - -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> -Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> -Upstream-Status: Accepted [expected in 0.4] ---- - configure.ac | 35 +++++++++++------------------------ - 1 file changed, 11 insertions(+), 24 deletions(-) - -diff --git a/configure.ac b/configure.ac -index be20514..e898014 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -55,30 +55,17 @@ AS_CASE(["${host}"], - ) - AC_SUBST(PLATFORM_CFLAGS) - --AS_CASE(["${host_cpu}"], -- [i?86|x86_64], -- [ -- HAVE_X86=1 -- ], -- [armv7*|armv8*], -- [ -- HAVE_ARM=1 -- HAVE_ARMV7=1 -- ARCH_CFLAGS="-DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7" -- ], -- [arm*], -- [ -- HAVE_ARM=1 -- ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" -- ], -- [aarch64*], -- [ -- HAVE_NEON=1 -- ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64" -- ], -- # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines -- [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] --) -+# Testing __ARM_ARCH_ISA_ARM since the code contains ARM instructions, -+# which don't work on Thumb-2 only platforms (ARMv7-M). -+AC_CHECK_DECLS([__ARM_ARCH_ISA_ARM], -+ [HAVE_ARM=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM"]) -+AC_CHECK_DECLS([__ARM_ARCH_7A__], -+ [HAVE_ARMV7=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM_V7"]) -+AC_CHECK_DECLS([__aarch64__], -+ [HAVE_NEON=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"]) -+AC_CHECK_DECLS([__i386__], [HAVE_X86=1]) -+AC_CHECK_DECLS([__x86_64__], [HAVE_X86=1]) -+ - AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"]) - AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"]) - AM_CONDITIONAL(HAVE_ARMV7, [test "x${HAVE_ARMV7}" = "x1"]) --- -2.11.0 - diff --git a/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/riscv_support.patch b/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/riscv_support.patch new file mode 100644 index 00000000..576b9860 --- /dev/null +++ b/external/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/riscv_support.patch @@ -0,0 +1,33 @@ +Add support for RISC-V + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/webrtc/base/basictypes.h ++++ b/webrtc/base/basictypes.h +@@ -29,6 +29,10 @@ + #define CPU_ARM 1 + #endif + ++#if defined(__riscv) || defined(_M_RISCV) ++#define CPU_RISCV 1 ++#endif ++ + #if defined(CPU_X86) && defined(CPU_ARM) + #error CPU_X86 and CPU_ARM both defined. + #endif +--- a/webrtc/typedefs.h ++++ b/webrtc/typedefs.h +@@ -56,6 +56,13 @@ + #elif defined(__powerpc__) + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_BIG_ENDIAN ++#elif defined(__riscv) ++#if __riscv_xlen == 64 ++# define WEBRTC_ARCH_64_BITS ++#else ++# define WEBRTC_ARCH_32_BITS ++#endif ++#define WEBRTC_ARCH_LITTLE_ENDIAN + #elif defined(__pnacl__) + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN |