unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 63416@debbugs.gnu.org
Subject: [bug#63416] [PATCH 2/2] gnu: gcc: Change make-gccgo to use gexp's.
Date: Wed, 10 May 2023 13:28:56 +0100	[thread overview]
Message-ID: <4d9416d0128dde7952b8126b3f3b0d5f9472d024.1683721736.git.mail@cbaines.net> (raw)
In-Reply-To: <dd62cec2706aabf66c565abac302e3ba4dc658c4.1683721736.git.mail@cbaines.net>

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
-- 
2.39.1





  reply	other threads:[~2023-05-10 12:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 12:26 [bug#63416] [PATCH 0/2] Fix more derivation builder gexp issues Christopher Baines
2023-05-10 12:28 ` [bug#63416] [PATCH 1/2] gnu: gcc: Change custom-gcc to use gexp's Christopher Baines
2023-05-10 12:28   ` Christopher Baines [this message]
2023-05-11 10:44   ` [bug#63416] [PATCH 0/2] Fix more derivation builder gexp issues Ludovic Courtès
2023-05-11 14:57     ` Christopher Baines
2023-05-15  8:51       ` bug#63416: " Christopher Baines
2023-05-11 14:54 ` [bug#63416] [PATCH v2 1/2] gnu: gcc: Change custom-gcc to use gexp's Christopher Baines
2023-05-11 14:54   ` [bug#63416] [PATCH v2 2/2] gnu: gcc: Change make-gccgo " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d9416d0128dde7952b8126b3f3b0d5f9472d024.1683721736.git.mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=63416@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).