From 453749f12b5fbace850f3dfcd86c5857c129fba8 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 13 Oct 2018 02:23:15 +0800 Subject: [PATCH] golang: Update to 1.11.1, add mips64 / mips64el builds Go 1.11 added softfloat support for 64-bit MIPS systems[1], so this also adds builds for mips64 and mips64el. [1] https://golang.org/doc/go1.11#mips Signed-off-by: Jeffery To --- lang/golang/golang-package.mk | 6 ++++-- lang/golang/golang-values.mk | 8 ++++---- lang/golang/golang-version.mk | 4 ++-- lang/golang/golang/Makefile | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lang/golang/golang-package.mk b/lang/golang/golang-package.mk index 3c4aeab14..11aa212e4 100644 --- a/lang/golang/golang-package.mk +++ b/lang/golang/golang-package.mk @@ -129,6 +129,7 @@ define GoPackage/Environment GO386=$(GO_386) \ GOARM=$(GO_ARM) \ GOMIPS=$(GO_MIPS) \ + GOMIPS64=$(GO_MIPS64) \ CGO_ENABLED=1 \ CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \ CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \ @@ -234,8 +235,9 @@ define GoPackage/Build/Compile \ if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \ case $(GO_ARCH) in \ - arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \ - mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \ + arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \ + mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \ + mips64|mips64le) installsuffix="-installsuffix $(GO_MIPS64)" ;; \ esac ; \ trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \ ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \ diff --git a/lang/golang/golang-values.mk b/lang/golang/golang-values.mk index 13763e364..893f9296d 100644 --- a/lang/golang/golang-values.mk +++ b/lang/golang/golang-values.mk @@ -20,7 +20,7 @@ unexport \ CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \ CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \ CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \ - GOARM GO386 GOMIPS \ + GOARM GO386 GOMIPS GOMIPS64 \ GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \ CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \ BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC @@ -57,15 +57,15 @@ GO_ARM:=$(if $(CONFIG_arm_v7),7,$(if $(CONFIG_arm_v6),6,$(if $(findstring $(GO_A GO_MIPS:=$(if $(filter $(GO_ARCH),mips mipsle),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),) +GO_MIPS64:=$(if $(filter $(GO_ARCH),mips64 mips64le),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),) + # -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors # -mips32r2: conflicts with -march=mips32 set by go GO_CFLAGS_TO_REMOVE:=$(if \ $(filter $(GO_ARCH),386),-fno-plt,$(if \ $(filter $(GO_ARCH),mips mipsle),-mips32r2,)) -# mips64 / mips64el doesn't have softfloat support yet -# https://github.com/golang/go/issues/14635 -GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||powerpc64||x86_64) +GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mips64||mips64el||mipsel||powerpc64||x86_64) GO_TARGET_PREFIX:=/usr GO_TARGET_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR) diff --git a/lang/golang/golang-version.mk b/lang/golang/golang-version.mk index 27184b7d9..8fdafd03a 100644 --- a/lang/golang/golang-version.mk +++ b/lang/golang/golang-version.mk @@ -10,5 +10,5 @@ ifeq ($(origin GO_INCLUDE_DIR),undefined) endif -GO_VERSION_MAJOR_MINOR:=1.10 -GO_VERSION_PATCH:=3 +GO_VERSION_MAJOR_MINOR:=1.11 +GO_VERSION_PATCH:=1 diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index 898b1db9a..c9a27fda0 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -10,7 +10,7 @@ include ../golang-version.mk PKG_NAME:=golang PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH)) -PKG_RELEASE:=2 +PKG_RELEASE:=1 GO_SOURCE_URLS:=https://dl.google.com/go/ \ https://mirrors.ustc.edu.cn/golang/ \ @@ -18,7 +18,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \ PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz PKG_SOURCE_URL:=$(GO_SOURCE_URLS) -PKG_HASH:=567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2 +PKG_HASH:=558f8c169ae215e25b81421596e8de7572bd3ba824b79add22fba6e284db1117 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE