package/go: pass CFLAGS/CXXFLAGS/LDFLAGS in HOST_GO_TARGET_ENV
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 29 Aug 2020 09:13:07 +0000 (11:13 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 29 Aug 2020 12:35:49 +0000 (14:35 +0200)
HOST_GO_HOST_ENV is explicitly specifying
HOST_CGO_{CFLAGS,CXXFLAGS,LDFLAGS}, so let's do the same for target
packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/go/go.mk

index 9f86374300e20b2e6de1a02ff8810894fd2e53ab..af1548a65e7581f880540ab3eb0eac14f25f2eac 100644 (file)
@@ -55,6 +55,9 @@ HOST_GO_TARGET_ENV = \
        GOCACHE="$(HOST_GO_TARGET_CACHE)" \
        CC="$(TARGET_CC)" \
        CXX="$(TARGET_CXX)" \
+       CGO_CFLAGS="$(TARGET_CFLAGS)" \
+       CGO_CXXFLAGS="$(TARGET_CXXFLAGS)" \
+       CGO_LDFLAGS="$(TARGET_LDFLAGS)" \
        GOTOOLDIR="$(HOST_GO_TOOLDIR)"
 
 # The go compiler's cgo support uses threads.  If BR2_TOOLCHAIN_HAS_THREADS is