[Buildroot] [git commit] package/go: pass CFLAGS/CXXFLAGS/LDFLAGS in HOST_GO_TARGET_ENV

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Aug 29 12:35:49 UTC 2020


commit: https://git.buildroot.net/buildroot/commit/?id=7a89fa07ee2813a515da91d884ce5920e1ba1887
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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 at bootlin.com>
---
 package/go/go.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/go/go.mk b/package/go/go.mk
index 9f86374300..af1548a65e 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -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


More information about the buildroot mailing list