From patchwork Mon Aug 8 16:35:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 41412 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 DABDF27BBEA; Mon, 8 Aug 2022 17:40:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9527527BBE9 for ; Mon, 8 Aug 2022 17:40:10 +0100 (BST) Received: from localhost ([::1]:45908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oL5nV-0005O7-Mx for patchwork@mira.cbaines.net; Mon, 08 Aug 2022 12:40:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL5nO-0005Nz-QJ for guix-patches@gnu.org; Mon, 08 Aug 2022 12:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL5nO-0006xt-HT for guix-patches@gnu.org; Mon, 08 Aug 2022 12:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oL5nO-0007Y0-BR for guix-patches@gnu.org; Mon, 08 Aug 2022 12:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57060] [PATCH] gnu: pcc: Fix build. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Aug 2022 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57060 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57060@debbugs.gnu.org Cc: "\(" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165997674928943 (code B ref -1); Mon, 08 Aug 2022 16:40:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Aug 2022 16:39:09 +0000 Received: from localhost ([127.0.0.1]:41834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL5mW-0007Wk-VB for submit@debbugs.gnu.org; Mon, 08 Aug 2022 12:39:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:33060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL5mV-0007Wd-91 for submit@debbugs.gnu.org; Mon, 08 Aug 2022 12:39:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL5mU-0005Eg-Qv for guix-patches@gnu.org; Mon, 08 Aug 2022 12:39:07 -0400 Received: from knopi.disroot.org ([178.21.23.139]:58520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL5mS-0006uI-Pl for guix-patches@gnu.org; Mon, 08 Aug 2022 12:39:06 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 620D74578A; Mon, 8 Aug 2022 18:39:01 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id jx4k8iqDP5d0; Mon, 8 Aug 2022 18:38:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1659976533; bh=1mylBz4hXzvPHBuJWI7Twk1UGDB8EsVpXQU0ypamqhU=; h=From:To:Cc:Subject:Date; b=Vx7KOoPNQVFxzhAbmE6Hoz8U+HMyoLyXpfHIWvpcj2NEKQv6lCeKZIhUvT8Q8daLM LxzocOJMfOjUgfdtLRv2m9LWA5dk8aSaS8AFdvSs0aiLBZDSxySGWNZa8CIR+qDtU+ i4evJUrjcAKIL7Ls/VbDqhpCq5sz6KzHd6FdYS+HUGEOkVrOnnQCbK3z7fqRT+E8VP XycFQGH/VQ7/RyL5TixNzAl7AGIAOi4eo6mD3qgcxmyE3+OZTQqHnrIeXArDXgTB3B SRr8QoqCzsxZBUJPQL6Iw76hnNBVLyfSYPyvBCnnioz/BHdsxHDrfueAD+xWrf8oOK vvLWayV8B2Aiw== Date: Mon, 8 Aug 2022 17:35:29 +0100 Message-Id: <20220808163529.12354-1-paren@disroot.org> Mime-Version: 1.0 Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org; helo=knopi.disroot.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/c.scm (pcc)[arguments]: Use gexps. <#:phases>{fix-multiple-definitions}: New phase. [native-inputs]: Adjust formatting. --- gnu/packages/c.scm | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 1630a40d17..113a331070 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2022 (unmatched parenthesis ;;; Copyright © 2022 Artyom V. Poptsov ;;; Copyright © 2022 Ekaitz Zarraga +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -185,12 +186,20 @@ (define-public pcc "1p34w496095mi0473f815w6wbi57zxil106mg7pj6sg6gzpjcgww")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ (invoke "make" "-C" "cc/cpp" "test") #t))))) - (native-inputs - (list bison flex)) + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-multiple-definitions + (lambda _ + ;; Certain variables are defined multiple times. This + ;; upsets the linker and causes a build failure. + (substitute* "cc/ccom/pass1.h" + (("FLT flt_zero;") "extern FLT flt_zero;")) + (substitute* (list "cc/ccom/scan.l" "cc/cxxcom/scan.l") + (("lineno, ") "")))) + (replace 'check + (lambda _ + (invoke "make" "-C" "cc/cpp" "test")))))) + (native-inputs (list bison flex)) (synopsis "Portable C compiler") (description "PCC is a portable C compiler. The project goal is to write a C99