bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/28684] [RISCV] 32-bit --enable-targets=all build breakage


From: wilson at gcc dot gnu.org
Subject: [Bug binutils/28684] [RISCV] 32-bit --enable-targets=all build breakage issue
Date: Wed, 15 Dec 2021 00:47:42 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28684

Jim Wilson <wilson at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilson at gcc dot gnu.org

--- Comment #1 from Jim Wilson <wilson at gcc dot gnu.org> ---
I installed a 32-bit debian release on an old laptop so I could look at this. 
Building a riscv target works because riscv is forcing a 64-bit bfd.  So it is
only --enable-targets=all that fails because there is no riscv target check.  A
64-bit host also forces a 64-bit bfd, so enable-targets=all works there.  It is
only 32-bit host --enable-targets=all builds without --enable-64-bit-bfd that
are broken.  There are other targets that behave the same like aarch64.  So
this is a narrow enough problem that it doesn't need to be fixed.  Hence we
don't need Nelson's bfd patch, and Andrew's gdb patch is OK.

But we still need to fix the simulator build problem.  The issue here is that
bfd/opcodes/gdb/etc have support to disable a target that requires a 64-bit
bfd, but sim does not.  There are only 4 targets that require a 64-bit bfd and
have a sim port: aarch64, bpf, mips*, riscv*.

The aarch64 sim port builds, but can't run binaries, because the bfd support to
detect an aarch64 binary is missing.  If it could run, it can't disassemble as
the opcodes disassembler support is missing.

I suspect the mips* sim port is in the same situation, but ran into maintenance
issues.  I'm getting linker script related errors, and if I hack around those I
get simulator memory region errors.  I'm using scripts that used to work, so I
think this is a general mips lack of maintenance issue.

The bpf port is cgen generated, and is making direct calls into cgen functions
in opcodes, so it fails to link.  If it did link, it wouldn't be able to run
programs as the bfd support is missing.  And it wouldn't be able to
disassemble.

The riscv port is directly using the opcode table in opcodes for decoding
instructions before executing them, so it doesn't link.  If it did link, it
wouldn't be able to run programs as the bfd support is missing, and wouldn't be
able to disassemble instructions.

Since the BFD64 sims aren't useful when built, I don't see the point in
building them.

I think we should consider this a sim bug, and should fix it by adding support
to disable targets that require a 64-bit bfd.  Since sim is part of gdb, we can
probably copy the gdb configure support for this into sim.  I will try to write
a patch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]