Browse Source

Merge pull request #11020 from jefferyto/golang-updates

golang: More updates
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
e899347ed6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 5 deletions
  1. +9
    -0
      lang/golang/golang-package.mk
  2. +24
    -2
      lang/golang/golang-values.mk
  3. +1
    -1
      lang/golang/golang-version.mk
  4. +2
    -2
      lang/golang/golang/Makefile

+ 9
- 0
lang/golang/golang-package.mk View File

@ -120,6 +120,14 @@ GO_PKG_BUILD_BIN_DIR:=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$
GO_PKG_BUILD_DEPENDS_SRC:=$(STAGING_DIR)$(GO_PKG_PATH)/src
ifeq ($(CONFIG_PKG_ASLR_PIE),y)
ifeq ($(strip $(PKG_ASLR_PIE)),1)
ifeq ($(GO_TARGET_PIE_SUPPORTED),1)
GO_PKG_ENABLE_PIE:=1
endif
endif
endif
# sstrip causes corrupted section header size
ifneq ($(CONFIG_USE_SSTRIP),)
ifneq ($(CONFIG_DEBUG),)
@ -281,6 +289,7 @@ define GoPackage/Build/Compile
pkg_ldflags="$$$$pkg_ldflags -X $$$$def" ; \
done ; \
go install \
$(if $(GO_PKG_ENABLE_PIE),-buildmode pie) \
$$$${installsuffix:+-installsuffix $$$$installsuffix} \
-trimpath \
-ldflags "all=$$$$ldflags" \


+ 24
- 2
lang/golang/golang-values.mk View File

@ -155,9 +155,31 @@ ifeq ($(GO_ARCH),386)
GO_CFLAGS_TO_REMOVE:=-fno-plt
else ifeq ($(GO_ARCH),arm)
ifeq ($(CONFIG_arm_v7),y)
GO_TARGET_FPU:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
# FPU names from https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/ARM-Options.html#index-mfpu-1
# see also https://github.com/gcc-mirror/gcc/blob/gcc-8_3_0-release/gcc/config/arm/arm-cpus.in
#
# Assumptions:
#
# * -d16 variants (16 instead of 32 double-precision registers) acceptable
# Go doesn't appear to check the HWCAP_VFPv3D16 flag in
# https://github.com/golang/go/blob/release-branch.go1.13/src/runtime/os_linux_arm.go
#
# * Double-precision required
# Based on no evidence(!)
# Excludes vfpv3xd, vfpv3xd-fp16, fpv4-sp-d16, fpv5-sp-d16
GO_ARM_7_FPUS:= \
vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 neon neon-vfpv3 neon-fp16 \
vfpv4 vfpv4-d16 neon-vfpv4 \
fpv5-d16 fp-armv8 neon-fp-armv8 crypto-neon-fp-armv8
GO_ARM_6_FPUS:=vfp vfpv2
ifneq ($(filter $(GO_TARGET_FPU),$(GO_ARM_7_FPUS)),)
GO_ARM:=7
else ifeq ($(CONFIG_arm_v6),y)
else ifneq ($(filter $(GO_TARGET_FPU),$(GO_ARM_6_FPUS)),)
GO_ARM:=6
else
GO_ARM:=5


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

@ -11,4 +11,4 @@ endif
GO_VERSION_MAJOR_MINOR:=1.13
GO_VERSION_PATCH:=5
GO_VERSION_PATCH:=6

+ 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:=27d356e2a0b30d9983b60a788cf225da5f914066b37a6b4f69d457ba55a626ff
PKG_HASH:=aae5be954bdc40bcf8006eb77e8d8a5dde412722bc8effcdaf9772620d06420c
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE


Loading…
Cancel
Save