me
/
guix
Archived
1
0
Fork 0

gnu: gccgo-12: Fix building with 1 core.

* gnu/packages/gcc.scm (make-gccgo)[arguments]: When building gccgo-12
or higher add a phase to build libbacktrace before libgo.

Change-Id: I9bb225b58ffa439f9461e4126f51ab453683efbe
master
Efraim Flashner 2024-01-01 08:35:53 +02:00
parent 86b5fa1009
commit b20b624b02
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 15 additions and 0 deletions

View File

@ -1182,6 +1182,21 @@ provides the GNU compiler for the Go programming language.")
(substitute-keyword-arguments (package-arguments gccgo)
((#:phases phases)
#~(modify-phases #$phases
#$@(if (version>=? (package-version gccgo) "12.0")
#~((add-after 'unpack 'adjust-libgo-dependencies
(lambda _
(substitute* "Makefile.in"
;; libgo.la depends on libbacktrace.la but the
;; current dependency rules don't have libbacktrace
;; building early enough for libgo. When built
;; with more than 1 core this issue doesn't appear.
;; see commit 5fee5ec362f7a243f459e6378fd49dfc89dc9fb5.
(("all-target-libgo: maybe-all-target-libffi")
(string-append
"all-target-libgo: maybe-all-target-libbacktrace\n"
"all-target-libgo: maybe-all-target-libffi\n"
"all-target-libgo: maybe-all-target-libatomic"))))))
#~())
(add-after 'install 'wrap-go-with-tool-path
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))