From patchwork Wed May 10 12:28:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 49908 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 76ECC27BBEC; Wed, 10 May 2023 13:29:20 +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=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 00B7627BBED for ; Wed, 10 May 2023 13:29:19 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwiwK-00076T-PJ; Wed, 10 May 2023 08:29:04 -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 1pwiwJ-000753-5X for guix-patches@gnu.org; Wed, 10 May 2023 08:29: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 1pwiwI-0000sI-5u for guix-patches@gnu.org; Wed, 10 May 2023 08:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwiwI-0003ju-0j for guix-patches@gnu.org; Wed, 10 May 2023 08:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63416] [PATCH 2/2] gnu: gcc: Change make-gccgo to use gexp's. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 May 2023 12:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63416 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63416@debbugs.gnu.org Received: via spool by 63416-submit@debbugs.gnu.org id=B63416.168372173914358 (code B ref 63416); Wed, 10 May 2023 12:29:01 +0000 Received: (at 63416) by debbugs.gnu.org; 10 May 2023 12:28:59 +0000 Received: from localhost ([127.0.0.1]:45470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwiwF-0003jQ-5q for submit@debbugs.gnu.org; Wed, 10 May 2023 08:28:59 -0400 Received: from mira.cbaines.net ([212.71.252.8]:42508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwiwD-0003jB-OL for 63416@debbugs.gnu.org; Wed, 10 May 2023 08:28:58 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id 3B8AD27BBED for <63416@debbugs.gnu.org>; Wed, 10 May 2023 13:28:57 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 737f6f93 for <63416@debbugs.gnu.org>; Wed, 10 May 2023 12:28:56 +0000 (UTC) From: Christopher Baines Date: Wed, 10 May 2023 13:28:56 +0100 Message-Id: <4d9416d0128dde7952b8126b3f3b0d5f9472d024.1683721736.git.mail@cbaines.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches As otherwise this seems to generate broken derivations for i586-gnu. * gnu/packages/gcc.scm (make-gccgo): Use gexp's for the package arguments. --- gnu/packages/gcc.scm | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 2bd4cad6ec..38884678e0 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -1156,34 +1156,34 @@ (define (make-gccgo gcc) (arguments (substitute-keyword-arguments (package-arguments gccgo) ((#:phases phases) - `(modify-phases ,phases - (add-after 'install 'wrap-go-with-tool-path - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (exedir (string-append out "/libexec/gcc")) - (tooldir (dirname (car (find-files exedir "^cgo$"))))) - (wrap-program (string-append out "/bin/go") - `("GCCGOTOOLDIR" = - (,(string-append "${GCCGOTOOLDIR:-" tooldir "}"))) - `("GOROOT" = - (,(string-append "${GOROOT:-" out "}"))))))) - (add-before 'configure 'fix-gotools-runpath - (lambda _ - (substitute* "gotools/Makefile.in" - (("AM_LDFLAGS =" all) - (string-append all " -Wl,-rpath=$(libdir) "))))) - (add-before 'configure 'remove-tool-reference-from-libgo - (lambda _ - (substitute* "libgo/Makefile.in" - (("(GccgoToolDir = \\\")[^\\\"]+" _ start) - (string-append start "/nonexistent")) - ,@(if (version>=? (package-version gccgo) "12.0") - '((("(defaultGOROOT = `)[^`]+" _ start) - (string-append start "/nonexistent"))) - '((("(DefaultGoroot = \\\")[^\\\"]+" _ start) - (string-append start "/nonexistent")))) - (("(defaultGOROOTValue.*?return `)[^`]+" _ start) - (string-append start "/nonexistent")))))))))))) + #~(modify-phases #$phases + (add-after 'install 'wrap-go-with-tool-path + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (exedir (string-append out "/libexec/gcc")) + (tooldir (dirname (car (find-files exedir "^cgo$"))))) + (wrap-program (string-append out "/bin/go") + `("GCCGOTOOLDIR" = + (,(string-append "${GCCGOTOOLDIR:-" tooldir "}"))) + `("GOROOT" = + (,(string-append "${GOROOT:-" out "}"))))))) + (add-before 'configure 'fix-gotools-runpath + (lambda _ + (substitute* "gotools/Makefile.in" + (("AM_LDFLAGS =" all) + (string-append all " -Wl,-rpath=$(libdir) "))))) + (add-before 'configure 'remove-tool-reference-from-libgo + (lambda _ + (substitute* "libgo/Makefile.in" + (("(GccgoToolDir = \\\")[^\\\"]+" _ start) + (string-append start "/nonexistent")) + ,@(if (version>=? (package-version gccgo) "12.0") + '((("(defaultGOROOT = `)[^`]+" _ start) + (string-append start "/nonexistent"))) + '((("(DefaultGoroot = \\\")[^\\\"]+" _ start) + (string-append start "/nonexistent")))) + (("(defaultGOROOTValue.*?return `)[^`]+" _ start) + (string-append start "/nonexistent")))))))))))) (define-public gccgo-4.9 (custom-gcc (package