From f072cd6adf0a67f23405aad1a3ede370288c1526 Mon Sep 17 00:00:00 2001 From: Xingwang Liao Date: Mon, 10 Jun 2019 10:42:52 +0800 Subject: [PATCH] golang: Add the ability to custom build environment by overwrite the GoPackage/Environment definition Signed-off-by: Xingwang Liao --- lang/golang/golang-package.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/golang/golang-package.mk b/lang/golang/golang-package.mk index 7522a9f4f..d1d189eb5 100644 --- a/lang/golang/golang-package.mk +++ b/lang/golang/golang-package.mk @@ -147,7 +147,7 @@ define GoPackage/GoSubMenu CATEGORY:=Languages endef -define GoPackage/Environment +define GoPackage/Environment/Default GOOS=$(GO_OS) \ GOARCH=$(GO_ARCH) \ GO386=$(GO_386) \ @@ -160,6 +160,8 @@ define GoPackage/Environment CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" endef +GoPackage/Environment=$(call GoPackage/Environment/Default,) + # false if directory does not exist GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null)