From d1b89c7ec2b9bb8fee3fec1f1be50ba488f32e2c Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Sat, 4 Mar 2023 14:52:01 +0800 Subject: [PATCH] fix build error for loongarch64 Signed-off-by: Wenlong Zhang --- texlive-base.spec | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/texlive-base.spec b/texlive-base.spec index af601e5..b3092af 100644 --- a/texlive-base.spec +++ b/texlive-base.spec @@ -4,7 +4,7 @@ Name: texlive-base Version: 20210325 -Release: 4 +Release: 5 Epoch: 9 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 @@ -6148,8 +6148,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 @@ -6165,7 +6170,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 riscv64 +%ifarch aarch64 riscv64 loongarch64 --disable-luajittex --disable-mfluajit --disable-luajithbtex --disable-mfluajit-nowin \ %endif --disable-rpath @@ -6349,7 +6354,7 @@ for i in afm2pl afm2tfm aleph bibtex bibtex8 bibtexu chkdvifont chktex ctie ctan chrpath --delete %{buildroot}%{_bindir}/$i done -%ifnarch aarch64 riscv64 +%ifnarch aarch64 riscv64 loongarch64 for i in luajittex luajithbtex mfluajit;do chrpath --delete %{buildroot}%{_bindir}/$i done @@ -7518,7 +7523,7 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %{_includedir}/kpathsea/* %{_includedir}/synctex/ %{_includedir}/texlua53/ -%ifnarch aarch64 riscv64 +%ifnarch aarch64 riscv64 loongarch64 %{_includedir}/texluajit/ %endif %{_libdir}/*.so @@ -7594,7 +7599,7 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %files -n texlive-luajittex %license gpl2.txt -%ifnarch aarch64 riscv64 +%ifnarch aarch64 riscv64 loongarch64 %{_bindir}/luajittex %{_bindir}/luajithbtex %{_bindir}/texluajit @@ -7713,7 +7718,7 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %license gpl2.txt %{_bindir}/mflua %{_bindir}/mflua-nowin -%ifnarch aarch64 riscv64 +%ifnarch aarch64 riscv64 loongarch64 %{_bindir}/mfluajit %{_bindir}/mfluajit-nowin %endif @@ -8646,6 +8651,9 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %doc %{_datadir}/texlive/texmf-dist/doc/latex/yplan/ %changelog +* Sat Mar 4 2023 Wenlong Zhang - 9:20210325-5 +- fix build error for loongarch64 + * Sat Feb 18 2023 xu_ping - 9:20210325-4 - Remove rpath -- Gitee