From: Luis Machado <luis.machado@arm.com>
To: Alan Modra <amodra@gmail.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
binutils@sourceware.org, jose.marchesi@oracle.com,
vapier@gentoo.org
Subject: Re: [PATCH, v2] Fix 32-bit build for --enable-targets=all
Date: Tue, 26 Apr 2022 07:31:07 +0100 [thread overview]
Message-ID: <e6bc4fec-ffe7-44ee-adb8-71d48d133006@arm.com> (raw)
In-Reply-To: <YmdeYRjhhzVe67+Z@squeak.grove.modra.org>
On 4/26/22 03:52, Alan Modra wrote:
> On Mon, Apr 25, 2022 at 08:40:54AM +0100, Luis Machado wrote:
>> On 4/24/22 15:58, Joel Brobecker wrote:
>>> Looking at this patch, I think you you may not have seen Alan's
>>> comment, which je sent on Apr 18, saying:
>>>
>>> https://sourceware.org/pipermail/gdb-patches/2022-April/187960.html
>>> | Anything that requires 64-bit BFD support does not belong in
>>> | TARGET32_LIBOPCODES_CFILES. In fact, the whole point of
>>> | TARGET32_LIBOPCODES_CFILES was to fix --enable-targets=all breakage on
>>> | 32-bit hosts without --enable-64-bit-bfd. Why would you want to put
>>> | bpf here? It's a 64-bit target!
>>>
>>> (I see that you weren't in the list of direct recipients for that email)
>>>
>>
>> Yes, it looks that way.
>>
>> Unfortunately --enable-targets=all never really worked OK for 32-bit builds
>> after splitting 64/32 targets. It is not clear to me if there are bugs
>> elsewhere that are preventing a clean build, but right now it doesn't look
>> buildable at all.
>>
>> Alan?
>
> The major problem I have with your patch is that all it does is sweep
> a problem under the rug. While it may fix a build breakage I doubt
> that it actually improves anything for users. For example, if I apply
> your patch for a 32-bit --enable-targets=all binutils build, then
> attempt to disassemble one of the bpf gas testsuite objects:
>
> $ ~/build/gas/all32/binutils/objdump -dr tmpdir/lddw.o
> /home/alan/build/gas/all32/binutils/objdump: tmpdir/lddw.o: file format not recognized
>
Yeah, I agree. Doing some more research on the code, it is the wrong
approach. Though I'm wondering what an appropriate fix would look like,
one that wouldn't require a lot of work and would still make things
build cleanly. A compromise?
> That's due to lack of the required support from bfd/elf64-bpf.c to
> load bpf object files into BFD. I think you'll find a similar result
> for the other targets your patch touches, and not just with objdump
> but with everything else that uses libbfd.
>
> There is also a minor problem with the patch in that it adds entries
> to TARGET32_LIBOPCODES_CFILES without removing the corresponding
> entries from TARGET64_LIBOPCODES_CFILES. Similarly for the defines in
> opcodes/disassemble.c.
>
Maybe some targets shouldn't be accepted as part of a 32-bit
--enable-targets=all for GDB/sim. Removing those "problematic" targets
from the list might be another possible approach I suppose.
next prev parent reply other threads:[~2022-04-26 6:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 13:25 Luis Machado
2022-04-24 14:58 ` Joel Brobecker
2022-04-25 7:40 ` Luis Machado
2022-04-26 2:52 ` Alan Modra
2022-04-26 6:31 ` Luis Machado [this message]
2022-04-26 11:43 ` Alan Modra
2022-04-27 9:57 ` Pedro Alves
2022-04-27 11:25 ` Luis Machado
2022-04-26 8:07 ` Jose E. Marchesi
2022-04-26 13:22 ` Alan Modra
2022-04-29 12:35 ` Luis Machado
2022-04-29 16:22 ` Pedro Alves
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=e6bc4fec-ffe7-44ee-adb8-71d48d133006@arm.com \
--to=luis.machado@arm.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=brobecker@adacore.com \
--cc=jose.marchesi@oracle.com \
--cc=vapier@gentoo.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).