package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
authorMirza Krak <mirza.krak@northern.tech>
Mon, 3 Jun 2019 09:21:01 +0000 (11:21 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 8 Jun 2019 19:42:32 +0000 (21:42 +0200)
If a go host package is built using cgo, it needs access
to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
might depend on.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Acked-by: Adam Duskett <aduskett@gmail.com>
Tested-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/pkg-golang.mk

index b4e8a530654bcf58c4714a36c320b00a880344c4..72e8f6b7afa38a3822e18608d29c1c05e9434ab3 100644 (file)
@@ -35,6 +35,8 @@ GO_TARGET_ENV = \
        $(GO_COMMON_ENV)
 
 GO_HOST_ENV = \
+       CGO_CFLAGS="$(HOST_CFLAGS)" \
+       CGO_LDFLAGS="$(HOST_LDFLAGS)" \
        $(GO_COMMON_ENV)
 
 ################################################################################