[v2 PATCH 0/1] Fix ld error due to '-shared' not support

Nelson Chu nelson.chu@sifive.com
Tue Dec 28 04:20:58 GMT 2021


On Tue, Dec 28, 2021 at 7:07 AM Jim Wilson <jim.wilson.gcc@gmail.com> wrote:
>
> On Wed, Dec 22, 2021 at 10:20 PM jiawei <jiawei@iscas.ac.cn> wrote:
>>
>> jiawei (1):
>>   Fix ld error due to -shared not support.
>>
>>  ld/testsuite/ld-ctf/ctf.exp    | 5 +++++
>>  ld/testsuite/ld-plugin/lto.exp | 2 +-
>>  2 files changed, 6 insertions(+), 1 deletion(-)
>
>
> This looks OK to me.  I don't think --shared is required by the ctf support, maybe adding that just made the tests easier to write.  Meanwhile, since they all use --shared it is OK to add the check to verify that --shared is supported.  And the lto.exp change is trivially correct also.

Thanks, committed.

> Another way to fix this is to add the missing newlib support we need to make riscv*-elf shared library support work, and then we can enable the linker shared library support for riscv*-elf.  The linker support is fine.  it is just that all --shared tests will fail because of the newlib problem, which then leads to confusing ld testsuite results.  But fixing newlib is more of a long term issue, and in the short term we should fix the ld testsuite.

Yeah, I remember we have similar pr in the sourceware that need to
support riscv shared newlib.
https://sourceware.org/bugzilla/show_bug.cgi?id=25527

Thanks
Nelson
>


More information about the Binutils mailing list