Compare commits
10 Commits
e6292a4276
...
92b65d6ec8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92b65d6ec8 | ||
|
|
20861c3d64 | ||
|
|
0d908194c0 | ||
|
|
159cc92b41 | ||
|
|
713047c1ab | ||
|
|
d1aeae9713 | ||
|
|
c61d032140 | ||
|
|
2f69a6444b | ||
|
|
e774922c61 | ||
|
|
cf2948003a |
11051
add-riscv-support.patch
Normal file
11051
add-riscv-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
12647
add-sw-support.patch
Normal file
12647
add-sw-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
13
apply-patches
Normal file
13
apply-patches
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [ ! -d loongarch64 ]; then
|
||||||
|
tar -xf loongarch64.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
for p in $(cat loongarch64.conf); do
|
||||||
|
patch -p1 -s -i loongarch64/$p
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -rf $0 loongarch64 loongarch64.tar.gz loongarch64.conf
|
||||||
52
loongarch64.conf
Normal file
52
loongarch64.conf
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
0001-LoongArch64-Add-target-architecture-selection.patch
|
||||||
|
0002-LoongArch64-Add-DynASM-support.patch
|
||||||
|
0003-LoongArch64-Add-register-assignments-for-the-interpr.patch
|
||||||
|
0004-LoongArch64-Add-stack-layout.patch
|
||||||
|
0005-LoongArch64-Add-some-general-macro-type-definitions-.patch
|
||||||
|
0006-LoongArch64-Add-pure-interpreter-backend.patch
|
||||||
|
0007-LoongArch64-Add-definitions-for-target-CPU.patch
|
||||||
|
0008-LoongArch64-Add-some-constant-definitions.patch
|
||||||
|
0009-LoongArch64-Add-LoongArch-instruction-emitter.patch
|
||||||
|
0010-LoongArch64-Add-IR-assembler-support.patch
|
||||||
|
0011-LoongArch64-Add-JIT-support-in-the-interpreter.patch
|
||||||
|
0012-LoongArch64-Add-CPU-feature-detection-when-init-JIT-.patch
|
||||||
|
0013-LoongArch64-Add-LoongArch-lp64-calling-conventions-a.patch
|
||||||
|
0014-LoongArch64-Add-FFI-C-callback-handling.patch
|
||||||
|
0015-LoongArch64-Add-FFI-support-in-the-interpreter.patch
|
||||||
|
0016-LoongArch64-Add-DWARF-and-ELF-header-definitions.patch
|
||||||
|
0017-LoongArch64-Add-support-for-LuaJIT-VM-builder.patch
|
||||||
|
0018-LoongArch64-Add-loongarch64-support-when-save-list-b.patch
|
||||||
|
0019-LoongArch64-Add-LoongArch64-disassembler-module.patch
|
||||||
|
0020-LoongArch64-Add-support-in-Makefile.patch
|
||||||
|
0021-LoongArch64-Upgrade-the-base-code-to-v2.1.ROLLING.patch
|
||||||
|
0022-LoongArch64-Sync-code-with-luajit2-s-6f2fa1d9.patch
|
||||||
|
0023-LOONGARCH64-Optimize-function-that-moves-i32-constan.patch
|
||||||
|
0024-LOONGARCH64-Optimize-emit_store-loadofs-and-emit_mov.patch
|
||||||
|
0025-LOONGARCH64-Optimize-emit_djml-function-and-remove-e.patch
|
||||||
|
0026-LOONGARCH64-Optimize-register-allocation-RID_R20-reg.patch
|
||||||
|
0027-LOONGARCH64-Add-stack-check-to-pcall-xpcall.patch
|
||||||
|
0028-LOONGARCH64-Fixed-the-register-allocation-bug-in-asm.patch
|
||||||
|
0029-LOONGARCH64-Fix-the-setup-for-the-end-of-each-trace-.patch
|
||||||
|
0030-LOONGARCH64-Standardize-coding-style-and-comments.patch
|
||||||
|
0031-LOONGARCH64-Fix-the-.ffunc_1-tostring.patch
|
||||||
|
0032-LOONGARCH64-Optimize-emit_-functions-to-eliminate-th.patch
|
||||||
|
0033-LOONGARCH64-Optimize-LOONGF_I-to-LOONGF_I-to-elimina.patch
|
||||||
|
0034-LOONGARCH64-Optimize-the-efficiency-of-getting-setti.patch
|
||||||
|
0035-LOONGARCH64-Fix-the-error-of-checking-the-immediate-.patch
|
||||||
|
0036-LOONGARCH64-Fix-emit_lsptr-and-emit_load-storeofs-fu.patch
|
||||||
|
0037-LOONGARCH64-Fix-the-bug-introduced-by-emit_-function.patch
|
||||||
|
0038-LOONGARCH64-Fix-the-way-to-load-UREF-op1-address-in-.patch
|
||||||
|
0039-LOONGARCH64-Fix-the-branch-that-is-out-of-range-when.patch
|
||||||
|
0040-LOONGARCH64-Optimized-the-bswap-function.patch
|
||||||
|
0041-LOONGARCH64-Fixed-the-bug-in-math_minmax-function.patch
|
||||||
|
0042-LOONGARCH64-Fixed-the-bug-in-pcall-and-xpcall-functi.patch
|
||||||
|
0043-LOONGARCH64-Optimized-the-use-of-some-conditional-br.patch
|
||||||
|
0044-LOONGARCH64-Fix-the-bug-in-Hard-float-round-to-integ.patch
|
||||||
|
0045-LOONGARCH64-Fixed-the-bugs-of-movfcsr2gr_2-movgr2fcs.patch
|
||||||
|
0046-LOONGARCH64-Optimizing-the-vm_next-function.patch
|
||||||
|
0047-LOONGARCH64-Bump-copyright-date.patch
|
||||||
|
0048-LOONGARCH64-Fix-pcall-error-case.patch
|
||||||
|
0049-LOONGARCH64-Fix-FP-to-integer-conversions.patch
|
||||||
|
0050-LOONGARCH64-Add-the-definition-and-usage-of-the-CFR.patch
|
||||||
|
0051-LOONGARCH64-Fix-vm_next-register-dirty-read-bug.patch
|
||||||
|
0052-LOONGARCH64-Fix-min-max-return-register-error.patch
|
||||||
BIN
loongarch64.tar.gz
Normal file
BIN
loongarch64.tar.gz
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
53
luajit.spec
53
luajit.spec
@ -2,17 +2,23 @@
|
|||||||
|
|
||||||
Name: luajit
|
Name: luajit
|
||||||
Version: 2.1.0
|
Version: 2.1.0
|
||||||
Release: 6
|
Release: 11
|
||||||
Summary: Just-In-Time Compiler for Lua
|
Summary: Just-In-Time Compiler for Lua
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://luajit.org/
|
URL: http://luajit.org/
|
||||||
Source0: http://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz
|
Source0: http://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz
|
||||||
|
Source1: loongarch64.tar.gz
|
||||||
|
Source2: loongarch64.conf
|
||||||
|
Source3: apply-patches
|
||||||
|
|
||||||
# Patches from https://github.com/LuaJit/LuaJIT.git
|
# Patches from https://github.com/LuaJit/LuaJIT.git
|
||||||
# Generated from v2.1 branch against the 2.1.0-beta3 tag using
|
# Generated from v2.1 branch against the 2.1.0-beta3 tag using
|
||||||
# git diff v2.1.0-beta3..v2.1 > luajit-2.1-update.patch
|
# git diff v2.1.0-beta3..v2.1 > luajit-2.1-update.patch
|
||||||
Patch0001: luajit-2.1-224129a-update.patch
|
Patch0001: luajit-2.1-d06beb0-update.patch
|
||||||
Patch0002: 0002-luajit-add-secure-compile-option-fstack.patch
|
Patch0002: 0002-luajit-add-secure-compile-option-fstack.patch
|
||||||
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64
|
Patch0003: add-riscv-support.patch
|
||||||
|
Patch0004: add-sw-support.patch
|
||||||
|
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64 riscv64 loongarch64 sw_64
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -35,7 +41,26 @@ Summary: Documents for luajit
|
|||||||
Man pages and other related documents for luajit.
|
Man pages and other related documents for luajit.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n LuaJIT-2.1.0-beta3 -p1
|
%setup -q -n LuaJIT-2.1.0-beta3
|
||||||
|
%patch -P0001 -p1
|
||||||
|
%patch -P0002 -p1
|
||||||
|
|
||||||
|
# riscv64 arch patch
|
||||||
|
%ifarch riscv64
|
||||||
|
%patch -P0003 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# sw64 arch patch
|
||||||
|
%ifarch sw_64
|
||||||
|
%patch -P0004 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch loongarch64
|
||||||
|
cp %{SOURCE1} .
|
||||||
|
cp %{SOURCE2} .
|
||||||
|
cp %{SOURCE3} .
|
||||||
|
sh ./apply-patches
|
||||||
|
%endif
|
||||||
|
|
||||||
sed -i -e '/install -m/s/-m/-p -m/' Makefile
|
sed -i -e '/install -m/s/-m/-p -m/' Makefile
|
||||||
|
|
||||||
@ -50,7 +75,6 @@ sed -i -e '/install -m/s/-m/-p -m/' Makefile
|
|||||||
|
|
||||||
rm -rf _tmp_html ; mkdir _tmp_html
|
rm -rf _tmp_html ; mkdir _tmp_html
|
||||||
cp -a doc _tmp_html/html
|
cp -a doc _tmp_html/html
|
||||||
ln -s luajit-2.1.0-beta3 %{buildroot}%{_bindir}/luajit
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
@ -61,9 +85,9 @@ ln -s luajit-2.1.0-beta3 %{buildroot}%{_bindir}/luajit
|
|||||||
%files
|
%files
|
||||||
%doc README COPYRIGHT
|
%doc README COPYRIGHT
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_bindir}/%{name}-2.1.0-beta3
|
%{_bindir}/%{name}-2.1.ROLLING
|
||||||
%{_libdir}/lib%{name}-*.so.*
|
%{_libdir}/lib%{name}-*.so.*
|
||||||
%{_datadir}/%{name}-2.1.0-beta3/
|
%{_datadir}/%{name}-2.1/
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc _tmp_html/html/
|
%doc _tmp_html/html/
|
||||||
@ -76,6 +100,21 @@ ln -s luajit-2.1.0-beta3 %{buildroot}%{_bindir}/luajit
|
|||||||
%{_mandir}/man1/%{name}.1*
|
%{_mandir}/man1/%{name}.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 28 2025 maqi <maqi@uniontech.com> - 2.1.0-11
|
||||||
|
- Add sw64 support
|
||||||
|
|
||||||
|
* Tue Feb 18 2025 zhaoxiaolin <zhaoxiaolin@loongson.cn> - 2.1.0-10
|
||||||
|
- optimize code and fix some bugs on loongarch64
|
||||||
|
|
||||||
|
* Tue Apr 23 2024 zhaoxiaolin <zhaoxiaolin@loongson.cn> - 2.1.0-9
|
||||||
|
- Add loongarch64 base support
|
||||||
|
|
||||||
|
* Thu Mar 21 2024 TexasOct <TexasOct@isrc.iscas.ac.cn> - 2.1.0-8
|
||||||
|
- update riscv64 support and update to mainline d06beb04
|
||||||
|
|
||||||
|
* Wed Jul 19 2023 Jingwiw <wangjingwei@iscas.ac.cn> - 2.1.0-7
|
||||||
|
- add riscv64 support
|
||||||
|
|
||||||
* Mon May 15 2023 xu_ping <707078654@qq.com> - 2.1.0-6
|
* Mon May 15 2023 xu_ping <707078654@qq.com> - 2.1.0-6
|
||||||
- Update upstream commit
|
- Update upstream commit
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user