On Fri, Mar 01, 2019 at 12:00:50PM -0600, Segher Boessenkool wrote: > On Fri, Mar 01, 2019 at 06:07:57PM +0100, Jakub Jelinek wrote: > > On Fri, Mar 01, 2019 at 05:02:58PM +0000, Segher Boessenkool wrote: > > > This adds an option -mdejagnu-cpu=. This option simply overrides what > > > is given in -mcpu=. The reason for this is that with older versions > > > of DejaGnu the value given in the RUNTESTFLAGS will override the value > > > a testcase wants to have. > > > > Ugh, that is ugly. > > Hey, it's a nice improvement over what we have had for years already.
Even if we don't document the new option, I'm sure some users will start using it, report bugs for it, ... > > Can't we just detect the old dejagnu and override > > whatever tcl method is responsible for that? > > Not sure. We probably could. But are the new semantics actually > better? Sometimes you want the testcase flags to override the RUNTESTFLAGS, > but just as often you don't. So now older dejagnu versions have one > behaviour (and we will see those for very many years still, certainly on > Power, where we mostly use slow^Wold^Wenterprise distros), and newer dejagnu > versions have another behaviour, some things break with the old, some things > break with the new, and it's all a big mess. CCing Jonathan here, as he has I think dealt with this a lot in the libstdc++ testsuite. I believe the new dejagnu behavior is considered the desirable/right one, I fail to see when the old behavior would be wanted. If a testcase wants to override something, it should be able to. > > Having separate flags for the testcases that say "override the RUNTESTFLAGS" > gives the best of both worlds. Even with with new dejagnu, where normally > the RUNTESTFLAGS always wins. I thought new dejagnu behavior is RUNTESTFLAGS are placed early on the command line and dg-options follow. Jakub