[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
76/244: gnu: go-1.18: Adjust patch-gcclib phase.
From: |
guix-commits |
Subject: |
76/244: gnu: go-1.18: Adjust patch-gcclib phase. |
Date: |
Wed, 12 Apr 2023 08:47:23 -0400 (EDT) |
apteryx pushed a commit to branch staging
in repository guix.
commit df973437758e52c148a677a8afbe120ab1c7ed1d
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Wed Apr 5 15:36:21 2023 +0300
gnu: go-1.18: Adjust patch-gcclib phase.
* gnu/packages/golang.scm (go-1.18)[arguments]: Adjust the custom
'patch-gcc:lib phase for changes in the source code.
---
gnu/packages/golang.scm | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 261f61f7b8..31022eb1d5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -851,7 +851,32 @@ in the style of communicating sequential processes
(@dfn{CSP}).")
(file-name (git-file-name name version))
(sha256
(base32
- "0ph3ajfq5q8j3nd91pfb25pm21aiphc58zf7fwis0h3a6nqbdyq9"))))))
+ "0ph3ajfq5q8j3nd91pfb25pm21aiphc58zf7fwis0h3a6nqbdyq9"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments go-1.17)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; 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"))))))))))))
(define-public go-1.19
(package
- 79/244: gnu: go-1.18: Fix packaging logic., (continued)
- 79/244: gnu: go-1.18: Fix packaging logic., guix-commits, 2023/04/12
- 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 <=
- 87/244: gnu: r-datawizard: Update to 0.7.1., guix-commits, 2023/04/12
- 78/244: gnu: go-1.19: Skip 2 gccgo tests., guix-commits, 2023/04/12
- 81/244: gnu: linux-libre 5.15: Update to 5.15.106., guix-commits, 2023/04/12
- 100/244: gnu: r-sjplot: Update to 2.8.14., guix-commits, 2023/04/12
- 104/244: gnu: r-rglpk: Update to 0.6-5., guix-commits, 2023/04/12
- 102/244: gnu: r-xgboost: Update to 1.7.5.1., guix-commits, 2023/04/12
- 108/244: gnu: r-loo: Update to 2.6.0., guix-commits, 2023/04/12
- 107/244: gnu: r-openmx: Update to 2.21.8., guix-commits, 2023/04/12
- 111/244: gnu: r-tune: Update to 1.1.0., guix-commits, 2023/04/12
- 115/244: gnu: r-spacetime: Update to 1.3-0., guix-commits, 2023/04/12