1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update Golang

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-09-29 14:39:34 +02:00
parent 0f3078a19c
commit c5f6a26bb1
14 changed files with 56 additions and 264 deletions

View file

@ -1,5 +1,5 @@
#
# Copyright (C) 2018-2020 Jeffery To
# Copyright (C) 2018-2022 Jeffery To
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -32,7 +32,7 @@ include $(GO_INCLUDE_DIR)/golang-values.mk
#
# * Files in any 'testdata' directory
#
# * go.mod and go.sum, in any directory
# * go.mod, go.sum and go.work, in any directory
#
# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml
#
@ -198,9 +198,11 @@ GO_PKG_TARGET_VARS= \
GOOS="$(GO_OS)" \
GOARCH="$(GO_ARCH)" \
GO386="$(GO_386)" \
GOAMD64="$(GO_AMD64)" \
GOARM="$(GO_ARM)" \
GOMIPS="$(GO_MIPS)" \
GOMIPS64="$(GO_MIPS64)" \
GOPPC64="$(GO_PPC64)" \
CGO_ENABLED=1 \
CC="$(TARGET_CC)" \
CXX="$(TARGET_CXX)" \
@ -213,7 +215,8 @@ GO_PKG_BUILD_VARS= \
GOPATH="$(GO_PKG_BUILD_DIR)" \
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
GOMODCACHE="$(GO_MOD_CACHE_DIR)" \
GOENV=off GOPROXY="direct"
GOENV=off GOPROXY="direct" \
GOTOOLCHAIN=local
GO_PKG_VARS= \
$(GO_PKG_TARGET_VARS) \
@ -236,17 +239,18 @@ GO_PKG_CUSTOM_LDFLAGS= \
GO_PKG_INSTALL_ARGS= \
-v \
-buildvcs=false \
-trimpath \
-ldflags "all=$(GO_PKG_DEFAULT_LDFLAGS)" \
$(if $(GO_PKG_DEFAULT_GCFLAGS),-gcflags "all=$(GO_PKG_DEFAULT_GCFLAGS)") \
$(if $(GO_PKG_DEFAULT_ASMFLAGS),-asmflags "all=$(GO_PKG_DEFAULT_ASMFLAGS)") \
$(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie) \
$(if $(strip $(GO_PKG_DEFAULT_GCFLAGS)),-gcflags "all=$(GO_PKG_DEFAULT_GCFLAGS)") \
$(if $(strip $(GO_PKG_DEFAULT_ASMFLAGS)),-asmflags "all=$(GO_PKG_DEFAULT_ASMFLAGS)") \
$(if $(GO_PKG_ENABLE_PIE),-buildmode pie) \
$(if $(filter $(GO_ARCH),arm),-installsuffix "v$(GO_ARM)") \
$(if $(filter $(GO_ARCH),mips mipsle),-installsuffix "$(GO_MIPS)") \
$(if $(filter $(GO_ARCH),mips64 mips64le),-installsuffix "$(GO_MIPS64)") \
$(if $(GO_PKG_GCFLAGS),-gcflags "$(GO_PKG_GCFLAGS) $(GO_PKG_DEFAULT_GCFLAGS)") \
$(if $(GO_PKG_CUSTOM_LDFLAGS),-ldflags "$(GO_PKG_CUSTOM_LDFLAGS) $(GO_PKG_DEFAULT_LDFLAGS)") \
$(if $(GO_PKG_TAGS),-tags "$(GO_PKG_TAGS)")
$(if $(strip $(GO_PKG_GCFLAGS)),-gcflags "$(GO_PKG_GCFLAGS) $(GO_PKG_DEFAULT_GCFLAGS)") \
$(if $(strip $(GO_PKG_CUSTOM_LDFLAGS)),-ldflags "$(GO_PKG_CUSTOM_LDFLAGS) $(GO_PKG_DEFAULT_LDFLAGS)") \
$(if $(strip $(GO_PKG_TAGS)),-tags "$(GO_PKG_TAGS)")
define GoPackage/Build/Configure
$(GO_GENERAL_BUILD_CONFIG_VARS) \
@ -314,14 +318,3 @@ define GoSrcPackage
Package/$(1)/install=$$(call GoPackage/Package/Install/Src,$$(1))
endif
endef
# Deprecated variables - these will be removed after the next OpenWrt release
GO_PKG_PATH=$(GO_PKG_BUILD_DEPENDS_PATH)
GO_PKG_WORK_DIR=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME)
GO_PKG_CACHE_DIR=$(GO_BUILD_CACHE_DIR)
GO_PKG_DEFAULT_VARS=$(GO_PKG_VARS)
GoPackage/Environment=$(GO_PKG_VARS)
GoPackage/is_dir_not_empty=$$$$($(FIND) "$(1)" -maxdepth 0 -type d \! -empty 2>/dev/null)
GoPackage/has_binaries=$(call GoPackage/is_dir_not_empty,$(GO_PKG_BUILD_BIN_DIR))
# End of deprecated variables