Browse Source

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 <jeffery.to@gmail.com>
lilik-openwrt-22.03
Jeffery To 6 years ago
parent
commit
453749f12b
4 changed files with 12 additions and 10 deletions
  1. +4
    -2
      lang/golang/golang-package.mk
  2. +4
    -4
      lang/golang/golang-values.mk
  3. +2
    -2
      lang/golang/golang-version.mk
  4. +2
    -2
      lang/golang/golang/Makefile

+ 4
- 2
lang/golang/golang-package.mk View File

@ -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)'" ; \


+ 4
- 4
lang/golang/golang-values.mk View File

@ -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)


+ 2
- 2
lang/golang/golang-version.mk View File

@ -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

+ 2
- 2
lang/golang/golang/Makefile View File

@ -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


Loading…
Cancel
Save