golang: Update from 1.7.5 to 1.8
This commit is contained in:
parent
26797cb4d1
commit
ff3f67dcef
@ -70,7 +70,7 @@ termux_setup_golang() {
|
||||
termux_error_exit "Unsupported arch: $TERMUX_ARCH"
|
||||
fi
|
||||
|
||||
local TERMUX_GO_VERSION=go1.8rc3
|
||||
local TERMUX_GO_VERSION=go1.8
|
||||
local TERMUX_GO_PLATFORM=linux-amd64
|
||||
|
||||
local TERMUX_BUILDGO_FOLDER=$TERMUX_COMMON_CACHEDIR/${TERMUX_GO_VERSION}
|
||||
@ -83,7 +83,7 @@ termux_setup_golang() {
|
||||
rm -Rf "$TERMUX_COMMON_CACHEDIR/go" "$TERMUX_BUILDGO_FOLDER"
|
||||
termux_download https://storage.googleapis.com/golang/${TERMUX_GO_VERSION}.${TERMUX_GO_PLATFORM}.tar.gz \
|
||||
"$TERMUX_BUILDGO_TAR" \
|
||||
0ff3faba02ac83920a65b453785771e75f128fbf9ba4ad1d5e72c044103f9c7a
|
||||
53ab94104ee3923e228a2cb2116e5e462ad3ebaeea06ff04463479d7f12d27ca
|
||||
( cd "$TERMUX_COMMON_CACHEDIR"; tar xf "$TERMUX_BUILDGO_TAR"; mv go "$TERMUX_BUILDGO_FOLDER"; rm "$TERMUX_BUILDGO_TAR" )
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://golang.org/
|
||||
TERMUX_PKG_DESCRIPTION="Go programming language compiler"
|
||||
_MAJOR_VERSION=1.7.5
|
||||
_MAJOR_VERSION=1.8
|
||||
# Use the ~ deb versioning construct in the future:
|
||||
TERMUX_PKG_VERSION=2:${_MAJOR_VERSION}
|
||||
TERMUX_PKG_SRCURL=https://storage.googleapis.com/golang/go${_MAJOR_VERSION}.src.tar.gz
|
||||
TERMUX_PKG_SHA256=4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815
|
||||
TERMUX_PKG_SHA256=406865f587b44be7092f206d73fc1de252600b79b3cacc587b74b5ef5c623596
|
||||
TERMUX_PKG_FOLDERNAME=go
|
||||
TERMUX_PKG_KEEP_STATIC_LIBRARIES=true
|
||||
TERMUX_PKG_DEPENDS="clang"
|
||||
@ -15,7 +15,7 @@ termux_step_make_install () {
|
||||
TERMUX_GOLANG_DIRNAME=${GOOS}_$GOARCH
|
||||
TERMUX_GODIR=$TERMUX_PREFIX/lib/go
|
||||
rm -Rf $TERMUX_GODIR
|
||||
mkdir -p $TERMUX_GODIR/{src,lib,pkg/tool/$TERMUX_GOLANG_DIRNAME,pkg/include,pkg/${TERMUX_GOLANG_DIRNAME}_shared}
|
||||
mkdir -p $TERMUX_GODIR/{src,lib,pkg/tool/$TERMUX_GOLANG_DIRNAME,pkg/include,pkg/${TERMUX_GOLANG_DIRNAME}}
|
||||
|
||||
cd $TERMUX_PKG_SRCDIR/src
|
||||
env CC_FOR_TARGET=$CC \
|
||||
@ -33,7 +33,7 @@ termux_step_make_install () {
|
||||
cp -Rf src/* $TERMUX_GODIR/src/
|
||||
cp pkg/include/* $TERMUX_GODIR/pkg/include/
|
||||
cp -Rf lib/* $TERMUX_GODIR/lib
|
||||
cp -Rf pkg/${TERMUX_GOLANG_DIRNAME}_shared/* $TERMUX_GODIR/pkg/${TERMUX_GOLANG_DIRNAME}_shared/
|
||||
cp -Rf pkg/${TERMUX_GOLANG_DIRNAME}/* $TERMUX_GODIR/pkg/${TERMUX_GOLANG_DIRNAME}/
|
||||
}
|
||||
|
||||
termux_step_post_massage () {
|
||||
|
@ -1,16 +0,0 @@
|
||||
https://go-review.googlesource.com/#/c/34794/
|
||||
|
||||
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go
|
||||
index 542f214..9151aff 100644
|
||||
--- a/src/runtime/os_linux.go
|
||||
+++ b/src/runtime/os_linux.go
|
||||
@@ -91,6 +91,9 @@ func getproccount() int32 {
|
||||
const maxCPUs = 64 * 1024
|
||||
var buf [maxCPUs / (sys.PtrSize * 8)]uintptr
|
||||
r := sched_getaffinity(0, unsafe.Sizeof(buf), &buf[0])
|
||||
+ if r <= 0 {
|
||||
+ return 1
|
||||
+ }
|
||||
n := int32(0)
|
||||
for _, v := range buf[:r/sys.PtrSize] {
|
||||
for v != 0 {
|
Loading…
Reference in New Issue
Block a user