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.master
parent
3aea350e16
commit
a864f52797
|
@ -700,6 +700,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
|
||||||
(substitute* "src/time/zoneinfo_unix.go"
|
(substitute* "src/time/zoneinfo_unix.go"
|
||||||
(("/usr/share/zoneinfo/") tzdata-path)))))
|
(("/usr/share/zoneinfo/") tzdata-path)))))
|
||||||
;; Keep this synchronized with the package inputs.
|
;; Keep this synchronized with the package inputs.
|
||||||
|
;; Also keep syncthonized with later versions of go.
|
||||||
,@(if (or (target-arm?) (target-ppc64le?))
|
,@(if (or (target-arm?) (target-ppc64le?))
|
||||||
'((add-after 'unpack 'patch-gcc:lib
|
'((add-after 'unpack 'patch-gcc:lib
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
@ -864,27 +865,28 @@ in the style of communicating sequential processes (@dfn{CSP}).")
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
`(modify-phases ,phases
|
||||||
(delete 'adjust-test-suite)
|
(delete 'adjust-test-suite)
|
||||||
;; See the platforms using this phase in go-1.17.
|
,@(if (or (target-arm?) (target-ppc64le?))
|
||||||
(replace 'patch-gcc:lib
|
'((replace 'patch-gcc:lib
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")))
|
(let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")))
|
||||||
;; Add libgcc to runpath
|
;; Add libgcc to runpath
|
||||||
(substitute* "src/cmd/link/internal/ld/lib.go"
|
(substitute* "src/cmd/link/internal/ld/lib.go"
|
||||||
(("!rpath.set") "true"))
|
(("!rpath.set") "true"))
|
||||||
(substitute* "src/cmd/go/internal/work/gccgo.go"
|
(substitute* "src/cmd/go/internal/work/gccgo.go"
|
||||||
(("cgoldflags := \\[\\]string\\{\\}")
|
(("cgoldflags := \\[\\]string\\{\\}")
|
||||||
(string-append "cgoldflags := []string{"
|
(string-append "cgoldflags := []string{"
|
||||||
"\"-Wl,-rpath=" gcclib "\""
|
"\"-Wl,-rpath=" gcclib "\""
|
||||||
"}"))
|
"}"))
|
||||||
(("\"-lgcc_s\", ")
|
(("\"-lgcc_s\", ")
|
||||||
(string-append
|
(string-append
|
||||||
"\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
|
"\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
|
||||||
(substitute* "src/cmd/go/internal/work/gc.go"
|
(substitute* "src/cmd/go/internal/work/gc.go"
|
||||||
(("ldflags, err := setextld\\(ldflags, compiler\\)")
|
(("ldflags, err := setextld\\(ldflags, compiler\\)")
|
||||||
(string-append
|
(string-append
|
||||||
"ldflags, err := setextld(ldflags, compiler)\n"
|
"ldflags, err := setextld(ldflags, compiler)\n"
|
||||||
"ldflags = append(ldflags, \"-r\")\n"
|
"ldflags = append(ldflags, \"-r\")\n"
|
||||||
"ldflags = append(ldflags, \"" gcclib "\")\n"))))))))))))
|
"ldflags = append(ldflags, \"" gcclib "\")\n")))))))
|
||||||
|
'())))))))
|
||||||
|
|
||||||
(define-public go-1.19
|
(define-public go-1.19
|
||||||
(package
|
(package
|
||||||
|
|
Reference in New Issue