mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 21:57:54 +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 \
|
upx-ucl \
|
||||||
&& rm -rf /var/lib/apt/lists/
|
&& 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_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
|
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 \
|
&& export GOROOT_BOOTSTRAP=/usr/local/go-bootstrap \
|
||||||
&& cp -r /usr/local/go /usr/local/go-bootstrap \
|
&& cp -r /usr/local/go /usr/local/go-bootstrap \
|
||||||
&& cd /usr/local/go/src \
|
&& 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 \
|
&& patch -p2 -i /go-${GOLANG_VERSION}-patches/0002-implement-atomic-quadword-ops-with-FILD-FISTP.patch \
|
||||||
&& ./make.bash \
|
&& ./make.bash \
|
||||||
&& rm -rf /usr/local/go-bootstrap
|
&& rm -rf /usr/local/go-bootstrap
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
From 0ea3a41d2dc8b222093f191e6c2b7c3c89ac4e87 Mon Sep 17 00:00:00 2001
|
commit e85665ea84c11128b8d2408054372ee81598e09d
|
||||||
From: Petros Angelatos <petrosagg@gmail.com>
|
Author: Pablo Carranza Velez <pablo@resin.io>
|
||||||
Date: Thu, 20 Oct 2016 20:20:56 -0700
|
Date: Fri Jun 9 14:57:23 2017 -0700
|
||||||
Subject: [PATCH 1/2] Revert "runtime: check and fail early with a message if
|
|
||||||
MMX is not available on 386"
|
|
||||||
|
|
||||||
This reverts commit 35e84546d7c3cc599dd5bf31ad86bf8d3d841d04.
|
Do not fail when there's no MMX support
|
||||||
---
|
|
||||||
src/runtime/asm_386.s | 42 ------------------------------------------
|
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
|
||||||
1 file changed, 42 deletions(-)
|
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
|
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
|
--- a/src/runtime/asm_386.s
|
||||||
+++ b/src/runtime/asm_386.s
|
+++ b/src/runtime/asm_386.s
|
||||||
@@ -26,32 +26,6 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$0
|
@@ -26,32 +26,6 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$0
|
||||||
@ -45,8 +45,8 @@ index 4181859..942446e 100644
|
|||||||
-has_cpuid:
|
-has_cpuid:
|
||||||
MOVL $0, AX
|
MOVL $0, AX
|
||||||
CPUID
|
CPUID
|
||||||
CMPL AX, $0
|
MOVL AX, SI
|
||||||
@@ -74,11 +48,6 @@ notintel:
|
@@ -76,11 +50,6 @@ notintel:
|
||||||
MOVL CX, AX // Move to global variable clobbers CX when generating PIC
|
MOVL CX, AX // Move to global variable clobbers CX when generating PIC
|
||||||
MOVL AX, runtime·cpuid_ecx(SB)
|
MOVL AX, runtime·cpuid_ecx(SB)
|
||||||
MOVL DX, runtime·cpuid_edx(SB)
|
MOVL DX, runtime·cpuid_edx(SB)
|
||||||
@ -55,10 +55,10 @@ index 4181859..942446e 100644
|
|||||||
- TESTL $(1<<23), DX // MMX
|
- TESTL $(1<<23), DX // MMX
|
||||||
- JZ bad_proc
|
- JZ bad_proc
|
||||||
-
|
-
|
||||||
nocpuinfo:
|
// Load EAX=7/ECX=0 cpuid flags
|
||||||
|
CMPL SI, $7
|
||||||
// if there is an _cgo_init, call it to let it
|
JLT nocpuinfo
|
||||||
@@ -160,17 +129,6 @@ ok:
|
@@ -170,17 +139,6 @@ ok:
|
||||||
INT $3
|
INT $3
|
||||||
RET
|
RET
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ index 4181859..942446e 100644
|
|||||||
-DATA bad_proc_msg<>+0x08(SB)/8, $"gram can"
|
-DATA bad_proc_msg<>+0x08(SB)/8, $"gram can"
|
||||||
-DATA bad_proc_msg<>+0x10(SB)/8, $" only be"
|
-DATA bad_proc_msg<>+0x10(SB)/8, $" only be"
|
||||||
-DATA bad_proc_msg<>+0x18(SB)/8, $" run on "
|
-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<>+0x28(SB)/8, $"rs with "
|
||||||
-DATA bad_proc_msg<>+0x30(SB)/8, $"MMX supp"
|
-DATA bad_proc_msg<>+0x30(SB)/8, $"MMX supp"
|
||||||
-DATA bad_proc_msg<>+0x38(SB)/4, $"ort."
|
-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)
|
DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
|
||||||
GLOBL runtime·mainPC(SB),RODATA,$4
|
GLOBL runtime·mainPC(SB),RODATA,$4
|
||||||
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
|||||||
From 973d55e9e319a895e406c89413563a2fc787e98c Mon Sep 17 00:00:00 2001
|
commit a8e51a8828f69365a1381821942df96300fe80b2
|
||||||
From: Petros Angelatos <petrosagg@gmail.com>
|
Author: Pablo Carranza Velez <pablo@resin.io>
|
||||||
Date: Tue, 18 Oct 2016 08:13:44 -0700
|
Date: Fri Jun 9 15:07:55 2017 -0700
|
||||||
Subject: [PATCH 2/2] implement atomic quadword ops with FILD/FISTP
|
|
||||||
|
|
||||||
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
|
Implement atomic quadword ops with FILD/FISTP
|
||||||
---
|
|
||||||
src/runtime/internal/atomic/asm_386.s | 21 ++++++++-------------
|
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
|
||||||
src/sync/atomic/asm_386.s | 20 ++++++++------------
|
Original author: Petros Angelatos <petrosagg@gmail.com>
|
||||||
2 files changed, 16 insertions(+), 25 deletions(-)
|
|
||||||
|
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
|
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
|
--- a/src/runtime/internal/atomic/asm_386.s
|
||||||
+++ b/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
|
@@ -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).
|
// It can be replaced with MFENCE, but MFENCE was introduced only on the Pentium4 (SSE2).
|
||||||
MOVL $0, AX
|
MOVL $0, AX
|
||||||
diff --git a/src/sync/atomic/asm_386.s b/src/sync/atomic/asm_386.s
|
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
|
--- a/src/sync/atomic/asm_386.s
|
||||||
+++ b/src/sync/atomic/asm_386.s
|
+++ b/src/sync/atomic/asm_386.s
|
||||||
@@ -157,12 +157,10 @@ TEXT ·LoadUint64(SB),NOSPLIT,$0-12
|
@@ -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.
|
// 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).
|
// It can be replaced with MFENCE, but MFENCE was introduced only on the Pentium4 (SSE2).
|
||||||
XORL AX, AX
|
XORL AX, AX
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user