[PATCH 1/1] Fix ld error due to lto shared not support.
Nelson Chu
nelson.chu@sifive.com
Thu Jan 6 02:45:38 GMT 2022
On Thu, Jan 6, 2022 at 1:39 AM Nick Alcock <nick.alcock@oracle.com> wrote:
>
> On 22 Dec 2021, Nelson Chu verbalised:
> > Added Nick Alcock in the cc list :)
>
> Thanks!
>
> > On Tue, Dec 21, 2021 at 5:29 PM jiawei <jiawei@iscas.ac.cn> wrote:
> > I notice that there are 41 ld-ctf testcases, and all of them need
> > -shared option, so we probably can just add the following check in the
> > ctf.exp,
> >
> > if ![check_shared_lib_support] {
> > return 0
> > }
> >
> > So that we don't run these testcases when the ld doesn't support the
> > -shared option, and you don't need to modify the whole 41 testcases.
>
> Sure!
Thanks!
> Many of them (but not all) would be just as happy with -Wl,-Bdynamic,
> but that seems likely to be less widely available than -shared...
>
> >> ld/testsuite/ld-plugin/lto.exp | 2 +-
> >> 42 files changed, 43 insertions(+), 2 deletions(-)
> >> diff --git a/ld/testsuite/ld-ctf/array.d b/ld/testsuite/ld-ctf/array.d
> >> index 0fe675e2c5d..7a02de49ef9 100644
> >> --- a/ld/testsuite/ld-ctf/array.d
> >> +++ b/ld/testsuite/ld-ctf/array.d
> >> @@ -2,8 +2,9 @@
> >> #source: array-char.c
> >> #source: array-int.c
> >> #objdump: --ctf
> >> -#ld: -shared --ctf-variables --hash-style=sysv
> >> +#ld: --ctf-variables --hash-style=sysv
>
> ... did you mean to do this?
>
> (A bunch of tests in the libctf testsuite may need similar changes.)
Umm should this have been accidentally changed? Anyway, seems like
the new v2 version have fixed this:
https://sourceware.org/pipermail/binutils/2021-December/119001.html
Thanks!
Nelson
More information about the Binutils
mailing list