package/pkg-golang: add support for building host packages

With this you can add:

    $(eval $(host-golang-package))

to a package .mk file to build for host.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Tested-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Mirza Krak
2019-02-06 14:23:58 +01:00
committed by Thomas Petazzoni
parent 8291bc7793
commit aba08cd218
3 changed files with 45 additions and 5 deletions

View File

@@ -52,8 +52,11 @@ If you need CGO support in your package, you must add a dependency on
+BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS+.
The main macro of the Go package infrastructure is
+golang-package+. It is similar to the +generic-package+ macro. Only
target packages are supported with +golang-package+.
+golang-package+. It is similar to the +generic-package+ macro. The
ability to build host packages is also available, with the
+host-golang-package+ macro.
Host packages built by +host-golang-package+ macro should depend on
BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS.
Just like the generic infrastructure, the Go infrastructure works
by defining a number of variables before calling the +golang-package+.