On 18/06/2025 21:46, Alexandre Oliva wrote:
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
I can't find that error message in the source tree. Could this be some
local changes that you have? It seems wrong to me to be nobbling the
sources to work around a problem that the main source tree does not exhibit.
(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.
Perhaps it would be better to use a skip-if and then qualify that with a
suitable vxworks target config. But I still don't think this is
appropriate for upstream if the master sources do not exhibit this problem.
R.