@ -154,6 +154,23 @@ This package provides an assembler, compiler, linker, and compiled
l i b r a r i e s f o r t h e G o p r o g r a m m i n g l a n g u a g e .
e n d e f
d e f i n e P a c k a g e / g o l a n g / c o n f i g
m e n u "Configuration"
c o n f i g G O L A N G _ E X T E R N A L _ B O O T S T R A P _ R O O T
string "External bootstrap Go root directory"
help
Path to a working Go tree ( >= Go 1.4) , with bin, pkg, and src
subdirectories and the Go compiler at bin/go.
If specified, the existing Go installation will be used to
compile host ( buildroot) Go.
Leave blank to compile the default bootstrap Go.
e n d m e n u
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
$( call Package /golang /Default )
TITLE += ( documentation)
@ -177,22 +194,29 @@ This package provides the Go programming language source files needed
f o r c r o s s - c o m p i l a t i o n .
e n d e f
EXTERNAL_BOOTSTRAP_DIR := $( call qstrip,$( CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT) )
USE_DEFAULT_BOOTSTRAP := $( if $( EXTERNAL_BOOTSTRAP_DIR) ,,1)
d e f i n e D o w n l o a d / g o l a n g - b o o t s t r a p
FILE:= $( BOOTSTRAP_SOURCE)
URL:= $( BOOTSTRAP_SOURCE_URL)
HASH:= $( BOOTSTRAP_HASH)
e n d e f
$( 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 ) ,$ ( 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
i f e q ( $( USE_DEFAULT_BOOTSTRAP ) , 1 )
$( eval $( call GoCompiler/AddProfile,Bootstrap,$( BOOTSTRAP_BUILD_DIR) ,,bootstrap,$( GO_HOST_OS_ARCH) ) )
$( eval $( call Download,golang-bootstrap) )
define Host/Prepare
$( call Host/Prepare/Default)
mkdir -p $( BOOTSTRAP_BUILD_DIR)
$( BOOTSTRAP_UNPACK)
e n d e f
endef
e n d i f
# when https://github.com/golang/go/issues/31544 is fixed,
# we should be able to set GO_LDFLAGS=-buildmode=pie for host make
@ -212,7 +236,7 @@ define Host/Compile
)
$( call GoCompiler/Host/Make, \
GOROOT_BOOTSTRAP = $( BOOTSTRAP_BUILD_DIR) \
GOROOT_BOOTSTRAP = $( if $( USE_DEFAULT_BOOTSTRAP) ,$( BOOTSTRAP_BUILD_DIR) ,$( EXTERNAL_BOOTSTRAP_DIR) ) \
GOCACHE = $( HOST_GO_CACHE_DIR) \
CC = $( HOSTCC_NOCACHE) \
CXX = $( HOSTCXX_NOCACHE) \