[Buildroot] [PATCH 0/6] support for a pre-built Go compiler
Thomas Perale
thomas.perale at essensium.com
Wed Oct 4 14:22:56 UTC 2023
From: Thomas Perale <thomas.perale at mind.be>
Improvement suggested on the buildroot TODO list (https://www.elinux.org/Buildroot#Todo_list).
This patch adds support for a pre-built version of the Go compiler that
doesn't requires users to go through the different compilation stages of
the Go compiler and speeds up the overall build time.
This is a new version of a patch I proposed for the same feature last
year (see https://lore.kernel.org/buildroot/CA+h8R2pNRrBsChKS3PHQtT0_rsVF3Wi3LwMTD9jKFoKf1ot2-A@mail.gmail.com/#b)
and with a fix of the typo I made on the [PATCH 6/6].
It introduces a new directory structure for host compilers with different
providers:
package/
├─ go/ <-- Virtual package
│ ├─ go-src/ <-- Build from source option
│ ├─ go-bin/ <-- Download pre-built option
│ ├─ go-bootstrap-stage1/ <-- Dependency for go-bootstrap-stage2
│ ├─ go-bootstrap-stage2/ <-- Dependency for go-src
│ ├─ go.mk <-- Common variables
│ ├─ Config.in <-- Common variables/virtual package definition
The subdirectory structure is used to put the `GO_VERSION` variable in
common between the different provider.
This subdirectory proposal should be extended to the Rust compiler case and
NodeJS proposal Thomas Petazzoni did (https://patchwork.ozlabs.org/project/buildroot/list/?series=319967)
to unify the naming of for the different compilers options.
Thomas Perale (6):
DEVELOPERS: add Thomas Perale for 'go'
package/go: new subdirectory for go variants
package/go: make host package a virtual package
package/pkg-golang: select go compiler
package/go/go-bin: new go provider
support/testing: add tests for Go providers
.checkpackageignore | 2 +-
DEVELOPERS | 5 +-
package/Config.in.host | 2 -
package/balena-engine/Config.in | 1 +
package/cni-plugins/Config.in | 1 +
package/containerd/Config.in | 1 +
package/crucible/Config.in | 1 +
package/delve/Config.in | 1 +
package/delve/Config.in.host | 1 +
package/docker-cli/Config.in | 1 +
package/docker-compose/Config.in | 1 +
package/docker-engine/Config.in | 1 +
package/embiggen-disk/Config.in | 1 +
package/flannel/Config.in | 1 +
package/gitlab-runner/Config.in | 1 +
package/go/Config.in.host | 44 +++++++++++++++
package/go/go-bin/Config.in.host | 14 +++++
package/go/go-bin/go-bin.hash | 8 +++
package/go/go-bin/go-bin.mk | 19 +++++++
.../go-bootstrap-stage1/Config.in.host | 0
.../go-bootstrap-stage1.hash | 0
.../go-bootstrap-stage1.mk | 0
.../go-bootstrap-stage2/Config.in.host | 0
.../go-bootstrap-stage2.hash | 0
.../go-bootstrap-stage2.mk | 0
...explicit-option-for-crosscompilation.patch | 0
...ldvcs-false-when-building-go-bootstr.patch | 0
package/go/{go.hash => go-src/go-src.hash} | 0
package/go/go-src/go-src.mk | 54 +++++++++++++++++++
package/go/go.mk | 42 ++-------------
package/gocryptfs/Config.in | 1 +
package/mender-artifact/Config.in.host | 1 +
package/mender-connect/Config.in | 1 +
package/mender/Config.in | 1 +
package/moby-buildkit/Config.in | 1 +
package/moby-buildkit/Config.in.host | 1 +
package/nerdctl/Config.in | 1 +
package/runc/Config.in | 1 +
package/runc/Config.in.host | 1 +
package/tinifier/Config.in | 1 +
package/wtfutil/Config.in | 1 +
support/testing/tests/package/test_go.py | 41 ++++++++++++++
42 files changed, 211 insertions(+), 43 deletions(-)
create mode 100644 package/go/go-bin/Config.in.host
create mode 100644 package/go/go-bin/go-bin.hash
create mode 100644 package/go/go-bin/go-bin.mk
rename package/{ => go}/go-bootstrap-stage1/Config.in.host (100%)
rename package/{ => go}/go-bootstrap-stage1/go-bootstrap-stage1.hash (100%)
rename package/{ => go}/go-bootstrap-stage1/go-bootstrap-stage1.mk (100%)
rename package/{ => go}/go-bootstrap-stage2/Config.in.host (100%)
rename package/{ => go}/go-bootstrap-stage2/go-bootstrap-stage2.hash (100%)
rename package/{ => go}/go-bootstrap-stage2/go-bootstrap-stage2.mk (100%)
rename package/go/{ => go-src}/0001-build.go-explicit-option-for-crosscompilation.patch (100%)
rename package/go/{ => go-src}/0002-cmd-dist-set-buildvcs-false-when-building-go-bootstr.patch (100%)
rename package/go/{go.hash => go-src/go-src.hash} (100%)
create mode 100644 package/go/go-src/go-src.mk
create mode 100644 support/testing/tests/package/test_go.py
--
2.42.0
More information about the buildroot
mailing list