From 563bbd0dcab6130d6241badf36ddb5a7615bcb11 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Wed, 10 Jan 2024 15:27:12 +0800 Subject: dev-libs/libpcre2: fix build error on loong when USE=jit Closes: https://github.com/gentoo/gentoo/pull/34729 Signed-off-by: WANG Xuerui --- .../files/libpcre2-10.43-fix-loong-sljit.patch | 30 ++++++++++++++++++++++ dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild | 1 + 2 files changed, 31 insertions(+) create mode 100644 dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch 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() { -- cgit v1.2.3-65-gdbad