summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Xuerui <xen0n@gentoo.org>2024-01-10 15:27:12 +0800
committerWANG Xuerui <xen0n@gentoo.org>2024-01-11 14:03:38 +0800
commit563bbd0dcab6130d6241badf36ddb5a7615bcb11 (patch)
tree26cf687bba6d4854909b86ada63e1b67f277490e
parentprofiles/arch/loong: unmask USE=jit for dev-libs/libpcre2 10.43 rc (diff)
downloadgentoo-563bbd0dcab6130d6241badf36ddb5a7615bcb11.tar.gz
gentoo-563bbd0dcab6130d6241badf36ddb5a7615bcb11.tar.bz2
gentoo-563bbd0dcab6130d6241badf36ddb5a7615bcb11.zip
dev-libs/libpcre2: fix build error on loong when USE=jit
Closes: https://github.com/gentoo/gentoo/pull/34729 Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
-rw-r--r--dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch30
-rw-r--r--dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild1
2 files changed, 31 insertions, 0 deletions
diff --git a/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch b/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch
new file mode 100644
index 000000000000..30fe49410bd5
--- /dev/null
+++ b/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch
@@ -0,0 +1,30 @@
+https://github.com/zherczeg/sljit/commit/7a821cd714d132e46e748275a80d402beea24764
+with file path adjusted to libpcre2 layout
+
+From: lrzlin <54242813+lrzlin@users.noreply.github.com>
+Date: Wed, 10 Jan 2024 07:13:55 +0800
+Subject: [PATCH] Add LoongArch float to integer conversion special cases
+ (#226)
+
+--- a/src/sljit/sljitConfigInternal.h
++++ b/src/sljit/sljitConfigInternal.h
+@@ -198,7 +198,7 @@ extern "C" {
+ /* Type of public API functions. */
+ /*********************************/
+
+-#ifndef SLJIT_API_FUNC_ATTRIBUTE
++#ifndef SLJIT_API_FUNC_ATTRIBUTE
+ #if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
+ /* Static ABI functions. For all-in-one programs. */
+
+@@ -399,6 +399,10 @@ typedef double sljit_f64;
+ #define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT
+ #define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT
+ #define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_MIN_INT
++#elif (defined SLJIT_CONFIG_LOONGARCH && SLJIT_CONFIG_LOONGARCH)
++#define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT
++#define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT
++#define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_ZERO
+ #else
+ #error "Result for float to integer conversion is not defined"
+ #endif
diff --git a/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild b/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild
index b6cba6f208e6..31c398868949 100644
--- a/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild
+++ b/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild
@@ -43,6 +43,7 @@ MULTILIB_CHOST_TOOLS=(
PATCHES=(
"${FILESDIR}"/${PN}-10.10-000-Fix-multilib.patch
+ "${FILESDIR}"/${PN}-10.43-fix-loong-sljit.patch
)
src_prepare() {