On Jun 18, 2025, "Richard Earnshaw (lists)" <richard.earns...@arm.com> wrote:
> On 18/06/2025 21:46, Alexandre Oliva wrote: >> 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? As I said, it's probably in local specs. But why does it matter? Why are you so concerned about how I came to realize that I had failed to state the requirements of the test I added the other day, instead of on the fact that it's missing the statements of requirements? It's common and good practice to state such requirements, even on compile tests that could conceivably compile for other variants, and that don't test for any specific codegen patterns. It's present in tons of target-specific tests, including arm ones. If they shouldn't be there, should they not be in pr83712.c, pr91816.c, and so many others in gcc/testsuite/gcc.target/arm? Should they be dropped? Or maybe the requirements for this testcase should be stated as arm_arch_v7? I'd have to add arm_arch_v7 to check_effective_target_arm_arch_FUNC_ok et al, if there aren't reasons why it's not there, but I'd be happy to do that, and use dg-add-options instead of an explicit -march=armv7, like pr117675.c, if that would be preferred. > Perhaps it would be better to use a skip-if and then qualify that with > a suitable vxworks target config. Sure, that could work, but why go through that trouble? The test selects an option that implies thumb2, therefore it can't be wrong or undesirable to state that the test requires thumb2. Likewise, the test requires a specific arm arch, so it can't possibly be wrong or undesirable to state that the test requires that variant, and it would if the arch wasn't missing from target-supports.exp. -- 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!