From: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
To: Christian Stewart <christian@aperture.us>, yann.morin@orange.com
Cc: 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 10:42:22 +0100 [thread overview]
Message-ID: <e0de913d-45c5-4c03-9c98-e6009e8c4c5c@mind.be> (raw)
In-Reply-To: <CA+h8R2qR95DDHn45tqUG57rSCRWpfWkVU2sd2GxpCDhkkzrr_w@mail.gmail.com>
On 05/02/2025 10:20, Christian Stewart wrote:
> Hi Yann,
>
> On Wed, Feb 5, 2025, 12:29 AM <yann.morin@orange.com
> <mailto:yann.morin@orange.com>> wrote:
>
> > 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.
Yes, sorry, I was talking about the part in filebeat (and I forgot that
filebeat was a new package).
> So, I guess you only actually suggested moving setting -fuse-ld=bfd and
> -Wl,--no-pie flags into pkg-golang, right?
>
>
> My thinking is that we always want Go to have fuse-ld set to the correct "ld" we
> are using. So it makes sense to set this in pkg-golang.
>
> This way any new packages that have dynamic linking (cgo) will also pick up the
> fix as needed.
AFAIU it would be needed for any combination of
- CGO package;
- arch where Go decides it needs gold;
- toolchain that doesn't have gold.
So the only package-specific aspect is indeed that it's CGO.
We don't have a way at the moment for a package to indicate that it's using
CGO (there's just a Config.in depends line). But I think the extld option only
applies to CGO builds anyway.
> 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).
>
>
> It is just because it uses cgo, or am I wrong?
>
> 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.
AFAIU, the problem (that Go wants to use gold even if it is not available)
really should exist for all packages, there is nothing package-specific about it.
There is also the potential problem that ld.bfd doesn't actually work, but we
don't have a solution for that and no easy way to detect at Config.in level when
it would exist.
Then there is the additional PIE issue that Fiona addresses with this patch -
I have no idea if that one is package-specific or not. I _think_ the autobuild
failure on cloudflared [1] is the same issue, but I'm not sure. It does feel
like that one is pretty much package-independent as well though.
>
> 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.
>
>
> Yes, that variable should be exposed, I agree. It's useful to be able to pass
> extra ld flags as needed.
I also agree that the variable should be exposed. Even though I don't think it
should be used by any package for the time being.
But I think the extld and PIE options should be appended to it from the infra.
Regards,
Arnout
[1]
http://autobuild.buildroot.net/results/694/6941f9ebbaaf4d294d66d32c06a4cd5237b8a4e8/build-end.log
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-02-05 9:42 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
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 [this message]
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=e0de913d-45c5-4c03-9c98-e6009e8c4c5c@mind.be \
--to=buildroot@buildroot.org \
--cc=arnout@mind.be \
--cc=christian@aperture.us \
--cc=fiona.klute@gmx.de \
--cc=thomas.perale@mind.be \
--cc=yann.morin@orange.com \
/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.