[PATCH, GCC/testsuite/ARM] Skip optional_mthumb tests if GCC has a default mode

Christophe Lyon christophe.lyon@linaro.org
Tue Dec 13 11:26:00 GMT 2016


On 13 December 2016 at 12:18, Thomas Preudhomme
<thomas.preudhomme@foss.arm.com> wrote:
> On 13/12/16 10:11, Christophe Lyon wrote:
>>
>> On 13 December 2016 at 10:54, Thomas Preudhomme
>> <thomas.preudhomme@foss.arm.com> wrote:
>>>
>>> On 12/12/16 21:17, Christophe Lyon wrote:
>>>>
>>>>
>>>> Hi Thomas,
>>>>
>>>> Thanks for working on this,
>>>>
>>>>
>>>> On 12 December 2016 at 18:52, Thomas Preudhomme
>>>> <thomas.preudhomme@foss.arm.com> wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> The logic to make -mthumb optional for Thumb-only devices is only
>>>>> executed
>>>>> when no -marm or -mthumb is given on the command-line. This includes
>>>>> configuring GCC with --with-mode= because this makes the option to be
>>>>> passed
>>>>> before any others. The optional_mthumb-* testcases are skipped when
>>>>> -marm
>>>>> or
>>>>> -mthumb is passed on the command line but not when GCC was configured
>>>>> with
>>>>> --with-mode. Not only are the tests meaningless in these
>>>>> configurations,
>>>>> they also spuriously FAIL if --with-mode=arm was used since the test
>>>>> are
>>>>> built for Thumb-only devices, as reported by Christophe Lyon in [1].
>>>>>
>>>>> [1] https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02082.html
>>>>>
>>>>> This patch adds logic to target-support.exp to check how was GCC
>>>>> configured
>>>>> and changes the optional_mthumb testcases to be skipped if there is a
>>>>> default mode (--with-mode=). It also fixes a couple of typo on the
>>>>> selectors.
>>>>>
>>>>
>>>> How hard would it be to skip these tests only if --with-mode=arm,
>>>> such that they would still pass in configurations --with-mode=thumb?
>>>>
>>>> It seems easy to extend what you propose here, doesn't it?
>>>
>>>
>>>
>>> It is but IMO it gives a false sense of quality since it does not test
>>> the
>>> optional -mthumb logic.
>>>
>>> What is the motivation to make it run with --with-mode=thumb?
>>>
>>
>> With your patch, they will appear as unsupported, right?
>> It's not a big deal.
>
>
> yes indeed.
>
OK, that's fine if that's your intent.

>>
>> Do you know how most people configure their toolchains?
>> Linaro and Ubuntu (I think) use --with-mode=thumb.
>> Do most people use no --with-mode configure flag?
>
>
> I cannot answer for people in general but in our case we use
> --with-multilib-list which will build the toolchain for several -march,
> -mfpu and -mfloat combinations. But it's good to have a mix, it finds more
> issues in the testsuite as this very examples shows.
>
>>
>> In the validations I run against trunk, I always have --with-mode,
>> except for one arm-none-eabi configuration where I also use
>> default cpu/fpu.
>
>
> For good reason because without those it will compile target libraries
> without any option and so the default would be used (ie ARMv4T in default
> mode). Either you need to specify some --with-* or you built with multilib.
>
I keep this configuration with all defaults to make sure everything
still works for the default, armv4t indeed. And there are often problems
in the testsuite as you know, because people test with more modern
configurations.

>>
>> Maybe I should remove --with-mode=thumb from my config
>> --with-cpu=cortex-m3? (but I don't remember if the new logic
>> was backported to gcc-5/gcc-6 ?)
>
>
> No it wasn't backported.
>
> Best regards,
>
> Thomas



More information about the Gcc-patches mailing list