From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Christian Melki <christian.melki@t2data.com>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] FYI glibc-2.34.
Date: Fri, 4 Feb 2022 11:48:28 +0100 [thread overview]
Message-ID: <20220204104828.GG3897@pengutronix.de> (raw)
In-Reply-To: <9c398806-a063-f21e-74a6-21c15dab1738@t2data.com>
On Fri, Feb 04, 2022 at 09:35:48AM +0100, Christian Melki wrote:
> On 2/4/22 9:10 AM, Michael Olbrich wrote:
> > On Tue, Feb 01, 2022 at 02:27:00PM +0100, Christian Melki wrote:
> > > With a large pinch of salt... I think there are several parts to this new
> > > glibc behavior.
> > >
> > > 1. A couple of libraries are now integrated. There is no need to ask for
> > > linking with -lpthread, -ldl, -lutil, -lanl. But old binaries might have
> > > them as DT_NEEDED. So glibc provides them as .so files anyway.
> >
> > Right, I heard about that.
> >
>
> That part seems rather non-intrusive so far. I've built a toolchain and code
> (atleast the stuff I've tested) seems fine building around it.
>
> > > 2. If you want to run older (< 2.34) binaries, you're going to have to
> > > install the provided files anyway (braindead).
> >
> > That's called binary compatibility :-)
> >
> > > 3. Afaiu there is no real way of agnostically trying to determine the
> > > provided runtime file name (not linktime file name which is what gcc
> > > -print-file-name does) abi soname from something simple as a name.so
> > > softlink, whatever that may be. Atleast not anymore. This creates issues
> > > with finding and installing toolchain bits in ptxdist.
> >
> > The mess in install_copy_toolchain.sh is something I always tried to touch
> > as little as possible because it's supposed to work with as many toolchains
> > as possible. It's somewhere on my todo list to rewrite this and it looks
> > like it's time to do that for glibc-2.34.
> >
> > > 4. -print-file-name is a linktime dependency. Not a runtime one. Ptxdist
> > > intermixed those, as it was traditionally not an issue.
> >
> > So what do you get for -print-file-name=libpthread.so? The path to libc.so?
> > I don't have a glibc-2.34 to test this.
> >
>
> It returns libpthread.so. So asking for the link name does not seem like an
> option anymore.
So where is the libpthread library? The one needed for binary
compatibility?
If there is no special handling, then -print-file-name= should just look
for the file in a toolchain specific search path.
> Regarding a glibc 2.34 toolchain. crosstool-ng will do fine for the test and
> if you're to busy I'll happily send you one.
>
> > It looks like I need to do some refactoring here. But I need a glibc-2.34
> > toolchain first to test it. So it probably won't happen any time soon.
> >
>
> Mm.. ok. I think that my changes will work, but the part I'm uncertain about
> are the sonames longevity, over time and over architectures for example.
The problem I have with that, are the extra version numbers. I have no idea
what happens with that with older toolchains. So this needs testing.
Why is that needed anyways? I assume that -print-file-name= does not work
anymore without it? Are those symlinks gone in your toolchain?
Maybe try:
strace -eaccess gcc -print-file-name=...
You should see where gcc looks for the file.
Michael
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2022-02-04 10:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 11:08 Christian Melki
2021-10-15 8:13 ` Michael Olbrich
2021-10-15 8:25 ` Christian Melki
2021-10-15 14:25 ` Michael Olbrich
2022-02-01 10:01 ` Christian Melki
2022-02-01 13:27 ` Christian Melki
2022-02-04 8:10 ` Michael Olbrich
2022-02-04 8:35 ` Christian Melki
2022-02-04 10:48 ` Michael Olbrich [this message]
2022-02-04 12:40 ` Christian Melki
2022-02-04 13:00 ` Michael Olbrich
2022-02-04 13:09 ` Christian Melki
2022-02-04 14:30 ` Michael Olbrich
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=20220204104828.GG3897@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=christian.melki@t2data.com \
--cc=ptxdist@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox