From patchwork Fri Jun 4 05:08:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Marusich X-Patchwork-Id: 29900 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2B74A27BC78; Fri, 4 Jun 2021 06:09:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A2D0627BC78 for ; Fri, 4 Jun 2021 06:09:09 +0100 (BST) Received: from localhost ([::1]:55828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp24y-0002bg-Nb for patchwork@mira.cbaines.net; Fri, 04 Jun 2021 01:09:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp24s-0002bH-WC for guix-patches@gnu.org; Fri, 04 Jun 2021 01:09:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp24s-0006Kb-P9 for guix-patches@gnu.org; Fri, 04 Jun 2021 01:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lp24s-0000bx-Ks for guix-patches@gnu.org; Fri, 04 Jun 2021 01:09: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, 04 Jun 2021 05:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48825 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48825@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16227832912266 (code B ref -1); Fri, 04 Jun 2021 05:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jun 2021 05:08:11 +0000 Received: from localhost ([127.0.0.1]:45141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp243-0000aT-2w for submit@debbugs.gnu.org; Fri, 04 Jun 2021 01:08:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:43322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp241-0000aH-Eo for submit@debbugs.gnu.org; Fri, 04 Jun 2021 01:08:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp241-0002Z9-7i for guix-patches@gnu.org; Fri, 04 Jun 2021 01:08:09 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:43957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp23z-0005lA-0a for guix-patches@gnu.org; Fri, 04 Jun 2021 01:08:08 -0400 Received: by mail-pj1-x102f.google.com with SMTP id l10-20020a17090a150ab0290162974722f2so5207913pja.2 for ; Thu, 03 Jun 2021 22:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=foQjUA4JO1kMYlFfckZ0KigAMYaSC2VfOnjJQnr4exM=; b=IF7GacyU1KSaGP1+u0u/b5y/SvjCnc0QoHQR3ISU7UeI5x2U7ovfvYicD7ekodMkMQ eXZi/lIcXH2/1HOUuGfExqY0890lJLxrZv2PLwhvVR2ATL58Dt4H3TGaQC2EYze7xUMU aDuGmav3EphNXbCsdnO/X0ov3sdQpWlGrOLnSoEPZHwVpTISh7hVD8R56PxXXCTbFr9t 71zsQe6xtvuLsMFhLtr+FHdMKHSlyms5FQIxg8sgn8Wc5yybr9HCcykvr8lNmpEYMSSz p30SVimgP7kk2MYA16A3OlA3cT79lGj1bhWPDfmfRMznlTCf1qZmY7geHBERClJOc4j8 iR4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=foQjUA4JO1kMYlFfckZ0KigAMYaSC2VfOnjJQnr4exM=; b=sSqGvcfbvypc/LmmZ/aqvYtQAsu2l7pUOisCych0VGj++HWjqbxfRQtpxOPdQr2VcF eNYQ/Dt19kN1gP/i9OO8rd+9fV8Ix/GZfAV2IK7xX1JZf0QRGGYGTA84qzqjfVoK7AuA uqBZ/QUQpifFBFFrWDg7QcsbTOlzOtfpkiTLVE+KnB8MgZ0aqFsm+wOwh7G8Nk09jUCQ ClbINHWXgtTk58HuQ789VS41ezw3Skgh16s78alhGntG7w/ewDI6oHEOcbrqdSlp2kih MtG7eT8/DCaq9rc+o01sV4CTWTLBgYDbcDpU1M/P/512/ZqlAbkdw4hxUB2BpL0uU0T/ MSIQ== X-Gm-Message-State: AOAM531eKuYE/f8MmyUWd2U2Yt1kek7cDsm/f1/1dThO59y+qacnkLnY H3IXMl4yNdC7JLb2yTa7aUDcJLu4UoA= X-Google-Smtp-Source: ABdhPJwsx1cycZU50dF+FyAeDI7804udIi6wNAkbR+V6dLSsxNdwKLbXN8s+PXDI49QJmnVfEBwTpg== X-Received: by 2002:a17:90a:8902:: with SMTP id u2mr2974538pjn.143.1622783285174; Thu, 03 Jun 2021 22:08:05 -0700 (PDT) Received: from garuda-lan ([2601:601:9d01:3f90::b043]) by smtp.gmail.com with ESMTPSA id 4sm689640pgn.31.2021.06.03.22.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 22:08:04 -0700 (PDT) From: Chris Marusich Date: Thu, 03 Jun 2021 22:08:00 -0700 Message-ID: <87o8cmtdxr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=cmmarusich@gmail.com; helo=mail-pj1-x102f.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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, Currently in Guix, we explicitly specify --with-long-double-128 on powerpc64le-linux (and potentially other powerpc64-* systems) in two places. It turns out that this is not necessary. This patch simplifies our code. I originally authored this in order to try fixing bug 47698, but it didn't solve that problem, and it turns out the --with-long-double-128 option is probably unrelated to that bug. However, it's still worth making this change to simplify our code. If nobody has any issues with this, then in 2 weeks I will commit it. One question is: where should I commit it? I'd like to commit it to master, but it causes many rebuilds on powerpc64le-linux (it does not cause rebuilds on any other platforms), so per the guidelines ((guix) Submitting Patches) I ought to commit it to core-updates. However, because the glibc upgrade from 2.31 to 2.32 on core-updates causes many problems for powerpc64le-linux, core-updates has never once been a viable branch for powerpc64le-linux in the time since support was first added on master. So if I commit this patch to core-updates, it won't really do anyone any good right now. With all this in mind, I think master is the right place to commit this patch. From ad89f9f59d22cc10fbf7dd6f738ce15a6e79b640 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sat, 10 Apr 2021 18:16:17 -0700 Subject: [PATCH] gnu: Simplify the use of --with-long-double-128 on powerpc64le. In short, this change adds the "--with-long-double-128" configure option in one place and removes it from two other (now-redundant) places. It does not cause any rebuilds on systems other than powerpc64le-linux. * gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add a clause for targets starting with "powerpc64le-" which adds the "--with-long-double-128" option. This causes any package using this procedure to be built using this new option on powerpc64le systems. In particular, this 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 powerpc64le, since it is now redundant. 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 systems. * gnu/packages/cross-base.scm (cross-gcc-arguments)[#:configure-flags]: Remove the code that adds the "--with-long-double-128" configure option for powerpc64le, since it is now redundant. The cross-gcc-arguments procedure uses (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 above change in gcc.scm is sufficient to ensure that the cross-gcc-arguments procedure's configure options will include "--with-long-double-128" on powerpc64le systems. --- gnu/packages/commencement.scm | 7 ------- gnu/packages/cross-base.scm | 6 ------ gnu/packages/gcc.scm | 3 +++ 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm 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=c,c++" - ;; boot-triplet inserts "guix" in the triplet. - ,@(if (equal? "powerpc64le-guix-linux-gnu" (boot-triplet)) - ;; On POWER9 (little endian) glibc needs the - ;; 128-bit long double type. - '("--with-long-double-128") - '()) - ;; 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 180594509b..c1e5f2eb79 100644 --- 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 libc package or #f.)" "--disable-decimal-float" ;would need libc "--disable-libcilkrts" - ,@(if (string-prefix? "powerpc64le-" target) - ;; On POWER9 (little endian) glibc needs - ;; the 128-bit long double type. - '("--with-long-double-128") - '()) - ;; 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 a412c93c29..22a0f35422 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -79,6 +79,9 @@ where the OS part is overloaded to denote a specific ABI---into GCC ;; Cilk has been removed from GCC 8 anyway. '("--disable-libcilkrts")) + ((string-prefix? "powerpc64le-" target) + '("--with-long-double-128")) + (else ;; TODO: Add `arm.*-gnueabi', etc. '()))) -- 2.30.2