From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IB4fEaM0OGRzggAASxT56A (envelope-from ) for ; Thu, 13 Apr 2023 18:58:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8JcMEaM0OGQhfgAAauVa8A (envelope-from ) for ; Thu, 13 Apr 2023 18:58:11 +0200 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 D6B5C230E for ; Thu, 13 Apr 2023 18:58:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pn0Gr-00080e-61; Thu, 13 Apr 2023 12:58:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn0Gp-000806-CZ for bug-guix@gnu.org; Thu, 13 Apr 2023 12:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pn0Go-0004Jn-Pa for bug-guix@gnu.org; Thu, 13 Apr 2023 12:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pn0Go-00049m-L8 for bug-guix@gnu.org; Thu, 13 Apr 2023 12:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#61879: Patch References: <87a60xcrdl.fsf@inria.fr> In-Reply-To: <87a60xcrdl.fsf@inria.fr> Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 13 Apr 2023 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61879 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 61879@debbugs.gnu.org, Christopher Baines Received: via spool by 61879-submit@debbugs.gnu.org id=B61879.168140507415962 (code B ref 61879); Thu, 13 Apr 2023 16:58:02 +0000 Received: (at 61879) by debbugs.gnu.org; 13 Apr 2023 16:57:54 +0000 Received: from localhost ([127.0.0.1]:44585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pn0Gf-00049N-9r for submit@debbugs.gnu.org; Thu, 13 Apr 2023 12:57:53 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:57400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pn0Gb-000496-PP for 61879@debbugs.gnu.org; Thu, 13 Apr 2023 12:57:51 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6ACCB1F4B; Thu, 13 Apr 2023 18:57:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mMokhiBXJHTx; Thu, 13 Apr 2023 18:57:42 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 72C6C92; Thu, 13 Apr 2023 18:57:42 +0200 (CEST) Date: Thu, 13 Apr 2023 18:57:41 +0200 From: Andreas Enge Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="vMqvCx5BsNxFeg6m" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681405090; a=rsa-sha256; cv=none; b=aJWZe3s03KRKay8JUMiHvEvb95r8zVIfl2YM7SNV1iiv0TL0KVJjCj3ytYiEfxSCee315J MjJorErSkW5uUJ0Z6DEdg2k3OQfgkz1bqQTeycTRxE50Tc569JO+UxIZgbTPGdS/Ti5yPw aaUoipEQy3iNd1WdyxhX281UaAoiQwU11U6aw0H+lYAvfoZb7PL7SXXGxTFFdnqtbB53rD 60RnOLXYbuIj3Fd1GBNxxovCebb1C5e75Jf0Zscx3Kq80kWi/qTfMUbkwmZxhdcjRVYosz FH5++MOLv/JI/iJGHbc/HNGuSBkOl9kZwklp05H4/MK0rzVCRu48bKW9nRL86g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681405090; 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: content-transfer-encoding:content-transfer-encoding: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; bh=9yYZ5ByZh1Fs0gWzj2KKb+ukCtP+7FfVUHU7ZJGqaK0=; b=o2tX5LjIC6KXJ5xaAy4o/TiEcjwTaKiwVKpjETsChydiI6iWgbbg56mQ6FS8/qwyXKwBHY 5gUtb3e2ANAOhI+YAcEvl7SmdnRRkHDBwX1eqq8KhM6s+O73DJLdGft1iSliXVgEp8DBdG hfIhZxuKStx+GdalpV82J3JD17tnPlhGUJ17ZdQE+HC773Bo/VwdHxRMo3OGQ1b4Gdv114 39VhaFhTDqU0gjRL/MYNMuxuu+zk9fONn0PFpwZXjskb2krN0vn9SnXrypnFMsG5APC3Iz 7R9RGUjaa/0iZ8UGE7dF3sa170SqR2zXztjPWZ2kQUTHJ/Ce8X/jeEg5BK+LDA== X-Migadu-Queue-Id: D6B5C230E Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.52 X-Spam-Score: -3.52 X-TUID: G80BEKplO606 --vMqvCx5BsNxFeg6m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, attached is a new commit in old syntax, mixing both our commits. I have confirmed that it does not change the gcc-11 build on x86_64 and i686. But do we need "--force" for patching? Could you maybe check again whether this builds gcc-11 on powerpc? If yes, we can push it, and feel free to gexpify it in a separate commit. Andreas --vMqvCx5BsNxFeg6m Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: attachment; filename="0001-gnu-gcc-11-Fix-build-on-powerpc64le.patch" Content-Transfer-Encoding: 8bit >From 9900f9e9b86550e7d336b04ad46fba088e28cbd6 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Thu, 13 Apr 2023 11:46:47 +0200 Subject: [PATCH] gnu: gcc-11: Fix build on powerpc64le. * gnu/packages/patches/gcc-11-libstdc++-powerpc.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/gcc.scm (make-libstdc++): Apply patch for gcc versions >= 11 and < 12 on ppc64le. Co-authored-by: Christopher Baines --- gnu/local.mk | 1 + gnu/packages/gcc.scm | 11 ++++++++++- .../patches/gcc-11-libstdc++-powerpc.patch | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gcc-11-libstdc++-powerpc.patch diff --git a/gnu/local.mk b/gnu/local.mk index b07811f1cb..1255846462 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1184,6 +1184,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch \ %D%/packages/patches/gcc-12-cross-environment-variables.patch \ %D%/packages/patches/gcc-10-tree-sra-union-handling.patch \ + %D%/packages/patches/gcc-11-libstdc++-powerpc.patch \ %D%/packages/patches/gcolor3-update-libportal-usage.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index a511cdbc45..ae324219d3 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012-2023 Ludovic Courtčs ;;; Copyright © 2014, 2015, 2018 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus -;;; Copyright © 2015 Andreas Enge +;;; Copyright © 2015, 2023 Andreas Enge ;;; Copyright © 2015-2018, 2020-2023 Efraim Flashner ;;; Copyright © 2016 Carlos Sánchez de La Lama ;;; Copyright © 2018 Tobias Geerinckx-Rice @@ -889,6 +889,15 @@ (define-public (make-libstdc++ gcc) ":") "\nAM_CXXFLAGS = "))))))) '()) + ,@(let ((version (package-version gcc))) + (if (and (target-ppc64le?) + (version>=? version "11") + (not (version>=? version "12"))) + `((add-after 'unpack 'patch-powerpc + (lambda _ + (invoke "patch" "--force" "-p1" "-i" + (search-patch "gcc-11-libstdc++-powerpc.patch"))))) + '())) ;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64. (add-before 'chdir 'fix-rs6000-libdir (lambda _ diff --git a/gnu/packages/patches/gcc-11-libstdc++-powerpc.patch b/gnu/packages/patches/gcc-11-libstdc++-powerpc.patch new file mode 100644 index 0000000000..aff2ef16f1 --- /dev/null +++ b/gnu/packages/patches/gcc-11-libstdc++-powerpc.patch @@ -0,0 +1,18 @@ +diff -u -r gcc-11.3.0.alt/libstdc++-v3/src/c++17/floating_from_chars.cc gcc-11.3.0/libstdc++-v3/src/c++17/floating_from_chars.cc +--- gcc-11.3.0.alt/libstdc++-v3/src/c++17/floating_from_chars.cc 2023-04-13 11:36:08.169841428 +0200 ++++ gcc-11.3.0/libstdc++-v3/src/c++17/floating_from_chars.cc 2023-04-13 11:36:54.825827304 +0200 +@@ -495,8 +495,14 @@ + from_chars(const char* first, const char* last, __ieee128& value, + chars_format fmt) noexcept + { ++#if _GLIBCXX_USE_CXX11_ABI + buffer_resource mr; + pmr::string buf(&mr); ++#else ++ string buf; ++ if (!reserve_string(buf)) ++ return make_result(first, 0, {}, ec); ++#endif + size_t len = 0; + errc ec = errc::invalid_argument; + __try -- 2.39.2 --vMqvCx5BsNxFeg6m--