On Jun 18, 2025, Richard Earnshaw <richard.earns...@arm.com> wrote:

> On 18/06/2025 10:31, Alexandre Oliva wrote:
>> On Jun  9, 2025, "Richard Earnshaw (lists)" <richard.earns...@arm.com> wrote:
>> 
>>> On 08/06/2025 14:15, Alexandre Oliva wrote:
>>>> 
>>>> VxWorks kernel mode doesn't support thumb code, so the test fails.
>>>> Require thumb2 support.
>> 
>>> You already have -march=armv7, so that implies any thumb code will be
>>> thumb2.
>> The parm of arm_thumb2_ok I'm interested in is the one about the
>> compiler's not issuing an error message when thumb mode is enabled, even
>> if implicitly by -march.  arm-vx7r2 in kernel mode errors out with
>> -march=armv7, so there's no way to run the test there.

> This is a compile-only test.  In what way does vxworks kernel mode
> have anything to do with this?

The compiler, in kernel mode (that's implicit), rejects thumb mode:

$ arm-wrs-vxworks7r2-gcc -march=armv7 -S whatever.c
arm-wrs-vxworks7r2-gcc: error: -mthumb and kernel mode are mutually incompatible

(whatever.c doesn't even exist)

IIRC this rejection is currently implemented through (internal?) specs.

I'm using arm_thumb2_ok to tell whether the tools are able to target
thumb2, and that's the purpose of arm_thumb2_ok.  I'm *not* testing for
runtime or hardware support (that would conventionally have suffix _hw),
because, as you point out, this is a compile test.

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to