From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] pkg-golang: host package not supported
Date: Fri, 10 Aug 2018 14:00:56 +0200 [thread overview]
Message-ID: <20180810140056.5cf7d9ed@windsurf> (raw)
In-Reply-To: <CADHdJwDuaeDU_G0ePRPRrWw+3Vo4W0mSx45OuEDnqrgnsKgZQA@mail.gmail.com>
Hello Mirza,
On Fri, 10 Aug 2018 13:34:06 +0200, Mirza Krak wrote:
> I have recently started doing some work with Buildroot and
> specifically I am building packages that are based on golang.
>
> Build packages for "target" works just fine. But I noticed that the
> pkg-golang.mk [1] does not support "host" target yet [2] which is
> required for one my packages.
>
> Buildroot is new to me but looking at pkg-golang.mk it does _not_ seem
> that a lot of needs to change to support "host" packages as well.
>
> So two questions:
> - Any specific reason "host" target is not supported?
Because it wasn't needed until now.
> - Any hints on to add host-golang-package support?
The first question is whether the existing host-go package installs a
Go compiler that can do native compilation in addition to
cross-compilation.
If that is the case, then pkg-golang.mk can be extended a bit like
pkg-cmake.mk, with a host-golang-package macro, which expands to:
$(call inner-golang-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
and then, in the inner-golang-package macro, do some ifeq
($(5),target) ... else ... endif to define the configure/build/install
commands differently depending on whether the package is a target
package or a host package. Again, see pkg-cmake.mk for an example.
Hope this helps!
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-08-10 12:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 11:34 [Buildroot] pkg-golang: host package not supported Mirza Krak
2018-08-10 12:00 ` Thomas Petazzoni [this message]
2018-08-11 22:23 ` Cam Hutchison
2018-08-13 6:26 ` Mirza Krak
2018-08-14 22:05 ` Mirza Krak
2018-08-14 22:14 ` Thomas Petazzoni
2018-08-14 22:16 ` Mirza Krak
2018-08-14 22:37 ` Arnout Vandecappelle
2018-08-14 22:43 ` Mirza Krak
2018-08-14 23:13 ` Arnout Vandecappelle
2018-08-14 23:22 ` Mirza Krak
2018-08-14 23:33 ` Arnout Vandecappelle
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=20180810140056.5cf7d9ed@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox