summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ctf/slice.c
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2020-06-11 15:48:55 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-07-22 18:03:57 +0100
commit0b88415108880f2bd6c0f40937d7c321e524c3a9 (patch)
treeca94212dd096d685499076dd1a18817a368e4303 /ld/testsuite/ld-ctf/slice.c
parent5dba6f05b7ba3d0e1c99da54592815564c782b39 (diff)
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.
Diffstat (limited to 'ld/testsuite/ld-ctf/slice.c')
0 files changed, 0 insertions, 0 deletions