This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/64802] New: [ARM] Selecting an -mcpu or -march that supports only one of ARM/Thumb should default to the ISA that *is* supported


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64802

            Bug ID: 64802
           Summary: [ARM] Selecting an -mcpu or -march that supports only
                    one of ARM/Thumb should default to the ISA that *is*
                    supported
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: minor
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
            Target: arm*

Currently for an arm-none-eabi-gcc configured with --with-fpu=neon-fp-armv8
--with-arch=armv8-a (or any configuration I suspect)
if I try to compile something with -mcpu=cortex-m3 I get an error:
pc.c:1:0: error: target CPU does not support ARM mode
 int main(void)
 ^
It only works if I add an -mthumb to the command line.
I think this is unhelpful. If a given -march or -mcpu doesn't support ARM mode
then the compilation should default to Thumb code generation that the
architecture supports unless the user explicitly specifies -marm (in which case
we should error out).

This would need some reorg in the way TARGET_ARM and TARGET_THUMB are defined
through arm.opt and perhaps arm_option_override


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]