From 134b71fb6aa2ed81441574cad25e4c404e625608 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Wed, 8 Feb 2023 14:17:04 +0800 Subject: [PATCH] fix build error for loongarch64 --- texlive-base.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/texlive-base.spec b/texlive-base.spec index 001ecdb..a1be0d3 100644 --- a/texlive-base.spec +++ b/texlive-base.spec @@ -4,7 +4,7 @@ Name: texlive-base Version: 20180414 -Release: 33 +Release: 34 Epoch: 7 Summary: TeX formatting system License: ASL 2.0 and LGPL-2.1-only and Zlib and OFL-1.1 and Public Domain and LGPL-2.0-only and GPLv2+ and MPL-1.1 and Libpng and LGPL-3.0-only and BSL-1.0 and GPLv2 and GPLv3 and CPL-1.0 and IJG and MIT and LPPL-1.3c and ICU and psutils @@ -5849,8 +5849,13 @@ done %global mysources %{lua: for index,value in ipairs(sources) do if index >= 16 then print(value.." ") end end} %build +%ifarch loongarch64 +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fcommon" +export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11 -fno-strict-aliasing -fcommon" +%else export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Werror=format-security -fcommon" export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11 -fno-strict-aliasing -Werror=format-security -fcommon" +%endif export LDFLAGS="%{build_ldflags}" cd source PREF=`pwd`/inst @@ -5866,7 +5871,7 @@ cd work --enable-shared --enable-compiler-warnings=max --without-cxx-runtime-hack \ --disable-native-texlive-build --disable-t1utils --disable-psutils --disable-biber --disable-ptexenc --disable-largefile \ --disable-xindy --disable-xindy-docs --disable-xindy-make-rules \ -%ifarch aarch64 +%ifarch aarch64 loongarch64 --disable-luajittex --disable-mfluajit \ %endif --disable-rpath @@ -7077,7 +7082,7 @@ done <<< "$list" %{_includedir}/synctex/ %{_includedir}/texlua52/ %{_includedir}/texlua53/ -%ifnarch aarch64 +%ifnarch aarch64 loongarch64 %{_includedir}/texluajit/ %endif %{_libdir}/*.so @@ -7146,7 +7151,7 @@ done <<< "$list" %files -n texlive-luatex %license gpl2.txt %{_bindir}/dviluatex -%ifnarch aarch64 +%ifnarch aarch64 loongarch64 %{_bindir}/luajittex %{_bindir}/texluajit %{_bindir}/texluajitc @@ -7253,7 +7258,7 @@ done <<< "$list" %license gpl2.txt %{_bindir}/mflua %{_bindir}/mflua-nowin -%ifnarch aarch64 +%ifnarch aarch64 loongarch64 %{_bindir}/mfluajit %{_bindir}/mfluajit-nowin %endif @@ -8108,6 +8113,9 @@ done <<< "$list" %doc %{_datadir}/texlive/texmf-dist/doc/latex/yplan/ %changelog +* Mon Feb 6 2023 Wenlong Zhang - 7:20180414-34 +- fix build error for loongarch64 + * Wed Jan 19 2022 xu_ping - 20180414-33 - remove useless BuildRequires poppler -- Gitee