diff mbox series

[oe,meta-multimedia,09/12] webrtc-audio-processing: Add support for risc-v

Message ID 20190306054548.16430-9-raj.khem@gmail.com
State Accepted
Commit 85c702f8b2a4e68724678f6a99c79b53d920353b
Headers show
Series [oe,meta-oe,01/12] poco: Backport riscv support patch | expand

Commit Message

Khem Raj March 6, 2019, 5:45 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../riscv_support.patch                       | 33 +++++++++++++++++++
 .../webrtc-audio-processing_0.3.bb            |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/riscv_support.patch

-- 
2.21.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/riscv_support.patch b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/riscv_support.patch
new file mode 100644
index 0000000000..576b9860a8
--- /dev/null
+++ b/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
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.bb
index 2b0f7c6840..dbba2f488c 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.bb
@@ -19,6 +19,7 @@  SRC_URI = "http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/${
            file://0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch \
            file://0005-typedefs.h-add-support-for-PowerPC.patch \
            file://0006-common_audio-implement-endianness-conversion-in-wav-.patch \
+           file://riscv_support.patch \
 "
 
 SRC_URI[md5sum] = "336ae032f608e65808ac577cde0ab72c"