Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/6] support for a pre-built Go compiler
@ 2024-04-15 16:22 Thomas Perale via buildroot
  2024-04-15 16:22 ` [Buildroot] [PATCH v2 1/6] DEVELOPERS: add Thomas Perale for 'go' Thomas Perale via buildroot
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Thomas Perale via buildroot @ 2024-04-15 16:22 UTC (permalink / raw)
  To: buildroot; +Cc: Christian Stewart, Yann E . MORIN, Thomas Perale

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 require users to go through the different compilation stages of
the Go compiler and speeds up the overall build time.

This patch is a new version of the proposal I made last year
(see https://lore.kernel.org/buildroot/CA+h8R2pNRrBsChKS3PHQtT0_rsVF3Wi3LwMTD9jKFoKf1ot2-A@mail.gmail.com/#b)
and a rebase of my previous patch (https://lore.kernel.org/buildroot/20231004142303.203520-5-thomas.perale@essensium.com/T/)
to support new Go 1.22 that require a 3rd bootstrap stage.

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-bootstrap-stage3
    │  ├─ go-bootstrap-stage3/ <-- 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 providers.

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 the different compilers options.

This v2 patch takes into account the comments from Yann Morin (https://lists.buildroot.org/pipermail/buildroot/2024-April/689599.html).

Thomas Perale (6):
  DEVELOPERS: add Thomas Perale for 'go'
  package/go: new subdirectory for go variants
  package/pkg-golang: select BR2_PACKAGE_HOST_GO
  package/go: make host package a virtual package
  package/go/go-bin: new host-go provider
  support/testing: add tests for Go providers

 .checkpackageignore                           |  2 +-
 DEVELOPERS                                    |  6 +--
 package/Config.in.host                        |  3 --
 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                     | 43 +++++++++++++++
 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
 .../go-bootstrap-stage3/Config.in.host        |  0
 .../go-bootstrap-stage3.hash                  |  0
 .../go-bootstrap-stage3.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 ++++++++++++++
 45 files changed, 210 insertions(+), 45 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-bootstrap-stage3/Config.in.host (100%)
 rename package/{ => go}/go-bootstrap-stage3/go-bootstrap-stage3.hash (100%)
 rename package/{ => go}/go-bootstrap-stage3/go-bootstrap-stage3.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.44.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-08-19 21:22 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-15 16:22 [Buildroot] [PATCH v2 0/6] support for a pre-built Go compiler Thomas Perale via buildroot
2024-04-15 16:22 ` [Buildroot] [PATCH v2 1/6] DEVELOPERS: add Thomas Perale for 'go' Thomas Perale via buildroot
2024-04-15 16:44   ` Yann E. MORIN
2024-04-15 17:38     ` Thomas Perale via buildroot
2024-04-15 20:20       ` Yann E. MORIN
2024-06-01 15:39   ` Yann E. MORIN
2024-04-15 16:22 ` [Buildroot] [PATCH v2 2/6] package/go: new subdirectory for go variants Thomas Perale via buildroot
2024-06-01 15:41   ` Yann E. MORIN
2024-04-15 16:22 ` [Buildroot] [PATCH v2 3/6] package/pkg-golang: select BR2_PACKAGE_HOST_GO Thomas Perale via buildroot
2024-06-01 15:41   ` Yann E. MORIN
2024-06-06 11:44   ` Yann E. MORIN
2024-04-15 16:22 ` [Buildroot] [PATCH v2 4/6] package/go: make host package a virtual package Thomas Perale via buildroot
2024-06-01 15:42   ` Yann E. MORIN
2024-04-15 16:22 ` [Buildroot] [PATCH v2 5/6] package/go/go-bin: new host-go provider Thomas Perale via buildroot
2024-06-01 15:51   ` Yann E. MORIN
2024-06-14  4:07     ` Christian Stewart via buildroot
2024-06-14  5:44       ` Yann E. MORIN
2024-06-15  7:20         ` Yann E. MORIN
2024-08-19 21:22       ` Yann E. MORIN
2024-04-15 16:22 ` [Buildroot] [PATCH v2 6/6] support/testing: add tests for Go providers Thomas Perale via buildroot
2024-06-01 15:51   ` Yann E. MORIN
2024-06-01 15:54 ` [Buildroot] [PATCH v2 0/6] support for a pre-built Go compiler Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox