package/go: handle CGO linking for the host
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | package/skopeo: add missing dependency on host go arch supportpackage/ | +1 | 1 reply | |
| 2/7 | package/go: expose host CGO linking supportdocs/ package/ package/ | +18 | 1 reply | |
| 3/7 | package/delve: needs CGO linking for hostpackage/ | +1 | 0 replies | |
| 4/7 | package/moby-buildkit: needs CGO linking for hostpackage/ | +1 | 0 replies | |
| 5/7 | package/runc: needs CGO linking for hostpackage/ | +1 | 0 replies | |
| 6/7 | package/skopeo: needs CGO linking for hostpackage/ | +1 | 0 replies | |
| 7/7 | package/skopeo: bump versionpackage/ package/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host
From: "Yann E. MORIN" <[email protected]>
Hello All!
This series adds the necessary pieces to expose whether the go compiler has CGO linking support for the host.
The overall issue with the go compiler, is that we have a single one that can build for the target *and* for the host. Any limitation due to the target thus leak to the host. This is notably the case for CGO linking.
This series fixes that by adding a Kconfig symbol that represents whether CGO linking for the host is available. Then, it goes on to fix a few existing packages to add the new dependency.
Host variants of target packages that need CGO linking were found with:
$ git grep -l BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS \
|while read f; do
[ -e "${f}.host" ] && echo "${f}"
doneWhich returns a rather short list:
package/delve/Config.in
package/moby-buildkit/Config.in
package/runc/Config.in
And thus they are all three fixed.
There are only two host-only packages:
$ git grep -l host-golang-package package/*/'**'.mk \
|while read f; do
grep -q -E '\(golang' "${f}" || echo "${f}"
done
package/mender-artifact/mender-artifact.mk
package/skopeo/skopeo.mkSkopeo is fixed in this series, as this is what prompted this work; so it leaves mender-artifact to check. I have no idea how to check whether a package needs CGO linking, though, so this is left as an exercise for any interested party... This is however rather theoretical, as the only hosts that do not support CGO linking (based on the target conditions) would be mips64 or mips64el hosts, and it is very doubtful Buildroot ever ran, runs, or will ever run on such hosts [0]; static-only or thread-less hosts are also not widely deployed either...
[0] git grep -E 'HOSTARCH.*mips64' returns nothing before this series, so we have no special condition for running on mips64, which is a bit surprising...
Regards,
Yann E. MORIN.
The following changes since commit e321e81cf921346ec2d4cd1a9439016c7b2d3fb5
configs/beaglebone: bump Linux to 6.6.32-ti-rt-arm32-r7 and U-Boot to 2024.07 (2024-07-30 23:44:30 +0200)
are available as patches in this mail series,
for you to apply patches up to 5cb88f8337a63230f90e02423005ba169e307549
package/skopeo: bump version (2024-08-01 10:36:24 +0200)
----------------------------------------------------------------
Yann E. MORIN (7):
package/skopeo: add missing dependency on host go arch support package/go: expose host CGO linking support package/delve: needs CGO linking for host package/moby-buildkit: needs CGO linking for host package/runc: needs CGO linking for host package/skopeo: needs CGO linking for host package/skopeo: bump version
docs/manual/adding-packages-golang.adoc | 3 ++- package/delve/Config.in.host | 1 + package/go/Config.in.host | 12 ++++++++++++ package/go/go.mk | 7 ++++--- package/moby-buildkit/Config.in.host | 1 + package/runc/Config.in.host | 1 + package/skopeo/Config.in.host | 2 ++ package/skopeo/skopeo.hash | 2 +- package/skopeo/skopeo.mk | 2 +- 9 files changed, 25 insertions(+), 6 deletions(-)
--
____________ .-----------------.--------------------: _ :------------------. | Yann E. MORIN | Real-Time Embedded | __/ ) | /"\ ASCII RIBBON | | | Software Designer | _/ - /' | \ / CAMPAIGN | | +33 638.411.245 '--------------------: (_ `--, | X AGAINST | | yann.morin (at) orange.com |_=" ,--' | / \ HTML MAIL |
'--------------------------------------:______/_____:------------------'
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot