From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YKpABevqzGBrkQAAgWs5BA (envelope-from ) for ; Fri, 18 Jun 2021 20:50:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id WG0WAevqzGBSCwAA1q6Kng (envelope-from ) for ; Fri, 18 Jun 2021 18:50:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7C15D1F780 for ; Fri, 18 Jun 2021 20:50:18 +0200 (CEST) Received: from localhost ([::1]:53112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luJZJ-0003yy-It for larch@yhetil.org; Fri, 18 Jun 2021 14:50:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luJZ4-0003ym-Kc for guix-patches@gnu.org; Fri, 18 Jun 2021 14:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luJZ4-0002Ij-Cg for guix-patches@gnu.org; Fri, 18 Jun 2021 14:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luJZ4-00078Q-CN for guix-patches@gnu.org; Fri, 18 Jun 2021 14:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48825] [PATCH] gnu: Simplify the use of --with-long-double-128 on powerpc64le. Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Jun 2021 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48825 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48825@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162404216927385 (code B ref -1); Fri, 18 Jun 2021 18:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jun 2021 18:49:29 +0000 Received: from localhost ([127.0.0.1]:58197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luJYX-00077c-7l for submit@debbugs.gnu.org; Fri, 18 Jun 2021 14:49:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:40602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luJYU-00077U-Oa for submit@debbugs.gnu.org; Fri, 18 Jun 2021 14:49:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luJYU-0003vX-DU for guix-patches@gnu.org; Fri, 18 Jun 2021 14:49:26 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:44580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luJYO-0001oZ-PY for guix-patches@gnu.org; Fri, 18 Jun 2021 14:49:26 -0400 Received: by mail-pf1-x435.google.com with SMTP id u18so2978775pfk.11 for ; Fri, 18 Jun 2021 11:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=urIk26l5aus6h6aep3LzmE4Gje+6sPhYvnX+ZJ623qA=; b=QL+TTdgPaC53zUZid4HU052X2ax/9dBvF62RU0+tiz1duOoXFQB4t8YdGMgpxOzjam CkaTelZR8c8oYQoL4JK19T2BfEvZ7YNA9b2nrdcajTx561Epx6qLC65MGQ53Aa3QdRxT AaOhMBaqu7t9zzmSs6m/hrxEUZ1fun5iDSmZm1hBeI8+7VDCYMPjhG80C7KRFIh2xpIT P3pW8LNp1uvmzpOU1f5zK/9Mot9I/lI2L/qSij+AM/0dQRj5vtRuGzSfcFKHPb0gg1+v TFF3R6Mh+aYyO1OZCQsuDBTRl9GhCaNfdopjxAUeReeqwhqlNOUWdXVzMg2/TFEKAx9F F16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=urIk26l5aus6h6aep3LzmE4Gje+6sPhYvnX+ZJ623qA=; b=cKfGSIf90CEK+1C3dqzkYjDrEcWJFbAQmm5v0G1Mj4ml4NiGDMQneFrCZc/ocanQ2P bLEu6nkey4veKYLrETC1NHAKaDM0WEhg3fTfFFG8DGcigXW4A0U8M6yWUZnxSKpVasVN XW1ASXKzjJocDk39h82FD3YnFSPjyxPJoBsdVKpBFyGdmoKye0E2LxTnXZTZ0IfR7DmL v7LLpHuEeiq8i81bTq7aPSNeLnzZKPWGpFSbkeNbrNC95ZhoAKhSSbpe0TD4DmVWPoak JRMPjmUGPuPZYhL9LHVxQli30DQQ17WbOeH4sQczQ9clCYrRDN4dy8BMNgo4kq2QjEOI qVOA== X-Gm-Message-State: AOAM5309CtNy5WhBj1y23ZnCRDTmrT5dQ3WAz7gqDKSzyXxGVJjjyLrw ShwVltDljc+MeaZELLtA0eFKUeh0Wo//eA== X-Google-Smtp-Source: ABdhPJx+ctUJbHKxwwKvvcmmFic0mhuvztNJRP4s0xgH//7kBAjqvVUIAfd+sY8/t2bh+7Op7YFWOA== X-Received: by 2002:a62:27c5:0:b029:2f7:d4e3:7f2d with SMTP id n188-20020a6227c50000b02902f7d4e37f2dmr6405754pfn.59.1624042158793; Fri, 18 Jun 2021 11:49:18 -0700 (PDT) Received: from garuda-lan ([2601:601:9d01:3f90::24aa]) by smtp.gmail.com with ESMTPSA id n33sm2377967pgm.55.2021.06.18.11.49.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 11:49:17 -0700 (PDT) From: Chris Marusich References: <87o8cmtdxr.fsf@gmail.com> Date: Fri, 18 Jun 2021 11:49:13 -0700 In-Reply-To: (Efraim Flashner's message of "Sun, 6 Jun 2021 11:12:59 +0300") Message-ID: <87k0mr6mae.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=cmmarusich@gmail.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624042218; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=urIk26l5aus6h6aep3LzmE4Gje+6sPhYvnX+ZJ623qA=; b=fzaDmUQUtZO4yAa/PMu5g2Qw03JZX/UwbuldfuKIJZlcv+J7fBPa4Eilzks7P4wSvFclvW RJAmrbEDsUJWut6usWYDSAgfxXhTvGbGXuSxNdk3AGQffJprowIrsZBdnBRJVzqdOMPn8C LM1/kKYsVQNg1h05YeyypncWQMVwZA9v25QchtsGrUvPsusgTSCK/JsbwOR83co+dB/Ysy 7PZmn0kgQ2tOyZ3p4SrcIlaYZ1avwW657Dya4Pb4zddClbXX2U5cw6CaZS2wRxsH7Nsimq VOpqqm9cEBljTe7ix/8fYhbIlTnTTKRVPX9nbFRVL/JARC7WK50rfnmkRdHL7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624042218; a=rsa-sha256; cv=none; b=VzErcodi4FSKv8pyyvtBjJlZFMI7vc6D4wwxKDkkuYuxBmS1mSNuK+XyoOhVS0fovB0JlD CANnlZbhw7RU6VeZmKbxDNvo1Gohwcpxkp1RaX+gmkbwMNX27wXJyUlPL/g30jjW6E4ElL aUtliLOywzBHlUhoOJm3EC3QXNWWQLuiiigTqf54MZ+5pvAYUNrHxWwuXdQU1Cz00SRUs2 hgUK7C7qQfOdYkmG9Si5ygRNYdKHzGe3MZzOCGSBzahOUkVKjYZr7/I2Nzg6SsCa92fAYD UsmYySVnPeWksmFf7gqw2MNrAM7v5HM/x4W9Mfg6JaarbsPqGLmsd08n1VAs3g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=QL+TTdgP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=QL+TTdgP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 7C15D1F780 X-Spam-Score: 0.58 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ygakpk9Qnohy --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Efraim, Efraim Flashner writes: > couple of thoughts: > powerpc64le is in 'technology preview', so IMO it's fine to make big > changes to it as needed. That's true, but since we now have a stable place from which to work (master), I feel less concerned about getting changes into master. I thought about this again now, and I think I will plan to push this change to core-updates instead of master. > On master (and probably on core-updates too) we have a patch for glibc > to force ... something (that I don't remember) on powerpc architectures, > which has the side effect of needing '--with-long-double-128' on > powerpc-linux also in commencement.scm. If we could drop that patch then > I don't think we would need it anymore for powerpc. I'm not sure what change this would be, but if you ever figure it out, please do let me know! >> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.s= cm >> index d4511ed914..db564db9c4 100644 >> --- a/gnu/packages/commencement.scm >> +++ b/gnu/packages/commencement.scm >> @@ -2819,13 +2819,6 @@ exec " gcc "/bin/" program >> "--disable-shared" >> "--enable-languages=3Dc,c++" >>=20=20 > > I've adjusted this on core-updates to also take effect on powerpc-linux. Thank you for mentioning this. In light of your change, I needed to modify my patch. I've attached a new patch which takes powerpc into account. I modified the commit message a bit, too. I'm confident the attached patch is correct for powerpc64le-linux, but if you could take a peek and make sure I didn't miss something related to powerpc, I would appreciate it! > This can be just 'powerpc64le' When checking the string prefix, that does probably work for little endian powerpc 64, since I don't think there are any other architectures that start with "powerpc64le". However, if you did something similar for powerpc (like in your change on core-updates), please keep in mind that it will affect not only powerpc64le, but also big-endian powerpc64, and any other powerpc architecture. For that reason, I personally prefer to keep the hyphen when I have a specific architecture in mind. =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Simplify-the-use-of-with-long-double-128.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] gnu: Simplify the use of --with-long-double-128. From=201d6043ea33236a7f35f990935e457ef440b365c4 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Fri, 18 Jun 2021 11:26:31 -0700 Subject: [PATCH] gnu: Simplify the use of --with-long-double-128. In short, this change adds the hard-coded "--with-long-double-128" configure option in one place and removes it from two other places. This changes and simplifies the use of this option for various architectures that start with the string "powerpc". * gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add a clause for targets starting with "powerpc64le-" or "powerpc-" which adds the "--with-long-double-128" option. This causes any package using this proced= ure to be built using this new option on these architectures. In particular, t= his affects the gcc package and the gcc-final package, in addition to all the other versions of GCC defined in (gnu packages gcc). * gnu/packages/commencement.scm (gcc-boot0)[#:configure-flags]: Remove the code that adds the "--with-long-double-128" configure option for all architectures starting with "powerpc", since it is now redundant on the architectures where it is needed. The gcc-boot0 package uses (and adds to) = the gcc package's configure options. This means that the above change in gcc.scm is sufficient to ensure that the gcc-boot0 package's configure options will include "--with-long-double-128" on powerpc64le and powerpc architectures. Additionally, since the option is apparently not required on the big-endian powerpc64 architecture, this change also has the nice effect of omitting the option in that case. * gnu/packages/cross-base.scm (cross-gcc-arguments)[#:configure-flags]: Rem= ove the code that adds the "--with-long-double-128" configure option for powerpc64le, since it is now redundant. The cross-gcc-arguments procedure u= ses (and adds to) the configure options of its xgcc argument (a package). This means that regardless of which gcc from gcc.scm is used as the xgcc, the ab= ove change in gcc.scm is sufficient to ensure that the cross-gcc-arguments procedure's configure options will include "--with-long-double-128" on the powerpc64le and powerpc architectures. =2D-- gnu/packages/commencement.scm | 7 ------- gnu/packages/cross-base.scm | 6 ------ gnu/packages/gcc.scm | 5 +++++ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index d44d1dd3ca..af61512129 100644 =2D-- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2733,13 +2733,6 @@ exec " gcc "/bin/" program "--disable-shared" "--enable-languages=3Dc,c++" =20 =2D ;; On POWER9 (little endian) glibc needs the = 128-bit =2D ;; long double type. 32-bit PPC is affected = by the =2D ;; changes applied for powerpc64le. =2D ,@(if (string-prefix? "powerpc" (boot-triplet= )) =2D '("--with-long-double-128") =2D '()) =2D ;; libstdc++ cannot be built at this stage ;; ("Link tests are not allowed after ;; GCC_NO_EXECUTABLES."). diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 926b00ccdf..ced226ef34 100644 =2D-- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -153,12 +153,6 @@ base compiler and using LIBC (which may be either a li= bc package or #f.)" "--disable-decimal-float" ;would need libc "--disable-libcilkrts" =20 =2D ,@(if (string-prefix? "powerpc64le-" targe= t) =2D ;; On POWER9 (little endian) glibc ne= eds =2D ;; the 128-bit long double type. =2D '("--with-long-double-128") =2D '()) =2D ;; When target is any OS other than 'none' = these ;; libraries will fail if there is no libc ;; present. See diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 5d114dca87..31c7997fd0 100644 =2D-- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -79,6 +79,11 @@ where the OS part is overloaded to denote a specific ABI= ---into GCC ;; Cilk has been removed from GCC 8 anyway. '("--disable-libcilkrts")) =20 + ;; glibc needs the 128-bit long double type on these architectures. + ((or (string-prefix? "powerpc64le-" target) + (string-prefix? "powerpc-" target)) + '("--with-long-double-128")) + (else ;; TODO: Add `arm.*-gnueabi', etc. '()))) =2D-=20 2.30.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmDM6qkVHGNtbWFydXNp Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadSw0P/AuqjFz9h5WAYLVOidcUzAAPoTz8 67Ub4YaOgCTpxP4MAavhdKtJgB64D4hxywTwWCmoSkszyUD9hINyMq8jyHp615yI yDas4Sj+9iyLukiERJ0nNUFhvJjRfdc9YkzNu2T+vL30KMH6nGl51Hn77E/x8oUl WmP9g3B9rYIeDncbfVIuJGrsGwNpo1JeZ+1cLow118yS/UGs42NK2uKblcAUcudc kz+eExso9En+6hPsZc2M1Fq5ol3eyq7tpltl4yfaEZW7o+SFtSPMsNFmLlcE3aAW 4fOH4bqI675dTOXj6qLX/vXnmRCcn7r5k4lge4BgJIu59eQC/u2LSiSL6WlvbhPm A9I+JQ3bfkGX6982w4kJgTxKq2Eyuv47Xr6FsJlnD6n2PLCaUdUubNXRQuOnZdOh WhKWHjBjjgB6DqRnk5AccX9u5gxYLZd6Ngej0us2B/290OHjmiqH562Qq4nsV2X8 daDMvHaI87nBpxAuxNg9k4jK7hf54fp52PDCsBLem1K1czvyVxsF1YuBijn4CJst UgyAZ/uKgW2ED6J+LqlC3QOocDsmTKdBDp8DG72jTC/uI2AbIeF31nns0uI5PoOS YJxDGvbqgodQR+xbYsG/tjX/glGVUCugIYNVoOg+E+Ye1VjHpfnwpLxebHRD3G4o 69wxTtiaV9iVZEIT =cGTn -----END PGP SIGNATURE----- --==-=-=--