Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfab625907 | ||
|
|
2be5dda0bb | ||
|
|
9bd81c1e9a | ||
|
|
acc4979e2e | ||
|
|
d836480d91 | ||
|
|
760b16b4e4 | ||
|
|
d90858eb2c | ||
|
|
ed2c530698 | ||
|
|
5f47662dbb | ||
|
|
f82d4dde52 | ||
|
|
de98b9b6d3 | ||
|
|
e61be40a34 | ||
|
|
8af50ec406 | ||
|
|
5f1e7e6d6f | ||
|
|
cf0f4c1239 | ||
|
|
38b8096a81 | ||
|
|
e9dfb8bb01 | ||
|
|
41cefb9566 | ||
|
|
034d17a98a | ||
|
|
1bf93c9a6f | ||
|
|
e04d714126 | ||
|
|
584b340de9 |
@@ -4,5 +4,5 @@
|
||||
|
||||
```shell
|
||||
rm -rf feeds/packages/lang/golang
|
||||
git clone https://github.com/sbwml/packages_lang_golang -b 20.x feeds/packages/lang/golang
|
||||
git clone https://github.com/sbwml/packages_lang_golang -b 22.x feeds/packages/lang/golang
|
||||
```
|
||||
|
||||
@@ -57,9 +57,10 @@ define GoCompiler/Default/Install/Bin
|
||||
|
||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),api)
|
||||
|
||||
$(INSTALL_DATA) -p "$(1)/go.env" "$(2)/lib/go-$(3)/"
|
||||
$(INSTALL_DATA) -p "$(1)/VERSION" "$(2)/lib/go-$(3)/"
|
||||
|
||||
for file in AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README.md SECURITY.md; do \
|
||||
for file in CONTRIBUTING.md LICENSE PATENTS README.md SECURITY.md; do \
|
||||
if [ -f "$(1)/$$$$file" ]; then \
|
||||
$(INSTALL_DATA) -p "$(1)/$$$$file" "$(2)/share/go-$(3)/" ; \
|
||||
fi ; \
|
||||
|
||||
@@ -215,7 +215,8 @@ GO_PKG_BUILD_VARS= \
|
||||
GOPATH="$(GO_PKG_BUILD_DIR)" \
|
||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
||||
GOMODCACHE="$(GO_MOD_CACHE_DIR)" \
|
||||
GOENV=off
|
||||
GOENV=off \
|
||||
GOTOOLCHAIN=local
|
||||
|
||||
GO_PKG_VARS= \
|
||||
$(GO_PKG_TARGET_VARS) \
|
||||
|
||||
@@ -28,6 +28,7 @@ unexport \
|
||||
GOFLAGS \
|
||||
GOOS \
|
||||
GOPATH \
|
||||
GOTOOLCHAIN \
|
||||
GOROOT \
|
||||
GOTMPDIR \
|
||||
GOWORK
|
||||
@@ -215,7 +216,7 @@ GO_PIE_SUPPORTED_OS_ARCH:= \
|
||||
\
|
||||
aix_ppc64 \
|
||||
\
|
||||
linux_ppc64le linux_riscv64 linux_s390x
|
||||
linux_loong64 linux_ppc64le linux_riscv64 linux_s390x
|
||||
|
||||
# From https://go.dev/src/cmd/go/internal/work/init.go
|
||||
go_pie_install_suffix=$(if $(filter $(1),aix_ppc64 windows_386 windows_amd64 windows_arm),,shared)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
GO_VERSION_MAJOR_MINOR:=1.20
|
||||
GO_VERSION_PATCH:=7
|
||||
GO_VERSION_MAJOR_MINOR:=1.22
|
||||
GO_VERSION_PATCH:=12
|
||||
|
||||
PKG_NAME:=golang
|
||||
PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
|
||||
@@ -20,7 +20,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:=2c5ee9c9ec1e733b0dbbc2bdfed3f62306e51d8172bf38f4f4e542b27520f597
|
||||
PKG_HASH:=012a7e1f37f362c0918c1dfa3334458ac2da1628c4b9cf4d9ca02db986e17d71
|
||||
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
@@ -63,6 +63,7 @@ HOST_GO_VALID_OS_ARCH:= \
|
||||
\
|
||||
aix_ppc64 \
|
||||
js_wasm \
|
||||
wasip1_wasm \
|
||||
\
|
||||
linux_ppc64 linux_ppc64le \
|
||||
linux_mips linux_mipsle linux_mips64 linux_mips64le \
|
||||
@@ -73,15 +74,15 @@ HOST_GO_VALID_OS_ARCH:= \
|
||||
|
||||
ifeq ($(HOST_ARCH),x86_64)
|
||||
PKG_ARCH:=amd64
|
||||
SHA256:=550f9845451c0c94be679faf116291e7807a8d78b43149f9506c1b15eb89008c
|
||||
SHA256:=b945ae2bb5db01a0fb4786afde64e6fbab50b67f6fa0eb6cfa4924f16a7ff1eb
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_ARCH),aarch64)
|
||||
PKG_ARCH:=arm64
|
||||
SHA256:=06f505c8d27203f78706ad04e47050b49092f1b06dc9ac4fbee4f0e4d015c8d4
|
||||
SHA256:=4e15ab37556e979181a1a1cc60f6d796932223a0f5351d7c83768b356f84429b
|
||||
endif
|
||||
|
||||
BOOTSTRAP_SOURCE:=go1.17.3.linux-$(PKG_ARCH).tar.gz
|
||||
BOOTSTRAP_SOURCE:=go1.20.6.linux-$(PKG_ARCH).tar.gz
|
||||
BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS)
|
||||
BOOTSTRAP_HASH:=$(SHA256)
|
||||
|
||||
@@ -271,7 +272,7 @@ $(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(PKG_GO_PREFIX),$(
|
||||
PKG_GO_ZBOOTSTRAP_MODS:= \
|
||||
s/defaultGO386 = `[^`]*`/defaultGO386 = `$(or $(GO_386),sse2)`/; \
|
||||
s/defaultGOAMD64 = `[^`]*`/defaultGOAMD64 = `$(or $(GO_AMD64),v1)`/; \
|
||||
s/defaultGOARM = `[^`]*`/defaultGOARM = `$(or $(GO_ARM),5)`/; \
|
||||
s/defaultGOARM = `[^`]*`/defaultGOARM = `$(or $(GO_ARM),7)`/; \
|
||||
s/defaultGOMIPS = `[^`]*`/defaultGOMIPS = `$(or $(GO_MIPS),hardfloat)`/; \
|
||||
s/defaultGOMIPS64 = `[^`]*`/defaultGOMIPS64 = `$(or $(GO_MIPS64),hardfloat)`/; \
|
||||
s/defaultGOPPC64 = `[^`]*`/defaultGOPPC64 = `$(or $(GO_PPC64),power8)`/;
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
From 5ccf9f47bf4f5ba53e0ab7338a7fd4626714cfb2 Mon Sep 17 00:00:00 2001
|
||||
From: Jeffery To <jeffery.to@gmail.com>
|
||||
Date: Tue, 23 Nov 2021 15:05:37 +0800
|
||||
Subject: [PATCH] cmd/link: use gold on ARM/ARM64 only if gold is available
|
||||
|
||||
COPY relocation handling on ARM/ARM64 has been fixed in recent versions
|
||||
of the GNU linker. This switches to gold only if gold is available.
|
||||
|
||||
Fixes #22040.
|
||||
---
|
||||
src/cmd/link/internal/ld/lib.go | 19 +++++++------------
|
||||
1 file changed, 7 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/src/cmd/link/internal/ld/lib.go
|
||||
+++ b/src/cmd/link/internal/ld/lib.go
|
||||
@@ -1393,25 +1393,20 @@ func (ctxt *Link) hostlink() {
|
||||
}
|
||||
|
||||
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && buildcfg.GOOS == "linux" {
|
||||
- // On ARM, the GNU linker will generate COPY relocations
|
||||
- // even with -znocopyreloc set.
|
||||
+ // On ARM, older versions of the GNU linker will generate
|
||||
+ // COPY relocations even with -znocopyreloc set.
|
||||
// https://sourceware.org/bugzilla/show_bug.cgi?id=19962
|
||||
//
|
||||
- // On ARM64, the GNU linker will fail instead of
|
||||
- // generating COPY relocations.
|
||||
+ // On ARM64, older versions of the GNU linker will fail
|
||||
+ // instead of generating COPY relocations.
|
||||
//
|
||||
- // In both cases, switch to gold.
|
||||
- altLinker = "gold"
|
||||
-
|
||||
- // If gold is not installed, gcc will silently switch
|
||||
- // back to ld.bfd. So we parse the version information
|
||||
- // and provide a useful error if gold is missing.
|
||||
+ // In both cases, switch to gold if gold is available.
|
||||
name, args := flagExtld[0], flagExtld[1:]
|
||||
args = append(args, "-fuse-ld=gold", "-Wl,--version")
|
||||
cmd := exec.Command(name, args...)
|
||||
if out, err := cmd.CombinedOutput(); err == nil {
|
||||
- if !bytes.Contains(out, []byte("GNU gold")) {
|
||||
- log.Fatalf("ARM external linker must be gold (issue #15696), but is not: %s", out)
|
||||
+ if bytes.Contains(out, []byte("GNU gold")) {
|
||||
+ altLinker = "gold"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user