From baa969b06a9acc7b97874406a98e4d8a500f1331 Mon Sep 17 00:00:00 2001 From: YukariChiba Date: Fri, 31 Mar 2023 21:40:25 +0800 Subject: [PATCH] Add RISC-V arch support --- add-riscv64-arch.patch | 27 +++++++++++++++++++++++++++ libvpx.spec | 10 +++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 add-riscv64-arch.patch diff --git a/add-riscv64-arch.patch b/add-riscv64-arch.patch new file mode 100644 index 0000000..914eeb6 --- /dev/null +++ b/add-riscv64-arch.patch @@ -0,0 +1,27 @@ +diff --git a/build/make/configure.sh b/build/make/configure.sh +index 581042e..56a67d1 100644 +--- a/build/make/configure.sh ++++ b/build/make/configure.sh +@@ -783,6 +783,10 @@ process_common_toolchain() { + loongarch64*) + tgt_isa=loongarch64 + ;; ++ riscv64*) ++ tgt_isa=riscv64 ++ ;; ++ + esac + + # detect tgt_os +diff --git a/configure b/configure +index beea650..51e19e4 100755 +--- a/configure ++++ b/configure +@@ -119,6 +119,7 @@ all_platforms="${all_platforms} loongarch64-linux-gcc" + all_platforms="${all_platforms} mips32-linux-gcc" + all_platforms="${all_platforms} mips64-linux-gcc" + all_platforms="${all_platforms} ppc64le-linux-gcc" ++all_platforms="${all_platforms} riscv64-linux-gcc" + all_platforms="${all_platforms} sparc-solaris-gcc" + all_platforms="${all_platforms} x86-android-gcc" + all_platforms="${all_platforms} x86-darwin8-gcc" diff --git a/libvpx.spec b/libvpx.spec index e8c5bd5..09d645b 100644 --- a/libvpx.spec +++ b/libvpx.spec @@ -1,9 +1,10 @@ Name: libvpx Version: 1.12.0 -Release: 2 +Release: 3 Summary: VP8/VP9 Video Codec SDK License: BSD Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz +Patch0: add-riscv64-arch.patch URL: http://www.webmproject.org/code/ BuildRequires: gcc gcc-c++ doxygen, php-cli, perl(Getopt::Long) %ifarch x86_64 @@ -34,9 +35,13 @@ Development libraries and headers for developing software against libvpx. %ifarch aarch64 %global vpxtarget arm64-linux-gcc %else +%ifarch riscv64 +%global vpxtarget riscv64-linux-gcc +%else %global vpxtarget generic-gnu %endif %endif +%endif %set_build_flags @@ -105,6 +110,9 @@ mv %{buildroot}%{_prefix}/src/vpx_scale %{buildroot}%{_includedir}/ %{_libdir}/libvpx.so %changelog +* Wed May 17 2023 laokz - 1.12.0-3 +- Add RISC-V arch support authored-by: YukariChiba + * Mon May 8 2023 Wenlong Zhang - 1.12.0-2 - fix build error for loongarch64 -- Gitee