From: "WANG Xuerui" <xen0n@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/openlibm/, sci-libs/openlibm/files/
Date: Sun, 05 Jan 2025 12:15:01 +0000 (UTC) [thread overview]
Message-ID: <1736078998.fce668b700ebc88e5b4d26c002a1888adcf1e86f.xen0n@gentoo> (raw)
commit: fce668b700ebc88e5b4d26c002a1888adcf1e86f
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 5 12:03:08 2025 +0000
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Sun Jan 5 12:09:58 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce668b7
sci-libs/openlibm: add support for loong, fix riscv build
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
.../openlibm-0.8.3-fix-loong-riscv-fenv.patch | 27 ++++++++++++++++++++++
sci-libs/openlibm/openlibm-0.8.3.ebuild | 10 +++++---
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/sci-libs/openlibm/files/openlibm-0.8.3-fix-loong-riscv-fenv.patch b/sci-libs/openlibm/files/openlibm-0.8.3-fix-loong-riscv-fenv.patch
new file mode 100644
index 000000000000..3e66dfaa46a9
--- /dev/null
+++ b/sci-libs/openlibm/files/openlibm-0.8.3-fix-loong-riscv-fenv.patch
@@ -0,0 +1,27 @@
+https://github.com/JuliaMath/openlibm/commit/c4667caea25ae3487adf6760b4a1dcf32477a4b8
+https://github.com/JuliaMath/openlibm/pull/308
+shipped in openlibm 0.8.4
+From: Li Bohai <lbhlbhlbh2002@icloud.com>
+Date: Sat, 9 Nov 2024 21:40:26 +0800
+Subject: [PATCH] Fix fenv_t initializer (#308)
+
+--- a/loongarch64/fenv.c
++++ b/loongarch64/fenv.c
+@@ -1,5 +1,5 @@
+ #define __fenv_static
+-#include <fenv.h>
++#include <openlibm_fenv.h>
+
+ #ifdef __GNUC_GNU_INLINE__
+ #error "This file must be compiled with C99 'inline' semantics"
+--- a/riscv64/fenv.c
++++ b/riscv64/fenv.c
+@@ -27,7 +27,7 @@
+ */
+
+ #define __fenv_static
+-#include "fenv.h"
++#include <openlibm_fenv.h>
+
+ #ifdef __GNUC_GNU_INLINE__
+ #error "This file must be compiled with C99 'inline' semantics"
diff --git a/sci-libs/openlibm/openlibm-0.8.3.ebuild b/sci-libs/openlibm/openlibm-0.8.3.ebuild
index 1b03b5cf145c..4a83d97ac718 100644
--- a/sci-libs/openlibm/openlibm-0.8.3.ebuild
+++ b/sci-libs/openlibm/openlibm-0.8.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -17,6 +17,7 @@ KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
PATCHES=(
"${FILESDIR}"/${P}-stack-protection.patch
+ "${FILESDIR}"/${P}-fix-loong-riscv-fenv.patch
)
src_prepare() {
@@ -28,8 +29,11 @@ src_prepare() {
}
src_compile() {
- # Build system uses the riscv64 arch variable
- use riscv && export ARCH=riscv64
+ # Build system uses different ARCH for the following arches
+ case "${ARCH}" in
+ loong) export ARCH=loongarch64 ;;
+ riscv) export ARCH=riscv64 ;;
+ esac
emake \
CC="$(tc-getCC)" \
next reply other threads:[~2025-01-05 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 12:15 WANG Xuerui [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-27 23:23 [gentoo-commits] repo/gentoo:master commit in: sci-libs/openlibm/, sci-libs/openlibm/files/ Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1736078998.fce668b700ebc88e5b4d26c002a1888adcf1e86f.xen0n@gentoo \
--to=xen0n@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox