Re: [PATCH] MIPS: Allow R6 compact branch policy to be left unspecified

From: Maciej W. Rozycki
Date: Wed May 11 2016 - 09:22:26 EST


On Wed, 11 May 2016, Ralf Baechle wrote:

> I was wondering if we should simply probe for the availability of the
> GCC option and not use it, if using an older GCC, then change the
> help text for the option accordingly. This approach would allow
> make randconfig or similar to work as expected with older compilers.

Well, if the default is `optimal' anyway, then I think we can simply omit
the option unless someone has requested an override. In which case I
think the compilation should fail if the option is not supported, under
the principle of the least surprise -- if someone has requested a feature,
then they ought to be informed that it is absent rather than silently
fooled into thinking it has been enabled while in fact it has not.

I agree probing for the presence of the option requested and then failing
gracefully (e.g. "Toolchain feature FOO not available, please upgrade or
reconfigure without BAR" or suchlike) is a better idea than just aborting
midway through, and I think `randconfig' and similar validators should be
prepared for it and handle gracefully as well (i.e. not a kernel bug).

FWIW,

Maciej