!6 增加riscv构建支持

From: @laokz 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-05-25 03:13:43 +00:00 committed by Gitee
commit 9ba0214751
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 36 additions and 1 deletions

27
add-riscv64-arch.patch Normal file
View File

@ -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"

View File

@ -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 <zhangkai@iscas.ac.cn> - 1.12.0-3
- Add RISC-V arch support authored-by: YukariChiba <i@0x7f.cc>
* Mon May 8 2023 Wenlong Zhang <zhangwenlong@loongson.cn> - 1.12.0-2
- fix build error for loongarch64