[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
382/416: gnu: go-1.18: Fix packaging logic.
From: |
guix-commits |
Subject: |
382/416: gnu: go-1.18: Fix packaging logic. |
Date: |
Fri, 14 Apr 2023 15:26:31 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit da26ab72957aa92da45f9ddaa0fe4613b8fa6408
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Wed Apr 5 22:16:52 2023 +0300
gnu: go-1.18: Fix packaging logic.
* gnu/packages/golang.scm (go-1.18)[arguments]: Only replace the custom
'patch-gcc:lib phase on certain architectures.
---
gnu/packages/golang.scm | 44 +++++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9c8decda61..24dae34e20 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -700,6 +700,7 @@ in the style of communicating sequential processes
(@dfn{CSP}).")
(substitute* "src/time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path)))))
;; Keep this synchronized with the package inputs.
+ ;; Also keep syncthonized with later versions of go.
,@(if (or (target-arm?) (target-ppc64le?))
'((add-after 'unpack 'patch-gcc:lib
(lambda* (#:key inputs #:allow-other-keys)
@@ -864,27 +865,28 @@ in the style of communicating sequential processes
(@dfn{CSP}).")
((#:phases phases)
`(modify-phases ,phases
(delete 'adjust-test-suite)
- ;; See the platforms using this phase in go-1.17.
- (replace 'patch-gcc:lib
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib")
"/lib")))
- ;; Add libgcc to runpath
- (substitute* "src/cmd/link/internal/ld/lib.go"
- (("!rpath.set") "true"))
- (substitute* "src/cmd/go/internal/work/gccgo.go"
- (("cgoldflags := \\[\\]string\\{\\}")
- (string-append "cgoldflags := []string{"
- "\"-Wl,-rpath=" gcclib "\""
- "}"))
- (("\"-lgcc_s\", ")
- (string-append
- "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
- (substitute* "src/cmd/go/internal/work/gc.go"
- (("ldflags, err := setextld\\(ldflags, compiler\\)")
- (string-append
- "ldflags, err := setextld(ldflags, compiler)\n"
- "ldflags = append(ldflags, \"-r\")\n"
- "ldflags = append(ldflags, \"" gcclib "\")\n"))))))))))))
+ ,@(if (or (target-arm?) (target-ppc64le?))
+ '((replace 'patch-gcc:lib
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((gcclib (string-append (assoc-ref inputs
"gcc:lib") "/lib")))
+ ;; Add libgcc to runpath
+ (substitute* "src/cmd/link/internal/ld/lib.go"
+ (("!rpath.set") "true"))
+ (substitute* "src/cmd/go/internal/work/gccgo.go"
+ (("cgoldflags := \\[\\]string\\{\\}")
+ (string-append "cgoldflags := []string{"
+ "\"-Wl,-rpath=" gcclib "\""
+ "}"))
+ (("\"-lgcc_s\", ")
+ (string-append
+ "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
+ (substitute* "src/cmd/go/internal/work/gc.go"
+ (("ldflags, err := setextld\\(ldflags, compiler\\)")
+ (string-append
+ "ldflags, err := setextld(ldflags, compiler)\n"
+ "ldflags = append(ldflags, \"-r\")\n"
+ "ldflags = append(ldflags, \"" gcclib "\")\n")))))))
+ '())))))))
(define-public go-1.19
(package
- 340/416: gnu: rust-futures-macro-0.3: Update to 0.3.26., (continued)
- 340/416: gnu: rust-futures-macro-0.3: Update to 0.3.26., guix-commits, 2023/04/14
- 341/416: gnu: rust-futures-task-0.3: Update to 0.3.26., guix-commits, 2023/04/14
- 348/416: gnu: rust-eyre-0.6: Update to 0.6.8., guix-commits, 2023/04/14
- 350/416: gnu: Add python-cryptography-rust., guix-commits, 2023/04/14
- 359/416: gnu: gstreamer-docs: Update to 1.22.2., guix-commits, 2023/04/14
- 363/416: gnu: gst-plugins-bad: Update to 1.22.2., guix-commits, 2023/04/14
- 360/416: gnu: gstreamer: Update to 1.22.2., guix-commits, 2023/04/14
- 361/416: gnu: gst-plugins-base: Update to 1.22.2., guix-commits, 2023/04/14
- 362/416: gnu: gst-plugins-good: Update to 1.22.2., guix-commits, 2023/04/14
- 377/416: gnu: Add youplot., guix-commits, 2023/04/14
- 382/416: gnu: go-1.18: Fix packaging logic.,
guix-commits <=
- 388/416: gnu: Add emacs-gptel., guix-commits, 2023/04/14
- 413/416: gnu: telepathy-idle: Update to 0.2.2-0.b516eab., guix-commits, 2023/04/14
- 397/416: gnu: icecat: Update to 102.10.0-guix0-preview1 [security fixes]., guix-commits, 2023/04/14
- 208/416: gnu: speexdsp: Update to 1.2.1., guix-commits, 2023/04/14
- 263/416: gnu: ruby-puma: Update to 6.2.0., guix-commits, 2023/04/14
- 280/416: gnu: ruby-activesupport: Skip a failing test on i686-linux., guix-commits, 2023/04/14
- 320/416: gnu: rust-chrono-0.4: Update to 0.4.24., guix-commits, 2023/04/14
- 327/416: gnu: rust-openssl-sys-0.9: Update to 0.9.84., guix-commits, 2023/04/14
- 329/416: gnu: Add rust-portable-atomic-1., guix-commits, 2023/04/14
- 349/416: gnu: rust-openssl-sys-0.9: Propagate openssl., guix-commits, 2023/04/14