All of lore.kernel.org
 help / color / mirror / Atom feed
From: yann.morin@orange.com
To: Arnout Vandecappelle <arnout@mind.be>
Cc: Christian Stewart <christian@aperture.us>,
	Fiona Klute <fiona.klute@gmx.de>,
	Buildroot Mailing List <buildroot@buildroot.org>,
	Thomas Perale <thomas.perale@mind.be>
Subject: Re: [Buildroot] [PATCH 1/1] package/containerd: fix build with toolchain without Gold linker
Date: Wed, 5 Feb 2025 09:29:57 +0100	[thread overview]
Message-ID: <Z6MhhfrgmRrtMhrB@yd-6wlzhs3> (raw)
In-Reply-To: <527da78c-270f-4ec6-8a6e-1210456517a5@mind.be>

Arnout, Fiona, Christian, All,

On 2025-02-05 09:03 +0100, Arnout Vandecappelle spake thusly:
> On 04/02/2025 22:23, Christian Stewart wrote:
> > On Tue, Feb 4, 2025, 6:32 AM Fiona Klute <fiona.klute@gmx.de
> > <mailto:fiona.klute@gmx.de>> wrote:
[--SNIP--]
> >     +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 <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 <https://github.com/
> >     golang/go/issues/17847>
> >     +CONTAINERD_EXTLDFLAGS += -Wl,--no-pie
> >     +endif
> >     +endif
[--SNIP--]
> > This looks good to me. But shouldn't we apply this more generally to
> > go-src and go-bin? It's true for all Go packages that we should pass
> > these flags right? Why specifically containerd?
[--SNIP--]
>  Yes I agree - this patch (and Yann's infrastructure patch that this patch
> depends on) should be in pkg-golang instead of an individual package.

Not sure I entirely grok that. The change I submitted is in pkg-golang,
as it is infra.

So, I guess you only actually suggested moving setting -fuse-ld=bfd and
-Wl,--no-pie flags into pkg-golang, right?

When I initially needed -fuse-ld=bfd for filebeat, I did not feel very
confident that we should do it unconditionally. Indeed, none of the
{host-,}golang-package packages we had at that time needed it at all. So
I concluded that filebeat was special (it was already special in a few
other respects, so meh).

And since I am far from a go expert, I have no idea how impactful such a
change would be. So I was a bit skeptical at making it part of the infra
so that it applied to all packages.

Still today, only one package (containerd) actually needs it; it is
still an exception. Thus _I_ am still a little bit skeptical that this
should be moved into the infra.

But if Christian, our eresident go expert, says we should go for it,
then let's do it.

Still, I believe there should be a way for packages to be able to pass
arbitrary extldflags, and thus the variable should be exposed.

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

  reply	other threads:[~2025-02-05  8:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 14:32 [Buildroot] [PATCH 1/1] package/containerd: fix build with toolchain without Gold linker Fiona Klute via buildroot
2025-02-04 14:47 ` yann.morin
2025-02-04 18:36   ` Fiona Klute via buildroot
2025-02-04 20:29     ` Fiona Klute via buildroot
2025-02-04 21:23 ` Christian Stewart via buildroot
2025-02-05  8:03   ` Arnout Vandecappelle via buildroot
2025-02-05  8:29     ` yann.morin [this message]
2025-02-05  9:20       ` Christian Stewart via buildroot
2025-02-05  9:41         ` yann.morin
2025-02-05  9:42         ` Arnout Vandecappelle via buildroot
2025-02-05 10:24           ` Fiona Klute via buildroot
2025-02-05 10:33 ` Arnout Vandecappelle via buildroot
2025-02-05 11:40   ` Fiona Klute via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z6MhhfrgmRrtMhrB@yd-6wlzhs3 \
    --to=yann.morin@orange.com \
    --cc=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=christian@aperture.us \
    --cc=fiona.klute@gmx.de \
    --cc=thomas.perale@mind.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.