From patchwork Sat Aug 3 18:45:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1968752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dbUm0R+F; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wbs8X4PXzz1ybX for ; Sun, 4 Aug 2024 04:45:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B60FB3858C39 for ; Sat, 3 Aug 2024 18:45:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 459843858D26 for ; Sat, 3 Aug 2024 18:45:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 459843858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 459843858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722710711; cv=none; b=fHezZFxGyFjyi3JTSxD1feWed343o4odufx0McBo88qM5Ky79olmZFH/t8cUS47Y3Ftr1tyG9+W523Zikg7ZDNC4At7mEFl6WPNcbYog+VWCrHXyfFrISmRNx0oA16uoXuISjDmpKOuGCwmvc2CX4H0qWt/fFPbxdeFzfokjEzQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722710711; c=relaxed/simple; bh=kn+9IIBVQRYZwSx/E0ZpTfsI4lxRSXGAJFTe5nn5OYw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=uOgfeNPPzKjjP7yZSsEzzoaXAWnRFRICaHYYkbR0m+rZWuK2yxZ7jCX1YsfjFa1hCRxddk7V61H60Pg6+SlJRepPW/lOtxV+VfBL9Gp+VC5iK5q4daQXpx+QmzIwVlEAfFlaLWmbbdeQg+lMd6rSecXDdbdgRQVgA1GooYk55ds= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722710710; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=b3qjIRL7LULjMlWLTMXYZiUBDKPbak5zhTws/2PbP9M=; b=dbUm0R+FrVA/n30TpwuyMgNp/etawuzHHJgL1jN8pre5FyK8XgYV7A4QJRxF5mcYUvdZSQ CFWEu0ZPyIKHHjuYrQflNdCYcjPELerCi3YQBQw0sB+NOI8T1IQMTmZabkVpdt7mUrVzpC 4SMDmbJFpWXgzSQXMgFV/vy7ubg7qhY= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-vo2O715wMliGtWpx5Q6fQw-1; Sat, 03 Aug 2024 14:45:08 -0400 X-MC-Unique: vo2O715wMliGtWpx5Q6fQw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 36A201955D42 for ; Sat, 3 Aug 2024 18:45:07 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.25]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5A5231955D42 for ; Sat, 3 Aug 2024 18:45:05 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 473Ij3Qv945339 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sat, 3 Aug 2024 20:45:03 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 473Ij2QE945338 for gcc-patches@gcc.gnu.org; Sat, 3 Aug 2024 20:45:02 +0200 Date: Sat, 3 Aug 2024 20:45:02 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in some powerpc* configurations [PR116007] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation. Unfortunately, that seems to fail building in some powerpc* configurations, where TFmode isn't available. quad.h has: #ifndef TFtype typedef float TFtype __attribute__ ((mode (TF))); #endif and uses TFtype. quad.h has: /* Define the complex type corresponding to __float128 ("_Complex __float128" is not allowed) */ #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) typedef _Complex float __attribute__((mode(TC))) __complex128; #else typedef _Complex float __attribute__((mode(KC))) __complex128; #endif with the conditional and KCmode use added during porting of libquadmath to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__ isn't defined; I could define it to float __attribute__ ((mode (KF))) but it seemed easier to just define it to __float128 which should do the same thing. Bootstrapped/regtested on powerpc64{,le}-linux, committed to trunk, queued for 14.3 backport. 2024-08-03 Jakub Jelinek PR target/116007 * math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__ define to __float128 before including soft-fp.h and quad.h. Jakub --- libquadmath/math/sqrtq.c.jj 2024-04-09 08:16:54.128737859 +0200 +++ libquadmath/math/sqrtq.c 2024-08-02 23:28:00.862495012 +0200 @@ -9,6 +9,9 @@ && defined(FE_TOWARDZERO) \ && defined(FE_INEXACT) #define USE_SOFT_FP 1 +#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__) +#define TFtype __float128 +#endif #include "../../libgcc/soft-fp/soft-fp.h" #include "../../libgcc/soft-fp/quad.h" #endif