@ -6,7 +6,9 @@
#
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e . . / g o l a n g - v e r s i o n . m k
GO_VERSION_MAJOR_MINOR := 1.13
GO_VERSION_PATCH := 7
PKG_NAME := golang
PKG_VERSION := $( GO_VERSION_MAJOR_MINOR) $( if $( GO_VERSION_PATCH) ,.$( GO_VERSION_PATCH) )
@ -34,6 +36,10 @@ PKG_GO_WORK_DIR:=$(PKG_BUILD_DIR)/.go_work
PKG_GO_HOST_CACHE_DIR := $( PKG_GO_WORK_DIR) /host_cache
PKG_GO_TARGET_CACHE_DIR := $( PKG_GO_WORK_DIR) /target_cache
PKG_GO_PREFIX := /usr
PKG_GO_VERSION_ID := $( GO_VERSION_MAJOR_MINOR)
PKG_GO_ROOT := $( PKG_GO_PREFIX) /lib/go-$( PKG_GO_VERSION_ID)
HOST_BUILD_DIR := $( BUILD_DIR_HOST) /go-$( PKG_VERSION)
HOST_BUILD_PARALLEL := 1
@ -178,7 +184,7 @@ $(eval $(call Download,golang-bootstrap))
$( eval $ ( call GoCompiler /AddProfile ,Bootstrap ,$ ( BOOTSTRAP_BUILD_DIR ) ,,bootstrap ,$ ( GO_HOST_OS_ARCH ) ) )
$( eval $ ( call GoCompiler /AddProfile ,Host ,$ ( HOST_BUILD_DIR ) ,$ ( HOST_GO_PREFIX ) ,$ ( HOST_GO_VERSION_ID ) ,$ ( GO_HOST_OS_ARCH ) ,$ ( HOST_GO_INSTALL_SUFFIX ) ) )
$( eval $ ( call GoCompiler /AddProfile ,Package ,$ ( PKG_BUILD_DIR ) ,$ ( GO_TARGET _PREFIX) ,$ ( GO_TARGET _VERSION_ID) ,$ ( GO_OS_ARCH ) ,$ ( PKG_GO_INSTALL_SUFFIX ) ) )
$( eval $ ( call GoCompiler /AddProfile ,Package ,$ ( PKG_BUILD_DIR ) ,$ ( PKG_GO _PREFIX) ,$ ( PKG_GO _VERSION_ID) ,$ ( GO_OS_ARCH ) ,$ ( PKG_GO_INSTALL_SUFFIX ) ) )
d e f i n e H o s t / P r e p a r e
$( call Host/Prepare/Default)
@ -278,8 +284,9 @@ define Build/Compile
( \
cd $( PKG_BUILD_DIR) /bin ; \
export $( call GoPackage/Environment/Target) ; \
$( CP) go go-host ; \
GOROOT_FINAL = $( GO_TARGET _ROOT) \
GOROOT_FINAL = $( PKG_GO _ROOT) \
GOCACHE = $( PKG_GO_TARGET_CACHE_DIR) \
GOENV = off \
GO_GCC_HELPER_CC = " $( TARGET_CC) " \
@ -289,7 +296,6 @@ define Build/Compile
CXX = g++ \
PKG_CONFIG = pkg-config \
PATH = $( HOST_GO_ROOT) /openwrt:$$ $$ PATH \
$( call GoPackage/Environment) \
./go-host install -a $( if $( PKG_GO_ENABLE_PIE) ,-buildmode= pie) std cmd ; \
retval = $$ $$ ? ; \
rm -f go-host ; \
@ -298,16 +304,16 @@ define Build/Compile
e n d e f
d e f i n e P a c k a g e / g o l a n g / i n s t a l l
$( call GoCompiler/Package/Install/Bin,$( 1) $( GO_TARGET _PREFIX) )
$( call GoCompiler/Package/Install/BinLinks,$( 1) $( GO_TARGET _PREFIX) )
$( call GoCompiler/Package/Install/Bin,$( 1) $( PKG_GO _PREFIX) )
$( call GoCompiler/Package/Install/BinLinks,$( 1) $( PKG_GO _PREFIX) )
e n d e f
d e f i n e P a c k a g e / g o l a n g - d o c / i n s t a l l
$( call GoCompiler/Package/Install/Doc,$( 1) $( GO_TARGET _PREFIX) )
$( call GoCompiler/Package/Install/Doc,$( 1) $( PKG_GO _PREFIX) )
e n d e f
d e f i n e P a c k a g e / g o l a n g - s r c / i n s t a l l
$( call GoCompiler/Package/Install/Src,$( 1) $( GO_TARGET _PREFIX) )
$( call GoCompiler/Package/Install/Src,$( 1) $( PKG_GO _PREFIX) )
e n d e f
# src/debug contains ELF executables as test data