binutils, testsuite: allow compilation before doing run_dump_test
authorNick Alcock <nick.alcock@oracle.com>
Thu, 11 Jun 2020 14:48:55 +0000 (15:48 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Wed, 22 Jul 2020 17:03:57 +0000 (18:03 +0100)
commit0b88415108880f2bd6c0f40937d7c321e524c3a9
treeca94212dd096d685499076dd1a18817a368e4303
parent5dba6f05b7ba3d0e1c99da54592815564c782b39
binutils, testsuite: allow compilation before doing run_dump_test

The CTF assembler emitted by GCC has architecture-dependent pseudos in
it, and is (obviously) tightly tied to a particular set of C source
files with specific types in them.  The CTF tests do run_dump_test on
some candidate input, link it using the run_dump_test ld machinery, and
compare objdump --ctf output.  To avoid skew, we'd like to be able
to easily regenerate the .s being scanned so that the .c doesn't get
out of sync with it, but since GCC emits arch-dependent pseudos, we
are forced to hand-hack the output every time (quite severely on some
arches, like x86-32 and -64, where every single pseudo used is not only
arch-dependent but undocumented).

To avoid this, teach run_dump_test how to optionally compile things
given new, optional additional flags passed in in the cc option.
Only sources with the .c suffix are compiled, so there is no effect on
any existing tests.  The .s files go into the tmpdir, from which
existing run_dump_test code picks them up as usual.

binutils/
* testsuite/lib/binutils-common.exp (run_dump_test): Add 'cc'
option.
binutils/ChangeLog
binutils/testsuite/lib/binutils-common.exp
This page took 0.023874 seconds and 4 git commands to generate.