Fix x86 ld testsuite fails with glibc < 2.28

H.J. Lu hjl.tools@gmail.com
Wed Jun 10 12:17:53 GMT 2020


On Tue, Jun 9, 2020 at 10:35 PM Alan Modra <amodra@gmail.com> wrote:
>
> Hi HJ,
> This fixes the following fails on my Ubuntu 18.04 box.
> x86_64-linux  -FAIL: Run pr25749-1bb (-no-pie -fno-PIE)
> x86_64-linux  -FAIL: Run pr25749-1bb (-pie -fPIE)
> x86_64-linux  -FAIL: Run pr25749-2ab (-no-pie -fno-PIE)
> x86_64-linux  -FAIL: Run pr25749-2ab (-pie -fPIE)
>
> In addition, at least try to build the linux-x86 tests when
> non-native.  run_cc_link_tests and run_ld_link_exec_tests won't error
> if cross-compilers are unavailable, and run_ld_link_exec_tests won't
> try to run binaries if non-native.
>
> Do you have any objections to me applying the patch?
>
>         * testsuite/ld-elf/linux-x86.exp: Don't exclude building tests
>         when non-native.
>         (check_pr25749b): Add optional args.  Set expected pass file
>         from args.  Run -1b and -2a tests with passall.out.
>         * testsuite/ld-elf/passall.out: New file.
>         * testsuite/ld-elf/pr25749-1.c: Adjust to pass with older glibc.
>         * testsuite/ld-elf/pr25749-2.c: Likewise.
>         * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use
>         regexp_diff to compare expected output from running binary.
>

LGTM.

Thanks.

-- 
H.J.


More information about the Binutils mailing list