-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/go: use host compiler when go-bootstrap unsupported
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@paral.in> --- 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@paral.in>
- Loading branch information
Showing
4 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
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