[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
79/244: gnu: go-1.18: Fix packaging logic.
From: |
guix-commits |
Subject: |
79/244: gnu: go-1.18: Fix packaging logic. |
Date: |
Wed, 12 Apr 2023 08:47:23 -0400 (EDT) |
apteryx pushed a commit to branch staging
in repository guix.
commit a864f52797578612e2374ba3a0f2c2044764141f
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
- 59/244: gnu: symengine: Update to 0.10.1., (continued)
- 59/244: gnu: symengine: Update to 0.10.1., guix-commits, 2023/04/12
- 60/244: gnu: python-symengine: Update to 0.10.0., guix-commits, 2023/04/12
- 61/244: gnu: qelectrotech: Update to 0.9.0., guix-commits, 2023/04/12
- 62/244: gnu: gsequencer: Update to 4.5.0., guix-commits, 2023/04/12
- 64/244: gnu: cl-log4cl: Update to 1.1.4-2.fe3da51., guix-commits, 2023/04/12
- 65/244: gnu: Add cl-fast-ecs., guix-commits, 2023/04/12
- 66/244: gnu: cl-out123: Update to 1.0.0-2.41771bf., guix-commits, 2023/04/12
- 67/244: gnu: cl-gamepad: Update to 3.0.0-3.d5b99fb., guix-commits, 2023/04/12
- 71/244: gnu: Add r-future-callr., guix-commits, 2023/04/12
- 72/244: gnu: Add r-tarchetypes., guix-commits, 2023/04/12
- 79/244: gnu: go-1.18: Fix packaging logic.,
guix-commits <=
- 93/244: gnu: r-tsp: Update to 1.2-4., guix-commits, 2023/04/12
- 94/244: gnu: r-quantmod: Update to 0.4.21., guix-commits, 2023/04/12
- 74/244: gnu: emacs-eglot: Update to 1.14., guix-commits, 2023/04/12
- 73/244: gnu: emacs-eat: Patch ncurses tic executable., guix-commits, 2023/04/12
- 83/244: gnu: linux-libre 5.4: Update to 5.4.240., guix-commits, 2023/04/12
- 91/244: gnu: r-ps: Update to 1.7.4., guix-commits, 2023/04/12
- 84/244: gnu: linux-libre 4.19: Update to 4.19.280., guix-commits, 2023/04/12
- 101/244: gnu: r-seqinr: Update to 4.2-30., guix-commits, 2023/04/12
- 85/244: gnu: linux-libre 4.14: Update to 4.14.312., guix-commits, 2023/04/12
- 76/244: gnu: go-1.18: Adjust patch-gcclib phase., guix-commits, 2023/04/12