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

Luis Machado luis.machado@linaro.org
Wed Dec 1 09:52:28 GMT 2021


Hi,

I'm still seeing the following build failure for 32-bit ARM with 
--enable-targets=all:

--

libsim.a(sim-main.o): In function `store_rd':
/builds/binutils-gdb-armhf-bionic/sim/riscv/../../../../repos/binutils-gdb/sim/riscv/sim-main.c:73: 
undefined reference to `riscv_gpr_names_abi'
/builds/binutils-gdb-armhf-bionic/sim/riscv/../../../../repos/binutils-gdb/sim/riscv/sim-main.c:71: 
undefined reference to `riscv_gpr_names_abi'
libsim.a(sim-main.o): In function `initialize_cpu':
/builds/binutils-gdb-armhf-bionic/sim/riscv/../../../../repos/binutils-gdb/sim/riscv/sim-main.c:1109: 
undefined reference to `riscv_opcodes'
collect2: error: ld returned 1 exit status
Makefile:253: recipe for target 'run' failed
make[4]: *** [run] Error 1
make[4]: Leaving directory '/builds/binutils-gdb-armhf-bionic/sim/riscv'
Makefile:2279: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/builds/binutils-gdb-armhf-bionic/sim'
Makefile:1604: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/builds/binutils-gdb-armhf-bionic/sim'
Makefile:11218: recipe for target 'all-sim' failed
make[1]: *** [all-sim] Error 2
make[1]: Leaving directory '/builds/binutils-gdb-armhf-bionic'
Makefile:999: recipe for target 'all' failed
make: *** [all] Error 2

--

I thought Alan's fix would address this, but it looks like it doesn't. 
It seems these symbols are not available when doing an all-targets build.

On 11/12/21 6:42 AM, Nelson Chu wrote:
> On Fri, Nov 12, 2021 at 5:35 PM Alan Modra <amodra@gmail.com> 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.
> 
> Thanks for helping to fix this :)
> 
>> Whether you want to enable riscv32 support with a 32-bit bfd is really
>> a separate issue.
> 
> OK, I will figure this out, thanks.
> 
> Nelson
> 
>> --
>> Alan Modra
>> Australia Development Lab, IBM


More information about the Binutils mailing list