From 0ba66b86306c5fa234e37c9de91b41f4ac33c8d7 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Sat, 13 May 2023 16:18:09 +0800 Subject: [PATCH] fix build error for loongarch64 Signed-off-by: Wenlong Zhang --- 0001-add-loongarch64-support-for-libvpx.patch | 39 +++++++++++++++++++ libvpx.spec | 10 ++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 0001-add-loongarch64-support-for-libvpx.patch diff --git a/0001-add-loongarch64-support-for-libvpx.patch b/0001-add-loongarch64-support-for-libvpx.patch new file mode 100644 index 0000000..92decac --- /dev/null +++ b/0001-add-loongarch64-support-for-libvpx.patch @@ -0,0 +1,39 @@ +From 4199e45515550f4a4c332a6bd6c0c6625cc61e3a Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Thu, 25 May 2023 02:32:01 +0000 +Subject: [PATCH] add loongarch64 support for libvpx + +--- + build/make/configure.sh | 3 +++ + configure | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/build/make/configure.sh b/build/make/configure.sh +index 683b430..e11a6e2 100644 +--- a/build/make/configure.sh ++++ b/build/make/configure.sh +@@ -725,6 +725,9 @@ process_common_toolchain() { + *mips32el*) + tgt_isa=mips32 + ;; ++ loongarch64*) ++ tgt_isa=loongarch64 ++ ;; + esac + + # detect tgt_os +diff --git a/configure b/configure +index e5a74c6..b0f0854 100755 +--- a/configure ++++ b/configure +@@ -159,6 +159,7 @@ all_platforms="${all_platforms} x86_64-win64-vs11" + all_platforms="${all_platforms} x86_64-win64-vs12" + all_platforms="${all_platforms} x86_64-win64-vs14" + all_platforms="${all_platforms} x86_64-win64-vs15" ++all_platforms="${all_platforms} loongarch64-linux-gcc" + all_platforms="${all_platforms} generic-gnu" + + # all_targets is a list of all targets that can be configured +-- +2.33.0 + diff --git a/libvpx.spec b/libvpx.spec index a9203b4..ba0ac1e 100644 --- a/libvpx.spec +++ b/libvpx.spec @@ -1,10 +1,11 @@ Name: libvpx Version: 1.7.0 -Release: 8 +Release: 9 Summary: VP8/VP9 Video Codec SDK License: BSD Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz URL: http://www.webmproject.org/code/ +Patch01: 0001-add-loongarch64-support-for-libvpx.patch BuildRequires: gcc gcc-c++ doxygen, php-cli, perl(Getopt::Long) %ifarch x86_64 BuildRequires: yasm @@ -33,6 +34,10 @@ Development libraries and headers for developing software against libvpx. %else %ifarch aarch64 %global vpxtarget arm64-linux-gcc +%else +%ifarch loongarch64 +%global vpxtarget loongarch64-linux-gcc +%endif %endif %endif %set_build_flags @@ -102,6 +107,9 @@ mv %{buildroot}%{_prefix}/src/vpx_scale %{buildroot}%{_includedir}/ %{_libdir}/libvpx.so %changelog +* Mon May 8 2023 Wenlong Zhang - 1.7.0-9 +- fix build error for loongarch64 + * Fri Nov 08 2019 Lijin Yang -1.7.0-8 - Pakcage init -- Gitee