From a42effa4b5f02002d4765566a4103b58865197b5 Mon Sep 17 00:00:00 2001 From: cherry530 Date: Wed, 20 Apr 2022 10:21:01 +0800 Subject: [PATCH] fix build error for supportloongarch Signed-off-by: cherry530 --- Add-loongarch64.patch | 13 +++++++++++++ libjpeg-turbo.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Add-loongarch64.patch diff --git a/Add-loongarch64.patch b/Add-loongarch64.patch new file mode 100644 index 0000000..8486c7d --- /dev/null +++ b/Add-loongarch64.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c01ec25..39e72d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -927,7 +927,7 @@ if(CPU_TYPE STREQUAL "x86_64" OR CPU_TYPE STREQUAL "i386") + # manually. + endif() + else() +- if((CPU_TYPE STREQUAL "powerpc" OR CPU_TYPE STREQUAL "arm64") AND ++ if((CPU_TYPE STREQUAL "powerpc" OR CPU_TYPE STREQUAL "arm64" OR CPU_TYPE STREQUAL "loongarch64") AND + NOT CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT MSVC) + set(DEFAULT_FLOATTEST fp-contract) + else() diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index a9adf43..7f4e66c 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -1,11 +1,13 @@ Name: libjpeg-turbo Version: 2.1.1 -Release: 2 +Release: 3 Summary: MMX/SSE2/SIMD accelerated libjpeg-compatible JPEG codec library License: IJG URL: http://sourceforge.net/projects/libjpeg-turbo Source0: http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz +Patch0000: Add-loongarch64.patch + BuildRequires: gcc cmake libtool nasm Obsoletes: libjpeg < 6b-47 turbojpeg < %{version}-%{release} @@ -144,6 +146,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test %{?_smp_mflags} %{_mandir}/man1/*.1* %changelog +* Wed Apr 20 2022 xu_ping - 2.1.1-3 +- fix build error for support loongarch + * Wed Mar 30 2022 liuyumeng - 2.1.1-2 - enable tests -- Gitee