golang: Add the ability to custom build environment 9209/head
authorXingwang Liao <kuoruan@gmail.com>
Mon, 10 Jun 2019 02:42:52 +0000 (10:42 +0800)
committerXingwang Liao <kuoruan@gmail.com>
Mon, 10 Jun 2019 02:42:52 +0000 (10:42 +0800)
by overwrite the GoPackage/Environment definition

Signed-off-by: Xingwang Liao <kuoruan@gmail.com>
lang/golang/golang-package.mk

index 7522a9f4fa6f85e86cb99631d6f22246ff8b2915..d1d189eb527a95894ef9308049439aed9f036f84 100644 (file)
@@ -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)