me
/
guix
Archived
1
0
Fork 0

gnu: go-1.14: Fix building on some platforms.

* gnu/packages/golang.scm (go-1.14)[arguments]: In custom 'prebuild
phase also search for loader without 'linux' in the string. In custom
'build phase set the GOCACHE directory.
[native-inputs]: On systems which don't have support in go-1.4 use
gccgo-10 instead.
master
Efraim Flashner 2021-12-12 11:53:38 +02:00
parent 492dac2fb0
commit 8226771a33
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 6 additions and 2 deletions

View File

@ -272,7 +272,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")) (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
(ld (string-append (assoc-ref inputs "libc") "/lib")) (ld (string-append (assoc-ref inputs "libc") "/lib"))
(loader (car (find-files ld "^ld-linux.+"))) (loader (car (append (find-files ld "^ld-linux.+")
(find-files ld "^ld(64)?\\.so.+"))))
(net-base (assoc-ref inputs "net-base")) (net-base (assoc-ref inputs "net-base"))
(tzdata-path (tzdata-path
(string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")) (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
@ -409,6 +410,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(setenv "GOOS" "linux") (setenv "GOOS" "linux")
(setenv "GOROOT" (dirname (getcwd))) (setenv "GOROOT" (dirname (getcwd)))
(setenv "GOROOT_FINAL" output) (setenv "GOROOT_FINAL" output)
(setenv "GOCACHE" "/tmp/go-cache")
(setenv "CGO_ENABLED" "1") (setenv "CGO_ENABLED" "1")
(invoke "sh" "all.bash")))) (invoke "sh" "all.bash"))))
(replace 'install (replace 'install
@ -447,7 +449,9 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(copy-recursively "../" output) (copy-recursively "../" output)
#t))))))) #t)))))))
(native-inputs (native-inputs
`(("go" ,go-1.4) `(,@(if (member (%current-system) (package-supported-systems go-1.4))
`(("go" ,go-1.4))
`(("go" ,gccgo-10)))
("go-skip-gc-test.patch" ,(search-patch "go-skip-gc-test.patch")) ("go-skip-gc-test.patch" ,(search-patch "go-skip-gc-test.patch"))
,@(match (%current-system) ,@(match (%current-system)
((or "armhf-linux" "aarch64-linux") ((or "armhf-linux" "aarch64-linux")