]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Use run_host_cmd to run $CC and other no-section-header test fixes
authorAlan Modra <amodra@gmail.com>
Wed, 5 Jul 2023 13:53:51 +0000 (23:23 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 12 Jul 2023 00:50:14 +0000 (10:20 +0930)
commite729325e2ba4507e3891e57aadc39e67b67377e2
treeca322f37ac51afe93d62ba6f859614be2cb80225
parent06e4eccc43ce3eb990aca441dd91ca20c1de492f
Use run_host_cmd to run $CC and other no-section-header test fixes

We should be using run_host_cmd everywhere we invoke a compiler in the
ld testsuite, if we want to use ld/ld-new just built.  run_host_cmd
properly inserts $gcc_B_opt in cases where a user wants to test
binutils with a newly built compiler, ie. when $CC specifies -B itself.

Also, it is not good practice to exclude tests when non-native except
of course those tests that run a target binary.  Compiling and linking
often shows up problems.

* testsuite/ld-elf/no-section-header.exp (binutils_run_test):
Use run_host_cmd to invoke $CC_FOR_TARGET.  Run all tests
non-native too, except for attempting to run the binaries.
Run tests for ELF in general, not just linux.
* testsuite/ld-elf/pr25617-1-no-sec-hdr.rd: Allow localentry
symbol decoration, and support either sorting of symbols.
* testsuite/ld-elf/pr25617-1a-no-sec-hdr.rd: Likewise.
* testsuite/ld-elf/pr25617-1a-sec-hdr.rd: Likewise.
* testsuite/ld-elf/pr25617-1a-no-sec-hdr.nd: Accept D function syms.
* testsuite/ld-elf/start-shared-noheader-sysv.rd: Accept
mips-sgi-irix symbol output.
* testsuite/ld-elf/start-shared-noheader.nd: Likewise.

(cherry picked from commit 46f51ac38b81df4bf890e13824427c69285fdcaa)
ld/testsuite/ld-elf/no-section-header.exp
ld/testsuite/ld-elf/pr25617-1-no-sec-hdr.rd
ld/testsuite/ld-elf/pr25617-1a-no-sec-hdr.nd
ld/testsuite/ld-elf/pr25617-1a-no-sec-hdr.rd
ld/testsuite/ld-elf/pr25617-1a-sec-hdr.rd
ld/testsuite/ld-elf/start-shared-noheader-sysv.rd
ld/testsuite/ld-elf/start-shared-noheader.nd