| Message ID | 20260707144106.10130-1-pkubaj@FreeBSD.org |
|---|---|
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE8A14BA23E6 for <patchwork@sourceware.org>; Tue, 7 Jul 2026 14:42:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE8A14BA23E6 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.anongoth.pl (mail.anongoth.pl [IPv6:2001:470:71:6b::3]) by sourceware.org (Postfix) with ESMTPS id B6F3A4BA5434; Tue, 7 Jul 2026 14:41:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6F3A4BA5434 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=anongoth.pl ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B6F3A4BA5434 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:470:71:6b::3 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783435286; cv=none; b=FqP0hQuyZgnqx050YiUS48948zkN1Qcr++gWqlVp9QTRGWQOpG1BV+RyIuPM0PdWtMpsN0eyaiY/liCrEw5Xf2+HW4wCJLFTPe/MpV21uYXlv0Bp8B+vDwT/8kEAqsfMiWpcGbUNBdBtDyl8MDjmMPczWdOzAA2z4ywOfUvf2Ps= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783435286; c=relaxed/simple; bh=vItChWPBSip++Q8Qs+VAa99p1evr5PB03vLR63ZdX2o=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=iQDHhNJjo+EHME11ce/PzN3BMWdsW5wwiRdAUceX4XGoPWyNNQPFNM36Sj7bRkYvMA2mNiXVY1WjyaFI0qC8B7jWVotyfkJYkE1l0omvfMfpmTuJV5IBILooo4HQwXO2mjoHrGxBJpfrMJggBU91piFFMNbuCm37/pHFXTrMOmU= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6F3A4BA5434 Received: by mail.anongoth.pl (Postfix) id 81904FC52; Tue, 07 Jul 2026 16:41:23 +0200 (CEST) Authentication-Results: mail.anongoth.pl; dmarc=fail (p=none dis=none) header.from=FreeBSD.org From: Piotr Kubaj <pkubaj@FreeBSD.org> To: gcc-patches@gcc.gnu.org Cc: fortran@gcc.gnu.org, Segher Boessenkool <segher@kernel.crashing.org>, "Kewen . Lin" <linkw@linux.ibm.com>, Peter Bergner <bergner@linux.ibm.com>, Piotr Kubaj <pkubaj@FreeBSD.org> Subject: [PATCH 0/7] powerpc64le: support IEEE-128 long double on FreeBSD Date: Tue, 7 Jul 2026 16:40:02 +0200 Message-ID: <20260707144106.10130-1-pkubaj@FreeBSD.org> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, LOCAL_AUTHENTICATION_FAIL_DMARC, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
powerpc64le: support IEEE-128 long double on FreeBSD
|
|
Message
Piotr Kubaj
July 7, 2026, 2:40 p.m. UTC
FreeBSD 16 switched the powerpc64le base ABI to IEEE binary128 for long
double (matching powerpc64le-linux). For GCC to be ABI-compatible with
the FreeBSD system it must likewise default long double to IEEE-128 and
build/emit the supporting IEEE-128 runtime. GCC already does all of this
on powerpc64le-linux; this series wires FreeBSD into the same paths.
1-2 default long double to IEEE-128 (config.gcc, configure).
3-4 build the KFmode libgcc helpers and, since FreeBSD has no float128
IFUNC, export the software ones from libgcc_s.so.
5-6 two glibc assumptions that break any non-glibc IEEE-128 target: the
rs6000 long-double built-in name remap and the libgfortran kind-17
remap both hard-code glibc entry points; gate them on glibc.
7 a general libgfortran build bug that any IEEE-128 long double target
hits; independent of the rest.
Tested by building current master on powerpc64le-unknown-freebsd16.0:
builds to completion, long double defaults to IEEE binary128, libgcc_s.so
exports the __*kf* helpers, and ports that link against them build and
link (biology/star, math/blas).
Also verified inert on FreeBSD 15.1 (64-bit long double): the float128
machinery stays gated off and gcc builds unchanged.
Piotr Kubaj (7):
rs6000: default long double to IEEE 128-bit on powerpc*le
configure: accept --with-long-double-format on powerpc64le-*-freebsd*
libgcc: build the float128 support functions on powerpc*-*-freebsd*
libgcc: build and export the float128 helpers for powerpc64*-*-freebsd*
rs6000: only remap long double built-ins to __*ieee128 with glibc
fortran: only apply the IEEE-128 long double kind remap with glibc
libgfortran: don't add REAL(KIND=17) when long double is IEEE 128-bit
gcc/config.gcc | 5 ++++-
gcc/configure.ac | 3 ++-
libgcc/configure.ac | 5 +++--
libgcc/config.host | 6 ++++++
libgcc/config/rs6000/t-float128-freebsd | 15 +++++++++++++++
libgcc/config/rs6000/libgcc-freebsd-float128.ver | 35 +++++++++++++++++++++++++++++++++++
gcc/config/rs6000/rs6000.cc | 1 +
gcc/fortran/trans-types.cc | 3 ++-
libgfortran/kinds-override.h | 2 +-
9 files changed, 69 insertions(+), 6 deletions(-)