all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Efraim Flashner <efraim@flashner.co.il>, 48044@debbugs.gnu.org
Subject: [bug#48044] [PATCH] build/go: Support cross compiling.
Date: Mon, 26 Apr 2021 21:39:32 +0200	[thread overview]
Message-ID: <88494b19720f78a81b0eff53b46f134f302247e9.camel@telenet.be> (raw)
In-Reply-To: <20210426183235.3856-1-efraim@flashner.co.il>

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

> +      ;; We really only support targeting Linux and mingw.
> +      (setenv "GOOS" (if (string-contains target "mingw")
> +                       "windows"
> +                       "linux"))

If only Linux and mingw is supported, perhaps some kind of error
could be thrown if 'target' does not contain either "mingw" or "linux",
to avoid silently compiling for the wrong operating system?  There is
the Hurd as well for example.

I would recommend throwing the error (or returning #f?) from lower,
to notify the user cross-compilation is not possible as early as possible.

> +      (setenv "GOARM" "7")  ; Default is 6, target our armhf-linux architecture.

Would it be possible to only set that variable when targetting armhf-linux?
Setting this when targetting other architectures seems unlikely to cause issues,
but still seems subtly wrong to me, for some value of subtle.

Note: I do not know much about go and did not test this.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2021-04-26 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 18:32 [bug#48044] [PATCH] build/go: Support cross compiling Efraim Flashner
2021-04-26 19:39 ` Maxime Devos [this message]
2021-08-22 10:20 ` [bug#48044] [PATCH v3] " Efraim Flashner
2021-09-14  8:38   ` bug#48044: " Efraim Flashner
2021-08-22 18:52 ` [bug#48044] " Sarah Morgensen
2021-08-23  9:02   ` Efraim Flashner
2021-08-23  9:26   ` Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88494b19720f78a81b0eff53b46f134f302247e9.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=48044@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.