diff options
author | Alexandre Oliva <oliva@adacore.com> | 2024-05-30 02:06:48 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2024-05-30 02:06:48 -0300 |
commit | bdc264a16e327c63d133131a695a202fbbc0a6a0 (patch) | |
tree | c55313e92ec97846fe3f6d9b77cabc50f1fb6bb3 /mkdep | |
parent | c9842f99042454bef99fe82506c6dd50f34e283e (diff) | |
download | gcc-bdc264a16e327c63d133131a695a202fbbc0a6a0.zip gcc-bdc264a16e327c63d133131a695a202fbbc0a6a0.tar.gz gcc-bdc264a16e327c63d133131a695a202fbbc0a6a0.tar.bz2 |
[testsuite] conditionalize dg-additional-sources on target and type
g++.dg/vect/pr95401.cc has dg-additional-sources, and that fails when
check_vect_support_and_set_flags finds vector support lacking for
execution tests: tests decay to compile tests, and additional sources
are rejected by the compiler when compiling to a named output file.
At first I considered using some effective target to conditionalize
the additional sources. There was no support for target-specific
additional sources, so I added that.
But then, I found that adding an effective target to check whether the
test involves linking would just make for busy work in this case, and
so I went ahead and adjusted the handling of additional sources to
refrain from adding them on compile tests, reporting them as
unsupported.
That solves the problem without using the newly-added machinery for
per-target additional sources, but I figured since I'd implemented it
I might as well contribute it, since there might be other uses for it.
for gcc/ChangeLog
* doc/sourcebuild.texi (dg-additional-sources): Document
newly-added support for target selectors, and implicit discard
on non-linking tests that name the compiler output explicitly.
for gcc/testsuite/ChangeLog
* lib/gcc-defs.exp (dg-additional-sources): Support target
selectors. Make it cumulative.
(dg-additional-files-options): Take dest and type. Note
unsupported additional sources when not linking and naming the
compiler output. Adjust source dirname prepending to cope
with leading blanks.
* lib/g++.exp (g++_target_compile): Pass dest and type on to
dg-additional-files-options.
* lib/gcc.exp (gcc_target_compile): Likewise.
* lib/gdc.exp (gdb_target_compile): Likewise.
* lib/gfortran.exp (gfortran_target_compile): Likewise.
* lib/go.exp (go_target_compile): Likewise.
* lib/obj-c++.exp (obj-c++_target_compile): Likewise.
* lib/objc.exp (objc_target_compile): Likewise.
* lib/rust.exp (rust_target_compile): Likewise.
* lib/profopt.exp (profopt-execute): Likewise-ish.
Diffstat (limited to 'mkdep')
0 files changed, 0 insertions, 0 deletions