public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Carlos O'Donell <carlos@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] Correctly determine libc.so 'OUTPUT_FORMAT' when cross-compiling.
Date: Thu, 13 Oct 2022 13:56:21 -0700	[thread overview]
Message-ID: <20221013205621.upcf2c2oo5diyxfx@google.com> (raw)
In-Reply-To: <87sfk0c6oi.fsf@gnu.org>

On 2022-10-07, Ludovic Courtès via Libc-alpha wrote:
>Hi Carlos,
>
>Carlos O'Donell <carlos@redhat.com> skribis:
>
>> On Thu, Jul 01, 2021 at 11:00:19PM +0200, Ludovic Courtès via Libc-alpha wrote:
>>> Commit 87d583c6e8cd0e49f64da76636ebeec033298b4d replaces the sed script
>>> with an "objdump -f" invocation to determine the 'OUTPUT_FORMAT' bit of
>>> the libc.so linker script.
>>>
>>> However, when cross-compiling, for example from x86_64-linux-gnu to
>>> aarch64-linux-gnu, "objdump -f" would report the wrong
>>> format ("elf64-little").  Conversely, "aarch64-linux-gnu-objdump -f"
>>> reports "elf64-littleaarch64" as expected.
>>>
>>> This patch changes 'configure.ac' to use AC_CHECK_TOOL rather than
>>> '$CC -print-prog-name=objdump' to determine the value of the OBJDUMP
>>> variable.  That way, OBJDUMP is set to TRIPLET-objdump when
>>> cross-compiling for TRIPLET.
>>
>> I've been tackling a backlog of old glibc patches, and this one is up
>> next. Yes it's been over a year, but this patch still applies and the
>> idea is sound. I've tested this with build-many-glibcs (bmg) on x86_64
>> and it has no impact because bmg always sets OBJDUMP. My opinion is that
>> bmg is the "base standard" for how we build native and cross tooling and
>> so it your changes work here, they should work in other instances.
>>
>> The change looks good to me.
>>
>> No regresions on x86_64.
>>
>> Would you like me to commit this? :-)
>
>I don’t have commit access AFAIK so I’ll happily defer to you.  :-)
>
>Thanks for taking the time to look at the backlog!
>
>Ludo’.

Thanks. This looks good.

  reply	other threads:[~2022-10-13 20:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 21:00 Ludovic Courtès
2022-10-06 14:55 ` Carlos O'Donell
2022-10-07  9:41   ` Ludovic Courtès
2022-10-13 20:56     ` Fangrui Song [this message]
2022-10-29  1:45       ` Carlos O'Donell

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=20221013205621.upcf2c2oo5diyxfx@google.com \
    --to=maskray@google.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=ludo@gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).