-
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 (which is Go 1.4.x and written in C) 3. Build go 1.16.x (written in Go) using go-bootstrap. The problem is that step 2 - build go-bootstrap - does not work on 64-bit arm. The Go compiler from 1.4.x is compatible with x86, x86_64, and arm (32 bit). This patch instead uses the host Go compiler to bootstrap host-go when BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS is not set. This is similar to how the host GCC is used to bootstrap the Buildroot toolchain. Signed-off-by: Christian Stewart <[email protected]> --- v1 -> v2: - 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 v2 -> v3: - add dependency on toolchain if Cgo is enabled Signed-off-by: Christian Stewart <[email protected]>
- Loading branch information
Showing
5 changed files
with
24 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
config BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS | ||
bool | ||
# See src/cmd/dist/unix.c for the list of support | ||
# architectures | ||
# See src/cmd/dist/unix.c for the list of supported architectures. | ||
default y if BR2_HOSTARCH = "x86" | ||
default y if BR2_HOSTARCH = "x86_64" | ||
default y if BR2_HOSTARCH = "arm" |
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