[PATCH 1/1] Fix ld error due to lto shared not support.
Nick Alcock
nick.alcock@oracle.com
Wed Jan 5 17:39:06 GMT 2022
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!
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.)
--
NULL && (void)
More information about the Binutils
mailing list