* [PR PATCH] Go 1.4 bootstrap
@ 2020-12-05 2:36 fosslinux
2020-12-05 4:05 ` q66
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: fosslinux @ 2020-12-05 2:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 924 bytes --]
There is a new pull request by fosslinux against master on the void-packages repository
https://github.com/fosslinux/void-packages go-bootstrap
https://github.com/void-linux/void-packages/pull/26953
Go 1.4 bootstrap
This PR reintroduces the C Go bootstrap for supported architectures, which was removed over a year ago.
**Why use the C Go bootstrap:**
- Allows Go to be bootstrapped without a pre-existing version of Go.
- Doesn't require gcompat on musl, which is often buggy.
- Allows for flexibility in the way the binaries are used in the bootstrap.
- https://bootstrappable.org
Furthermore, this doesn't drop any architecture support, as architectures that were not supported by Go 1.4 (namely, ppc) can still be bootstrapped via binaries.
@q66 Can you check this still works on ppc?
@the-maldridge maintainer
A patch file from https://github.com/void-linux/void-packages/pull/26953.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-go-bootstrap-26953.patch --]
[-- Type: text/x-diff, Size: 3885 bytes --]
From fd6e5c33ba4e0e7b5cff749bb464fd29d0897fa3 Mon Sep 17 00:00:00 2001
From: fosslinux <fosslinux@aussies.space>
Date: Sat, 5 Dec 2020 13:25:41 +1100
Subject: [PATCH 1/2] New package: go1.4-bootstrap-20171003.
---
srcpkgs/go1.4-bootstrap/INSTALL.msg | 4 +++
srcpkgs/go1.4-bootstrap/template | 39 +++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
create mode 100644 srcpkgs/go1.4-bootstrap/INSTALL.msg
create mode 100644 srcpkgs/go1.4-bootstrap/template
diff --git a/srcpkgs/go1.4-bootstrap/INSTALL.msg b/srcpkgs/go1.4-bootstrap/INSTALL.msg
new file mode 100644
index 00000000000..142aeabbc1b
--- /dev/null
+++ b/srcpkgs/go1.4-bootstrap/INSTALL.msg
@@ -0,0 +1,4 @@
+This is a copy of the official Go language toolchain binaries as provided by
+the project on its download page. Please do keep in mind that it is almost
+definitely not what you want to use and exists purely for the purpose of
+bootstrapping the official compiler package (called simply 'go').
diff --git a/srcpkgs/go1.4-bootstrap/template b/srcpkgs/go1.4-bootstrap/template
new file mode 100644
index 00000000000..fd12cd3825b
--- /dev/null
+++ b/srcpkgs/go1.4-bootstrap/template
@@ -0,0 +1,39 @@
+# Template file for 'go1.4-bootstrap'
+pkgname=go1.4-bootstrap
+version=20171003
+revision=1
+archs="x86_64* i686* aarch64* armv[67]l*"
+wrksrc="go"
+short_desc="Go Programming Language 1.4 bootstrap package"
+maintainer="fosslinux <fosslinux@aussies.space>"
+license="BSD-3-Clause"
+homepage="https://golang.org/doc/install/source"
+distfiles="https://dl.google.com/go/go1.4-bootstrap-${version}.tar.gz"
+checksum=f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52
+nostrip=yes
+noverifyrdeps=yes
+
+case "${XBPS_TARGET_MACHINE}" in
+ aarch64*) GOARCH=arm64 ;;
+ arm*) GOARCH=arm ;;
+ i686*) GOARCH=386 ;;
+ x86_64*) GOARCH=amd64 ;;
+ *) broken="Unsupported architecture ${XBPS_TARGET_MACHINE}" ;;
+esac
+export GOARCH
+
+do_build() {
+ unset GCC CC CXX LD LDFLAGS
+ unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
+
+ cd src
+ CGO_ENABLED=0 GOROOT="${PWD}" GOROOT_FINAL="/usr/lib/go1.4" ./make.bash
+}
+
+do_install() {
+ vmkdir usr/lib/go1.4
+ vcopy bin usr/lib/go1.4
+ vcopy src usr/lib/go1.4
+ vcopy pkg usr/lib/go1.4
+ vlicense LICENSE
+}
From fd811f2af1a907fa20eeda1390fb24ba351fbb33 Mon Sep 17 00:00:00 2001
From: fosslinux <fosslinux@aussies.space>
Date: Sat, 5 Dec 2020 13:26:05 +1100
Subject: [PATCH 2/2] go: use go1.4-bootstrap where possible.
---
srcpkgs/go/template | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/go/template b/srcpkgs/go/template
index 977c87da8d0..54f6e7a46b7 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -4,7 +4,6 @@ version=1.15.5
revision=1
create_wrksrc=yes
build_wrksrc=go
-hostmakedepends="go1.12-bootstrap"
short_desc="Go Programming Language"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="BSD-3-Clause"
@@ -24,6 +23,19 @@ case "${XBPS_TARGET_MACHINE}" in
*) broken="Unsupported architecture ${XBPS_TARGET_MACHINE}" ;;
esac
+_src_bootstrap=0
+case "${XBPS_MACHINE}" in
+ aarch64*) _src_bootstrap=1 ;;
+ arm*) _src_bootstrap=1 ;;
+ i686*) _src_bootstrap=1 ;;
+ x86_64*) _src_bootstrap=1 ;;
+esac
+if [ "${_src_bootstrap}" = "1" ]; then
+ hostmakedepends="go1.4-bootstrap"
+else
+ hostmakedepends="go1.12-bootstrap"
+fi
+
if [ "$CROSS_BUILD" ]; then
if [ "${XBPS_MACHINE%%-musl}" = "${XBPS_TARGET_MACHINE%%-musl}" ]; then
broken="Cross-compiling to different libc is not supported"
@@ -36,7 +48,11 @@ do_build() {
# dependency
unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
- export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
+ if [ "${_src_bootstrap}" = "1" ]; then
+ export GOROOT_BOOTSTRAP="/usr/lib/go1.4"
+ else
+ export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
+ fi
export GOROOT=$PWD
export GOROOT_FINAL="/usr/lib/go"
export GOARCH=${_goarch}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Go 1.4 bootstrap
2020-12-05 2:36 [PR PATCH] Go 1.4 bootstrap fosslinux
@ 2020-12-05 4:05 ` q66
2020-12-30 6:49 ` the-maldridge
2020-12-30 6:49 ` [PR PATCH] [Closed]: " the-maldridge
2 siblings, 0 replies; 4+ messages in thread
From: q66 @ 2020-12-05 4:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
New comment by q66 on void-packages repository
https://github.com/void-linux/void-packages/pull/26953#issuecomment-739119697
Comment:
i'm not really convinced either, the gcompat argument on musl doesn't really hold (the binaries depend on few to no C symbols), and from practical standpoint the binaries provide support for every architecture the go compiler supports
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Go 1.4 bootstrap
2020-12-05 2:36 [PR PATCH] Go 1.4 bootstrap fosslinux
2020-12-05 4:05 ` q66
@ 2020-12-30 6:49 ` the-maldridge
2020-12-30 6:49 ` [PR PATCH] [Closed]: " the-maldridge
2 siblings, 0 replies; 4+ messages in thread
From: the-maldridge @ 2020-12-30 6:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
New comment by the-maldridge on void-packages repository
https://github.com/void-linux/void-packages/pull/26953#issuecomment-752349555
Comment:
Closing as agreement is that this does not actively add value to Void.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Closed]: Go 1.4 bootstrap
2020-12-05 2:36 [PR PATCH] Go 1.4 bootstrap fosslinux
2020-12-05 4:05 ` q66
2020-12-30 6:49 ` the-maldridge
@ 2020-12-30 6:49 ` the-maldridge
2 siblings, 0 replies; 4+ messages in thread
From: the-maldridge @ 2020-12-30 6:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
There's a closed pull request on the void-packages repository
Go 1.4 bootstrap
https://github.com/void-linux/void-packages/pull/26953
Description:
This PR reintroduces the C Go bootstrap for supported architectures, which was removed over a year ago.
**Why use the C Go bootstrap:**
- Allows Go to be bootstrapped without a pre-existing version of Go.
- Doesn't require gcompat on musl, which is often buggy.
- Allows for flexibility in the way the binaries are used in the bootstrap.
- https://bootstrappable.org
Furthermore, this doesn't drop any architecture support, as architectures that were not supported by Go 1.4 (namely, ppc) can still be bootstrapped via binaries.
@q66 Can you check this still works on ppc?
@the-maldridge maintainer
I have tested this for the official builder matrix.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-30 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 2:36 [PR PATCH] Go 1.4 bootstrap fosslinux
2020-12-05 4:05 ` q66
2020-12-30 6:49 ` the-maldridge
2020-12-30 6:49 ` [PR PATCH] [Closed]: " the-maldridge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).