[packages/box64] up to 0.1.6
atler
atler at pld-linux.org
Sat Nov 20 12:52:41 CET 2021
commit 01d791a865ffbc54f98a546735e74a5a3ce5114b
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Nov 20 12:52:20 2021 +0100
up to 0.1.6
box64.spec | 12 +++++++----
glibc2.34.patch | 64 ---------------------------------------------------------
2 files changed, 8 insertions(+), 68 deletions(-)
---
diff --git a/box64.spec b/box64.spec
index 306c9d8..6719ed3 100644
--- a/box64.spec
+++ b/box64.spec
@@ -1,18 +1,20 @@
# Conditional build:
+%bcond_with larch64 # target Loongarch64 device
+%bcond_with phytium # target Phytium (D2000 or FT2000/4) device
%bcond_with rk3326 # target Rockchip RK3326 device
%bcond_with rk3399 # target Rockchip RK3399 device
%bcond_with rpi4 # target Raspberry Pi 4
+%bcond_with sd845 # target Snapragon 845 device
%bcond_with tegrax1 # target Tegra X1
Summary: Linux Userspace x86_64 Emulator
Name: box64
-Version: 0.1.4
+Version: 0.1.6
Release: 1
License: MIT
Group: Applications
Source0: https://github.com/ptitSeb/box64/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 64d026a02f8e48b802cb321d430684e9
-Patch0: glibc2.34.patch
+# Source0-md5: caf23020c1c5e823ac2f2155d82d1d4a
URL: https://box86.org
BuildRequires: cmake >= 3.4
BuildRequires: python3
@@ -29,13 +31,15 @@ Linux systems, like ARM (host system needs to be 64bit little-endian).
%prep
%setup -q
-%patch0 -p1
%build
%cmake -B build \
+ %{?with_larch64:-DLARCH64=ON} \
+ %{?with_phytium:-DPHYTIUM=ON} \
%{?with_rk3326:-DRK3326=ON} \
%{?with_rk3399:-DRK3399=ON} \
%{?with_rpi4:-DRPI4ARM64=ON} \
+ %{?with_sd845:-DSD845=ON} \
%{?with_tegrax1:-DTEGRAX1=ON}
%{__make} -C build
diff --git a/glibc2.34.patch b/glibc2.34.patch
deleted file mode 100644
index dfd0c3e..0000000
--- a/glibc2.34.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From b1d0dde0b428f5d08a821405e1c04fffe5e38c82 Mon Sep 17 00:00:00 2001
-From: ptitSeb <sebastien.chev at gmail.com>
-Date: Wed, 20 Oct 2021 22:54:42 +0200
-Subject: [PATCH] Proper fix for link issue on glibc 2.34+ (for #120)
-
----
- src/libtools/threads.c | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/libtools/threads.c b/src/libtools/threads.c
-index 3105211..8f94692 100755
---- a/src/libtools/threads.c
-+++ b/src/libtools/threads.c
-@@ -8,6 +8,7 @@
- #include <errno.h>
- #include <setjmp.h>
- #include <sys/mman.h>
-+#include <dlfcn.h>
-
- #include "debug.h"
- #include "box64context.h"
-@@ -28,8 +29,12 @@
- #include "dynablock.h"
- #endif
-
--void _pthread_cleanup_push_defer(void* buffer, void* routine, void* arg); // declare hidden functions
--void _pthread_cleanup_pop_restore(void* buffer, int exec);
-+//void _pthread_cleanup_push_defer(void* buffer, void* routine, void* arg); // declare hidden functions
-+//void _pthread_cleanup_pop_restore(void* buffer, int exec);
-+typedef void (*vFppp_t)(void*, void*, void*);
-+typedef void (*vFpi_t)(void*, int);
-+static vFppp_t real_pthread_cleanup_push_defer = NULL;
-+static vFpi_t real_pthread_cleanup_pop_restore = NULL;
- void _pthread_cleanup_push(void* buffer, void* routine, void* arg); // declare hidden functions
- void _pthread_cleanup_pop(void* buffer, int exec);
-
-@@ -668,7 +673,7 @@ EXPORT int my_pthread_cond_wait(x64emu_t* emu, pthread_cond_t* cond, void* mutex
- EXPORT void my__pthread_cleanup_push_defer(x64emu_t* emu, void* buffer, void* routine, void* arg)
- {
- (void)emu;
-- _pthread_cleanup_push_defer(buffer, findcleanup_routineFct(routine), arg);
-+ real_pthread_cleanup_push_defer(buffer, findcleanup_routineFct(routine), arg);
- }
-
- EXPORT void my__pthread_cleanup_push(x64emu_t* emu, void* buffer, void* routine, void* arg)
-@@ -680,7 +685,7 @@ EXPORT void my__pthread_cleanup_push(x64emu_t* emu, void* buffer, void* routine,
- EXPORT void my__pthread_cleanup_pop_restore(x64emu_t* emu, void* buffer, int exec)
- {
- (void)emu;
-- _pthread_cleanup_pop_restore(buffer, exec);
-+ real_pthread_cleanup_pop_restore(buffer, exec);
- }
-
- EXPORT void my__pthread_cleanup_pop(x64emu_t* emu, void* buffer, int exec)
-@@ -1135,6 +1140,9 @@ emu_jmpbuf_t* GetJmpBuf()
-
- void init_pthread_helper()
- {
-+ real_pthread_cleanup_push_defer = (vFppp_t)dlsym(NULL, "_pthread_cleanup_push_defer");
-+ real_pthread_cleanup_pop_restore = (vFpi_t)dlsym(NULL, "_pthread_cleanup_pop_restore");
-+
- InitCancelThread();
- pthread_key_create(&jmpbuf_key, emujmpbuf_destroy);
- }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/box64.git/commitdiff/01d791a865ffbc54f98a546735e74a5a3ce5114b
More information about the pld-cvs-commit
mailing list