public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: Don't compile some opcodes files when bfd is 32-bit only
Date: Thu, 2 Dec 2021 11:48:50 -0500	[thread overview]
Message-ID: <Yaj48kHZmkq7HHr0@vapier> (raw)
In-Reply-To: <YaiKMqOXmskgJk7X@squeak.grove.modra.org>

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]

On 02 Dec 2021 19:26, Alan Modra via Binutils wrote:
> On Thu, Dec 02, 2021 at 12:19:37AM -0500, Mike Frysinger wrote:
> >  i don't
> > have specific familiarity with the bpf port as i didn't author it.  i only
> > just finished overhauling the sim build & test logic to support testing in a
> > multitarget build so they can all (or most at this point) be tested at the
> > same time.  and i can see the same runtime error you see now too.  is the
> > 64-bit bfd setting easy to detect in subdirs ?
> 
> I used
>     if grep '#define BFD_ARCH_SIZE 64' ../bfd/bfd-in3.h > /dev/null
> in opcodes/configure.ac and made configure-opcodes depend on
> configure-bfd in the top level Makefile.def.  bfd-in3.h is made during
> bfd configure.

hmm, that seems messy.  gdb & ld have specific --enable-64-bit-bfd options
(albeit, copied & pasted from bfd/configure.ac).  should that instead be
refactored into e.g. config/bfd64.m4 and then all these subdirs get that
same configure logic ?

> >  if so, i think we can change
> > the sim to skip 64-bit-only ports if 64-bit bfd isn't available.
> 
> Yes, I think that is the right way to go for --enable-targets=all.
> 
> > riscv i think is a bit diff in that it supports 32-bit & 64-bit.
> 
> You can argue that with the riscv maintainers.  ;-)
> 
> Note that if a user specifically wants a riscv32 sim then using
> --target=riscv32-elf or even --enable-targets=riscv32-elf will get
> them a 64-bit bfd.

--enable-targets=all does not though, and riscv32 only needs a 32-bit bfd.
the symbols in question aren't tied to the bfd size.

tbh, i haven't been following what's been going on, i just raise my head
when the sim fails to link.  and it's failing to link now after this change.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-12-02 16:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12  8:37 Alan Modra
2021-11-26 18:01 ` Mike Frysinger
2021-12-01 23:01   ` Alan Modra
2021-12-02  5:19     ` Mike Frysinger
2021-12-02  8:56       ` Alan Modra
2021-12-02 16:48         ` Mike Frysinger [this message]
2021-12-02 22:02           ` Alan Modra
2021-12-09 22:05             ` Jim Wilson
2021-12-09 22:37               ` Alan Modra

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=Yaj48kHZmkq7HHr0@vapier \
    --to=vapier@gentoo.org \
    --cc=amodra@gmail.com \
    --cc=binutils@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).