mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 07:46:41 +00:00
Update gosuper to go 1.7.6
Adapting Petros' x86 patches to the new version Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
fc4b9656cd
commit
d21c7faf4e
@ -9,9 +9,9 @@ RUN apt-get update \
|
||||
upx-ucl \
|
||||
&& rm -rf /var/lib/apt/lists/
|
||||
|
||||
ENV GOLANG_VERSION 1.6.3
|
||||
ENV GOLANG_VERSION 1.7.6
|
||||
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
|
||||
ENV GOLANG_DOWNLOAD_SHA256 cdde5e08530c0579255d6153b08fdb3b8e47caabbe717bc7bcd7561275a87aeb
|
||||
ENV GOLANG_DOWNLOAD_SHA256 ad5808bf42b014c22dd7646458f631385003049ded0bb6af2efc7f1f79fa29ea
|
||||
|
||||
COPY go-${GOLANG_VERSION}-patches /go-${GOLANG_VERSION}-patches
|
||||
|
||||
@ -25,7 +25,7 @@ RUN mkdir /usr/src/go \
|
||||
&& export GOROOT_BOOTSTRAP=/usr/local/go-bootstrap \
|
||||
&& cp -r /usr/local/go /usr/local/go-bootstrap \
|
||||
&& cd /usr/local/go/src \
|
||||
&& patch -p2 -i /go-${GOLANG_VERSION}-patches/0001-Revert-runtime-check-and-fail-early-with-a-message-i.patch \
|
||||
&& patch -p2 -i /go-${GOLANG_VERSION}-patches/0001-dont-fail-when-no-mmx.patch \
|
||||
&& patch -p2 -i /go-${GOLANG_VERSION}-patches/0002-implement-atomic-quadword-ops-with-FILD-FISTP.patch \
|
||||
&& ./make.bash \
|
||||
&& rm -rf /usr/local/go-bootstrap
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 0ea3a41d2dc8b222093f191e6c2b7c3c89ac4e87 Mon Sep 17 00:00:00 2001
|
||||
From: Petros Angelatos <petrosagg@gmail.com>
|
||||
Date: Thu, 20 Oct 2016 20:20:56 -0700
|
||||
Subject: [PATCH 1/2] Revert "runtime: check and fail early with a message if
|
||||
MMX is not available on 386"
|
||||
commit e85665ea84c11128b8d2408054372ee81598e09d
|
||||
Author: Pablo Carranza Velez <pablo@resin.io>
|
||||
Date: Fri Jun 9 14:57:23 2017 -0700
|
||||
|
||||
This reverts commit 35e84546d7c3cc599dd5bf31ad86bf8d3d841d04.
|
||||
---
|
||||
src/runtime/asm_386.s | 42 ------------------------------------------
|
||||
1 file changed, 42 deletions(-)
|
||||
Do not fail when there's no MMX support
|
||||
|
||||
Adapted from https://github.com/resin-io/resin-supervisor/blob/c7a7ba93fb46775006f0739ced41fc0a2059b426/gosuper/go-1.6.3-patches/0001-Revert-runtime-check-and-fail-early-with-a-message-i.patch
|
||||
Original author: Petros Angelatos <petrosagg@gmail.com>
|
||||
|
||||
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
|
||||
|
||||
diff --git a/src/runtime/asm_386.s b/src/runtime/asm_386.s
|
||||
index 4181859..942446e 100644
|
||||
index ea11b2b..d3a3cdf 100644
|
||||
--- a/src/runtime/asm_386.s
|
||||
+++ b/src/runtime/asm_386.s
|
||||
@@ -26,32 +26,6 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$0
|
||||
@ -45,8 +45,8 @@ index 4181859..942446e 100644
|
||||
-has_cpuid:
|
||||
MOVL $0, AX
|
||||
CPUID
|
||||
CMPL AX, $0
|
||||
@@ -74,11 +48,6 @@ notintel:
|
||||
MOVL AX, SI
|
||||
@@ -76,11 +50,6 @@ notintel:
|
||||
MOVL CX, AX // Move to global variable clobbers CX when generating PIC
|
||||
MOVL AX, runtime·cpuid_ecx(SB)
|
||||
MOVL DX, runtime·cpuid_edx(SB)
|
||||
@ -55,10 +55,10 @@ index 4181859..942446e 100644
|
||||
- TESTL $(1<<23), DX // MMX
|
||||
- JZ bad_proc
|
||||
-
|
||||
nocpuinfo:
|
||||
|
||||
// if there is an _cgo_init, call it to let it
|
||||
@@ -160,17 +129,6 @@ ok:
|
||||
// Load EAX=7/ECX=0 cpuid flags
|
||||
CMPL SI, $7
|
||||
JLT nocpuinfo
|
||||
@@ -170,17 +139,6 @@ ok:
|
||||
INT $3
|
||||
RET
|
||||
|
||||
@ -66,7 +66,7 @@ index 4181859..942446e 100644
|
||||
-DATA bad_proc_msg<>+0x08(SB)/8, $"gram can"
|
||||
-DATA bad_proc_msg<>+0x10(SB)/8, $" only be"
|
||||
-DATA bad_proc_msg<>+0x18(SB)/8, $" run on "
|
||||
-DATA bad_proc_msg<>+0x20(SB)/8, $"processe"
|
||||
-DATA bad_proc_msg<>+0x20(SB)/8, $"processo"
|
||||
-DATA bad_proc_msg<>+0x28(SB)/8, $"rs with "
|
||||
-DATA bad_proc_msg<>+0x30(SB)/8, $"MMX supp"
|
||||
-DATA bad_proc_msg<>+0x38(SB)/4, $"ort."
|
||||
@ -76,6 +76,3 @@ index 4181859..942446e 100644
|
||||
DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
|
||||
GLOBL runtime·mainPC(SB),RODATA,$4
|
||||
|
||||
--
|
||||
2.10.0
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 973d55e9e319a895e406c89413563a2fc787e98c Mon Sep 17 00:00:00 2001
|
||||
From: Petros Angelatos <petrosagg@gmail.com>
|
||||
Date: Tue, 18 Oct 2016 08:13:44 -0700
|
||||
Subject: [PATCH 2/2] implement atomic quadword ops with FILD/FISTP
|
||||
commit a8e51a8828f69365a1381821942df96300fe80b2
|
||||
Author: Pablo Carranza Velez <pablo@resin.io>
|
||||
Date: Fri Jun 9 15:07:55 2017 -0700
|
||||
|
||||
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
|
||||
---
|
||||
src/runtime/internal/atomic/asm_386.s | 21 ++++++++-------------
|
||||
src/sync/atomic/asm_386.s | 20 ++++++++------------
|
||||
2 files changed, 16 insertions(+), 25 deletions(-)
|
||||
Implement atomic quadword ops with FILD/FISTP
|
||||
|
||||
Adapted from https://github.com/resin-io/resin-supervisor/blob/c7a7ba93fb46775006f0739ced41fc0a2059b426/gosuper/go-1.6.3-patches/0002-implement-atomic-quadword-ops-with-FILD-FISTP.patch
|
||||
Original author: Petros Angelatos <petrosagg@gmail.com>
|
||||
|
||||
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
|
||||
|
||||
diff --git a/src/runtime/internal/atomic/asm_386.s b/src/runtime/internal/atomic/asm_386.s
|
||||
index ce84fd8..cd91023 100644
|
||||
index 357d830..bf40433 100644
|
||||
--- a/src/runtime/internal/atomic/asm_386.s
|
||||
+++ b/src/runtime/internal/atomic/asm_386.s
|
||||
@@ -121,12 +121,10 @@ TEXT runtime∕internal∕atomic·Load64(SB), NOSPLIT, $0-12
|
||||
@ -49,7 +49,7 @@ index ce84fd8..cd91023 100644
|
||||
// It can be replaced with MFENCE, but MFENCE was introduced only on the Pentium4 (SSE2).
|
||||
MOVL $0, AX
|
||||
diff --git a/src/sync/atomic/asm_386.s b/src/sync/atomic/asm_386.s
|
||||
index 383d759..b706047 100644
|
||||
index f2a13da..c7787a4 100644
|
||||
--- a/src/sync/atomic/asm_386.s
|
||||
+++ b/src/sync/atomic/asm_386.s
|
||||
@@ -157,12 +157,10 @@ TEXT ·LoadUint64(SB),NOSPLIT,$0-12
|
||||
@ -86,6 +86,3 @@ index 383d759..b706047 100644
|
||||
// This is essentially a no-op, but it provides required memory fencing.
|
||||
// It can be replaced with MFENCE, but MFENCE was introduced only on the Pentium4 (SSE2).
|
||||
XORL AX, AX
|
||||
--
|
||||
2.10.0
|
||||
|
Loading…
Reference in New Issue
Block a user