public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Carlos O'Donell <carlos@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Correctly determine libc.so 'OUTPUT_FORMAT' when cross-compiling.
Date: Fri, 07 Oct 2022 11:41:01 +0200	[thread overview]
Message-ID: <87sfk0c6oi.fsf@gnu.org> (raw)
In-Reply-To: <Yz7sdZZ9myk7qhKK@fedora> (Carlos O'Donell's message of "Thu, 6 Oct 2022 10:55:49 -0400")

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’.

  reply	other threads:[~2022-10-07  9:41 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 [this message]
2022-10-13 20:56     ` Fangrui Song
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=87sfk0c6oi.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.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).