New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go 1.20 to upstream #25
Open
paralin
wants to merge
4
commits into
upstream-master
Choose a base branch
from
go-1.20
base: upstream-master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All Go compiler versions > 1.4.x (old) are written in Go, and require a existing compiled Go version to use to build from source. https://golang.org/doc/install/source#bootstrapFromSource The process for "bootstrapping" the Go compiler in Buildroot is: 1. Compile a C/C++ cross-compiler (gcc) as the host toolchain. 2. Build go-bootstrap-stage1 (which is Go 1.4.x and written in C) 3. Build go-bootstrap-stage2 (which is Go 1.19.x and written in Go) 3. Build go 1.20 (written in Go) using go-bootstrap-stage2. go-bootstrap-stage1 does not work on 64-bit arm. The Go 1.4.x bootstrap compiler is compatible with x86, x86_64, and arm (32 bit) only. This patch adds a fallback to require a host Go compiler to build host-go when BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS is not set. Signed-off-by: Christian Stewart <christian@aperture.us> --- changes prior to inclusion in this series: - thanks Thomas for the review & suggestions - added NEEDS_HOST_GO boolean - added dependency checks to support/dependencies/dependencies.sh - removed unnecessary changes to go-bootstrap package - add dependency on toolchain if Cgo is enabled - updates for go1.20 - updates for go-bootstrap-stage{1,2} changes from v1 -> v2: - remove whitespace fix in bootstrap stage2 Signed-off-by: Christian Stewart <christian@aperture.us>
Go 1.20 requires a minimum version of go 1.17.13 to bootstrap. https://go.dev/doc/go1.20#bootstrap As Go 1.4 was the previous version that could be compiled with C, there is now no way to bootstrap go with a C compiler, unless we use a two-stage bootstrap: - build host-go-bootstrap-1.4-20170531 - build host-go-bootstrap-1.19.9 with host-go-bootstrap-1.4-20170531 - build host-go-1.20 with host-go-bootstrap-1.19.9 This is implemented in this commit first, before upgrading host-go to 1.20. Note: the .patch files from package/go version 1.19.x are not necessary for package/go-bootstrap-stage2 and have not been included there. Previous discussion of possible alternatives: https://lore.kernel.org/all/CA+h8R2rtcynkCBsz=_9yANOEguyPCOcQDj8_ns+cv8RS8+8t9A@mail.gmail.com/ https://lore.kernel.org/all/20220525234312.643dfc03@windsurf/T/ Signed-off-by: Christian Stewart <christian@aperture.us> --- v1 -> v2: - fix indentation of GOROOT_BOOTSTRAP in stage2 MAKE_ENV - adjust commit description - remove duplicate MAKE_ENV declaration line - reorder depends on lines in config.in.host v3 -> v4: - Fixed typo compatable -> compatible - Dropped dependency on toolchain in go-bootstrap-stage1 - Dropped updating sources timestamps in go-bootstrap-stage{1,2} - Update go-bootstrap-stage2 to 1.19.7 - Drop these comments and move to separate patch: - Fix typo in comments. - Adjusted comment built in -> built-in. - Adjust comments relating to copying src/ to host/ - Dropped outdated comment referring to issue 2775. - Thanks Thomas for the review. v4 -> v5: - update stage2 to go1.19.9 Signed-off-by: Christian Stewart <christian@aperture.us>
paralin
force-pushed
the
go-1.20
branch
2 times, most recently
from
February 15, 2023 07:32
8cb5cc4
to
b975260
Compare
Adjust comments in the Go package to improve clarity: Config.in.host: - Add comment mentioning list of supported architectures. go.mk: - Improve formatting of comment about NOCCACHE - Reword comment re: copying src/ to host/ - the previously linked issue is not relevant. - instead: mention that src/ is needed for stdlib. - Adjust comment re: adjusting file timestamps. - mention this is needed to avoid rebuilding stdlib Signed-off-by: Christian Stewart <christian@aperture.us> --- v3 -> v4: - move these comments to a separate patch - Thanks Thomas for the review.
The latest Go release, version 1.20, arrives six months after Go 1.19. Most of its changes are in the implementation of the toolchain, runtime, and libraries. https://go.dev/doc/go1.20 https://go.dev/doc/devel/release#go1.20.4 https://github.com/golang/go/issues?q=milestone%3AGo1.20.4+label%3ACherryPickApproved Signed-off-by: Christian Stewart <christian@aperture.us> --- v1 -> v2: - drop unnecessary change to config.in.host v2 -> v3: - bump to go 1.20.1 - add note about fixed cves v3 -> v4: - rebase on updated go1.19.x version - remove notes about cves (fixed in previous 1.19.x version) - update to go 1.20.2 v4 -> v5: - security update to go 1.20.4 Signed-off-by: Christian Stewart <christian@aperture.us>
paralin
force-pushed
the
go-1.20
branch
2 times, most recently
from
May 3, 2023 23:51
9500d19
to
509a5d6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Submitted upstream: [v2]