On 12/1/20 11:15 PM, Alexandre Oliva wrote:
> There's a help.exp test that checks that the help message for
> -Wabsolute-value mentions it's available in C and ObjC, when compiling
> a C++ program.
>
> However, if GCC is built with the C++ language disabled, the
> .cc file is compiled as C, and the message [available in C...] becomes
> [disabled] instead, because that's the default for the flag in C.
>
> I suppose it might also be possible to disable the C language, and
> then the multitude of help.exp tests that name c as the source
> language will fail.
>
> This patch avoids these fails: it detects the message "compiler not
> installed" in the compiler output, and bails out as "unsupported".
>
> Regstrapped on x86_64-linux-gnu; also tested with a cross compiler to
> arm-eabi with C++ disabled. Ok to install?
>
>
> for gcc/testsuite/ChangeLog
>
> * lib/options.exp (check_for_options_with_filter): Detect
> unavailable compiler for the selected language, and bail out
> as unsupported.
OK
jeff