Re: [Buildroot] [PATCH 1/1] package/containerd: fix build with toolchain without Gold linker
flat view
From: <hidden>
Date: 2025-02-04 14:47:32
Fiona, All, On 2025-02-04 15:32 +0100, Fiona Klute spake thusly:
From: "Fiona Klute (WIWA)" <redacted>
[--SNIP--]
Additionally disable PIE on musl to fix "read-only segment has dynamic relocations" errors during linking [2].
[--SNIP--]
quoted hunk ↗ jump to hunk
+ifeq ($(BR2_aarch64),y) +# Go forces use of the Gold linker on aarch64 due to a bug in BFD that +# is fixed in Binutils >= 2.41 (so all versions provided by +# Buildroot). Forcing Gold will break with toolchains that don't +# provide it, so override the flag and use BFD. +# See: https://github.com/golang/go/issues/22040 +CONTAINERD_EXTLDFLAGS += -fuse-ld=bfd +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +# Go exe build with PIE doesn't work with musl. +# See: https://github.com/golang/go/issues/17847 +CONTAINERD_EXTLDFLAGS += -Wl,--no-pie +endif +endif
Is the PIE issue really only hapenning on Aarch64? The upstream issue
17847 does not make it that obvious, but at least mips64 is said to have
the issue as well, and someone even mentioned amd64 (aka x86_64).
I.e. don't we need the musl workaround out of the aarch64 condition?
Regards,
Yann E. MORIN.
--
____________
.-----------------.--------------------: _ :------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot