me
/
guix
Archived
1
0
Fork 0

gnu: go-1.17: Fix test suite on powerpc64le-linux.

* gnu/packages/golang.scm (go-1.17)[arguments]: Use custom
'patch-gcc:lib phase on powerpc64le-linux. Add a phase to adjust the
allowed size of an executable in the test suite.
[inputs]: Keep gcc:lib as an input on powerpc64le-linux.
(go-1.18)[arguments]: Delete custom 'adjust-test-suite phase.
master
Efraim Flashner 2023-04-05 15:53:38 +03:00
parent b22f284b25
commit 451dff6129
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 10 additions and 2 deletions

View File

@ -700,7 +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.
,@(if (target-arm?) ,@(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)
(let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))) (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")))
@ -722,6 +722,13 @@ in the style of communicating sequential processes (@dfn{CSP}).")
"ldflags = append(ldflags, \"-r\")\n" "ldflags = append(ldflags, \"-r\")\n"
"ldflags = append(ldflags, \"" gcclib "\")\n"))))))) "ldflags = append(ldflags, \"" gcclib "\")\n")))))))
'()) '())
;; Backported from later versions of go to workaround 64k page sizes.
,@(if (target-ppc64le?)
'((add-after 'unpack 'adjust-test-suite
(lambda _
(substitute* "misc/cgo/testshared/shared_test.go"
(("100000") "256000")))))
'())
(add-after 'patch-source 'disable-failing-tests (add-after 'patch-source 'disable-failing-tests
(lambda _ (lambda _
;; Disable failing tests: these tests attempt to access ;; Disable failing tests: these tests attempt to access
@ -833,7 +840,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(install-file file (string-append out "/share/doc/go"))) (install-file file (string-append out "/share/doc/go")))
'("AUTHORS" "CONTRIBUTORS" "CONTRIBUTING.md" "PATENTS" '("AUTHORS" "CONTRIBUTORS" "CONTRIBUTING.md" "PATENTS"
"README.md" "SECURITY.md")))))))) "README.md" "SECURITY.md"))))))))
(inputs (if (not (target-arm?)) (inputs (if (not (or (target-arm?) (target-ppc64le?)))
(alist-delete "gcc:lib" (package-inputs go-1.16)) (alist-delete "gcc:lib" (package-inputs go-1.16))
(package-inputs go-1.16))))) (package-inputs go-1.16)))))
@ -856,6 +863,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(substitute-keyword-arguments (package-arguments go-1.17) (substitute-keyword-arguments (package-arguments go-1.17)
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases `(modify-phases ,phases
(delete 'adjust-test-suite)
;; See the platforms using this phase in go-1.17. ;; See the platforms using this phase in go-1.17.
(replace 'patch-gcc:lib (replace 'patch-gcc:lib
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)