From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oGGwEfBUUGBEKQAA0tVLHw (envelope-from ) for ; Tue, 16 Mar 2021 06:49:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IPJnDfBUUGAGHwAAB5/wlQ (envelope-from ) for ; Tue, 16 Mar 2021 06:49:20 +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 71AB122E2D for ; Tue, 16 Mar 2021 07:49:19 +0100 (CET) Received: from localhost ([::1]:57858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lM3W1-0004VA-OM for larch@yhetil.org; Tue, 16 Mar 2021 02:49:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lM3Up-00035H-4R for guix-patches@gnu.org; Tue, 16 Mar 2021 02:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lM3Uo-0005X5-AO for guix-patches@gnu.org; Tue, 16 Mar 2021 02:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lM3Uo-0001f0-7t for guix-patches@gnu.org; Tue, 16 Mar 2021 02:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47182] [PATCH 03/18] gnu: gcc-4.7: On powerpc64le, fix /lib64 references. Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Mar 2021 06:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47182 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47182@debbugs.gnu.org Cc: Chris Marusich Received: via spool by 47182-submit@debbugs.gnu.org id=B47182.16158772316183 (code B ref 47182); Tue, 16 Mar 2021 06:48:02 +0000 Received: (at 47182) by debbugs.gnu.org; 16 Mar 2021 06:47:11 +0000 Received: from localhost ([127.0.0.1]:37889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lM3Tq-0001aP-OS for submit@debbugs.gnu.org; Tue, 16 Mar 2021 02:47:10 -0400 Received: from mail-pl1-f174.google.com ([209.85.214.174]:45331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lM3Tn-0001ZL-2p for 47182@debbugs.gnu.org; Tue, 16 Mar 2021 02:46:59 -0400 Received: by mail-pl1-f174.google.com with SMTP id u18so16462636plc.12 for <47182@debbugs.gnu.org>; Mon, 15 Mar 2021 23:46:58 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=zNpfBPry0SoXUM0sMUVBP0X7EUdP+jNBT7GyoJGIGow=; b=O5mVUvBk9Nfrun2x5Eeo98qY86X0nOlP94lVu3LBdKPzhw8diGgQZKoqrfev4txiGT JuTezZJKUNGlx5RftmEKZ5f224GddoKY76R5O9UVzttZIIa4wVGhvBPqC53xAuuyrRzD fSn1YEo7Cun/QlK0zCBse1VNjDKSdvfw2Mv68EfaNwNmGLTm5tqwhaE48k6MOnTTe8dH 0Fyrc4mqrBNdtLp5pjgYrulQopX09FQe4KNrzTpCAnP2Sf3lGhzGFek2o4FSWW2rsCtF EpglLFnN2JdO9A/pUk0QqmCRWZdi9Mz3zS2u7gZ7jRH07AnEO+9jI/dtLajqj+hh3iYP MKhg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=zNpfBPry0SoXUM0sMUVBP0X7EUdP+jNBT7GyoJGIGow=; b=myhwL6zhmggT9vF9sb8mpTYNF6L5ODCps9XVaPtwU0VPiIpittehZvB1h128pP1xIg UtQqk814yCDotVcGLr5wj5oXdi40N2NiCcGPNWBF5cY0jISpshfxCUVPJn6w1hds+UBh 20T4kwCRxndx9ZQc3e+DXI3g5nirU1idJuu7g3wI8vJWlcU5UyEsGcofKy/htTG5fms3 iqKxD/DCkkEFikO2CQTdL/UYa58RmQOKDyvYJ2vCDmSXbY9j37DQMNZP5IuHqGODsC7V 2EoArauT/nOTYWsKE5MDnCWimhwDIAsBXSYrUFgbt51t98k3PK0rCa8Cz2gebfmnIV5U iLlw== X-Gm-Message-State: AOAM531fdXtNCWwvQ2KmbTZOKNpvPuyhtgA04a7Qt9nZqCuA4YQnM+tw Lp4aibSGeLreqZU6JHFzltfPY0vX6XnsVA== X-Google-Smtp-Source: ABdhPJzdSfck4Byun7hmPKNXLotlH8lzyjutQ5UAsF08PN7BJGs5fQofu/7VC1WpbIyscI7LaMx8WA== X-Received: by 2002:a17:90b:2284:: with SMTP id kx4mr3164162pjb.96.1615877212675; Mon, 15 Mar 2021 23:46:52 -0700 (PDT) Received: from garuda-lan.lan (c-24-18-44-142.hsd1.wa.comcast.net. [24.18.44.142]) by smtp.gmail.com with ESMTPSA id r186sm15541160pfr.124.2021.03.15.23.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 23:46:52 -0700 (PDT) From: Chris Marusich Date: Mon, 15 Mar 2021 23:44:56 -0700 Message-Id: <20210316064511.2891553-3-cmmarusich@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210316064511.2891553-1-cmmarusich@gmail.com> References: <20210316062805.2890883-1-cmmarusich@gmail.com> <20210316064511.2891553-1-cmmarusich@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=1615877359; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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:dkim-signature; bh=zNpfBPry0SoXUM0sMUVBP0X7EUdP+jNBT7GyoJGIGow=; b=EyMknWs8+gf6qBo8G4NrPYGucSJUq2Z1PTIuOhVLvSzXnBF3j8shhmFLwJN+m9/kzDS8Ya B/PAqzO622ndbToU16q91Nk5HME3Zoe9l3UKiO1ugwhRddAJhUqKbrQTd+hezZZ54eqqVL iMjwo6kdqZ38O3sjLMxKx723BqjjSS2LdJCY7djCN86CD64j13VIrUu0d1T8F3f3bOXMm6 YXzf6aJImD4t/7jlQn2vKdUS3N/JdT6vvgzuukf4alTX4/cWcOdG54ON8ahVppTGv/zob8 xwtcM38XDKoaXkItI7u99prOBiLvNJFw/P9AHtmFQF8hQNj5Lz0PNMzg4PuXlw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615877359; a=rsa-sha256; cv=none; b=eL8Bcn3rSz1EUM5JmUwYAX8RD+FrCnxibFEBREWaPyY5yq4hd+BZLe8I4V0uWlAcQLNplV gNHEujR38QUd/2pkgNgebALYY+asIAc4cIzN9lWZ/L5FiJsj3pxugzlZ5CP3qj6d7i89zq dkGfVLvkSP87XMseb1N1B/3nBhcX8p7ffGA2JA8rMtQfsOKwE2heaFrqjJZCdjSv01KUTo waViFHjL/idYHadP74DcX4YyfuUGfIKQakJZYInWHE9+aPUeeOXznaUng6soITrgdSjECb KfVDJ1cTF+NH5xOpVJc7W0OHIZTPGImDhq+cfN+2hNdXTFBXJYfATDHuA7wOmg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=O5mVUvBk; 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.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=O5mVUvBk; 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: 71AB122E2D X-Spam-Score: -0.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: YsldtWmc+mac Fixes: . * gnu/packages/gcc.scm (gcc-4.7)[#:phases][pre-configure]: When the gcc/config/rs6000 directory exists, replace "/lib64" with "/lib" in all files within it. Note that this fix will be picked up by any package that re-uses the pre-configure phase from gcc-4.7 (e.g., all the usual gcc packages). (make-libstdc++)[#:phases][fix-rs6000-libdir]: New phase, which does the same as above. It was necessary to duplicate the fix here because make-libstdc++ does not re-use the pre-configure phase from gcc-4.7. --- gnu/packages/gcc.scm | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 4d5aaa70701..3ea8695cf18 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -3,13 +3,14 @@ ;;; Copyright © 2014, 2015, 2018 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge -;;; Copyright © 2015, 2016, 2017, 2018, 2020 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner ;;; Copyright © 2016 Carlos Sánchez de La Lama ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2020 Marius Bakke ;;; Copyright © 2020 Joseph LaFreniere ;;; Copyright © 2020 Guy Fleury Iteriteka ;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2021 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -273,6 +274,14 @@ where the OS part is overloaded to denote a specific ABI---into GCC ~a" libc line)))) + ;; TODO: Make this unconditional in core-updates. + ,@(if (target-powerpc?) + `((when (file-exists? "gcc/config/rs6000") + ;; Force powerpc libdir to be /lib and not /lib64 + (substitute* (find-files "gcc/config/rs6000") + (("/lib64") "/lib")))) + `()) + ;; Don't retain a dependency on the build-time sed. (substitute* "fixincludes/fixincl.x" (("static char const sed_cmd_z\\[\\] =.*;") @@ -598,12 +607,27 @@ using compilers other than GCC." (name "libstdc++") (arguments `(#:out-of-source? #t - #:phases (alist-cons-before - 'configure 'chdir - (lambda _ - (chdir "libstdc++-v3") - #t) - %standard-phases) + #:phases + ;; TODO: Use the target-powerpc arm for everyone. + ,(if (target-powerpc?) + `(modify-phases %standard-phases + ;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64. + (add-before 'chdir 'fix-rs6000-libdir + (lambda _ + (when (file-exists? "gcc/config/rs6000") + (substitute* (find-files "gcc/config/rs6000") + (("/lib64") "/lib"))) + #t)) + (add-before 'configure 'chdir + (lambda _ + (chdir "libstdc++-v3") + #t))) + `(alist-cons-before 'configure 'chdir + (lambda _ + (chdir "libstdc++-v3") + #t) + %standard-phases)) + #:configure-flags `("--disable-libstdcxx-pch" ,(string-append "--with-gxx-include-dir=" (assoc-ref %outputs "out") -- 2.26.2