On Fri, 2018-10-12 at 14:45 -0400, David Malcolm wrote: > [re this thread "ToT build failure?": > https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00344.html ] > > On Thu, 2017-07-06 at 20:58 +0200, Jakub Jelinek wrote: > > On Thu, Jul 06, 2017 at 01:45:42PM -0400, David Malcolm wrote: > > > Given that the previous status quo of the selftests was to > > > require > > > the > > > C frontend, I committed the attached patch (as r250036), under > > > the > > > "obvious" rule, retaining the ability to optionally run the > > > selftests > > > within the C++ frontend. > > > > You should do something similar for how we make check etc.: > > CHECK_TARGETS = @check_languages@ > > > > check: $(CHECK_TARGETS) > > > > and then each Make-lang.in defining its check-<lang> goal. > > So similarly to that s-selftest-c++ should be in cp/Make-lang.in > > and based on the configured languages should include the s- > > selftest- > > <lang> > > dependencies. > > > > Jakub > > Thanks. > > I attemped the above, but it required each Make-lang.in to define > a check-<lang> goal, but there are only two that make sense to run > (those that set LANG_HOOKS_RUN_LANG_SELFTESTS: C and C++). > > Rather than add one to every Make-lang.in, I borrowing the "append" > approach used by "lang_checks", so that only the Make-lang.in files > that opt-in to having selftests need to do anything, appending > their s-selftest-<LANG> to lang_selftests. > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > I manually verified that the self-tests were run 6 times: C and C++, > for each of the three stages (each run taking well under a second). > > OK for trunk?
Sorry; I failed to properly check the case Steve ran into back in July, and my patch doesn't handle it (all of the Make-lang.in files are included, regardless of configuration, via LANG_MAKEFRAGS). I'm working on an updated patch. Dave