[RFC] RISC-V: Fix the 32-bit --enable-targets=all build breakage.

Luis Machado luis.machado@linaro.org
Wed Nov 17 13:52:26 GMT 2021


Hi Alan,

On 11/12/21 6:34 AM, Alan Modra via Binutils wrote:
> On Fri, Nov 12, 2021 at 04:38:08PM +0800, Nelson Chu wrote:
>> Hi Alan,
>>
>> I see you have a gcc patch to fix the problem of libopcodes, so should
>> we still need this patch to fix the --target-all on the 32-bit host
>> machine?
> 
> No, the patch I just committed now fixed the build problem.
> 

Unfortunately it seems to have side effects. The bpf sim still gets 
built for a 32-bit host, but its opcodes dependencies are no longer 
there, resulting in undefined references:

libsim.a(sim-close.o): In function `sim_close':
binutils-gdb/sim/bpf/../common/sim-close.c:43: undefined reference to 
`bpf_cgen_cpu_close'
libsim.a(sim-if.o): In function `sim_open':
binutils-gdb/sim/bpf/sim-if.c:166: undefined reference to 
`bpf_cgen_cpu_open_1'
binutils-gdb/sim/bpf/sim-if.c:179: undefined reference to 
`bpf_cgen_init_dis'

The references are contained in hese files:

opcodes/bpf-desc.c:bpf_cgen_cpu_close (CGEN_CPU_DESC cd)

opcodes/bpf-desc.c:bpf_cgen_cpu_open_1 (const char *mach_name, enum 
cgen_endian endian)

opcodes/bpf-dis.c:bpf_cgen_init_dis (CGEN_CPU_DESC cd)


> Whether you want to enable riscv32 support with a 32-bit bfd is really
> a separate issue.
> 


More information about the Binutils mailing list