guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 5e48c11fa3be6911c1399ba4256da47fdbd098c2
Author: Efraim Flashner <[email protected]>
AuthorDate: Mon Jun 29 08:49:16 2026 +0300

    gnu: go-golang-org-x-sys-for-esbuild: Fix build for powerpc-linux.
    
    * gnu/packages/golang-build.scm (go-golang-org-x-sys-for-esbuild)
    [arguments]: When building for powerpc-linux add a phase to add support
    for this architecture.
---
 gnu/packages/golang-build.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm
index 47cdd0f300d..3fa4838194a 100644
--- a/gnu/packages/golang-build.scm
+++ b/gnu/packages/golang-build.scm
@@ -1332,6 +1332,21 @@ low-level interaction with the operating system.")
      (arguments
      (list
       #:skip-build? #t
+      #:phases
+      (if (target-ppc32?)
+          #~(modify-phases %standard-phases
+              (add-after 'unpack 'patch-for-unsupported-architecture
+                (lambda* (#:key import-path #:allow-other-keys)
+                  (with-directory-excursion (string-append "src/" import-path)
+                    (with-output-to-file "cpu/cpu_ppc.go"
+                      (lambda ()
+                        (format #t "//go:build ppc~@
+                                ~@
+                                package cpu~@
+                                ~@
+                                const cacheLineSize = 32~@
+                                func initOptions() {}~%")))))))
+          #~%standard-phases)
       #:test-flags
       #~(list #$@(cond
                    ;; TODO: Remove this branch of the conditional,

Reply via email to