summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-10-18 14:39:58 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-10-18 14:53:17 +0300
commit0cd912186a178aab591bf151a86899dfb0d29fe3 (patch)
treeb627e6d7b6f830ef12dc0fd9f2a0424fa88d17b4 /guix/build-system
parent9cda21cf20a5c9bdf97e3a6d6c8f901fc3e4307d (diff)
downloadguix-patches-0cd912186a178aab591bf151a86899dfb0d29fe3.tar
guix-patches-0cd912186a178aab591bf151a86899dfb0d29fe3.tar.gz
build-system/go: Fix building on host's secondary architecture.
Before when building for i686-linux on x86_64-linux GOARCH would be set to amd64, not 386. * guix/build-system/go.scm (go-build): Set goarch and goos to #f when not cross-compiling. * guix/build/go-build-system.scm (setup-go-environment): Set GOARCH according to the calculated goarch or using GOHOSTARCH and GOOS according to the calculated goos or using GOHOSTOS.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/go.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 4c1a732107..757e63afe9 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -163,8 +163,8 @@ commit hash and its date rather than a proper release tag."
(tests? #t)
(allow-go-reference? #f)
(system (%current-system))
- (goarch (first (go-target (%current-system))))
- (goos (last (go-target (%current-system))))
+ (goarch #f)
+ (goos #f)
(guile #f)
(imported-modules %go-build-system-modules)
(modules '((guix build go-build-system)