This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Compile SDK11 with ARM Compiler Version 6

I would like to use the latest ARM Compiler Version 6 (armclang) because I need some features of the C++11 language.

Is it possible to use the latest ARM Compiler Version 6 to compile the SDK 11 ? Which flags should we use to be compatible with all macros currently available for GCC and armcc ?

In future SDK releases, will this compiler be officially supported ?

Parents
  • is armclang related to clang, as in the LLVM compiler? If so, it's very likely not going to work at all. clang/llvm fails to generate proper softdevice calls in release mode for reasons I and others have gone into at length on other threads. You can't currently use clang to compile so if armclang is based on LLVM, give up.

  • unfortunately even optnone doesn't work in many cases, the clang optimiser is very aggressive and because there's nothing saying the arguments are used at all, even if it leaves them alone in the function itself, it often just doesn't even set them up for the call.

    I've been through every single option clang has for trying to control this and not one works at high optimisation levels properly.

    What's needed, unfortunately, is for the SVCALL macro to expand to have some more information, eg the count of parameters, in that way it's possible to have different stubs for different argument counts and reference that the arguments are used (and that r0 contains the return).

    Arguably clang is actually right here and gcc is sort of wrong, but that doesn't really help!

Reply
  • unfortunately even optnone doesn't work in many cases, the clang optimiser is very aggressive and because there's nothing saying the arguments are used at all, even if it leaves them alone in the function itself, it often just doesn't even set them up for the call.

    I've been through every single option clang has for trying to control this and not one works at high optimisation levels properly.

    What's needed, unfortunately, is for the SVCALL macro to expand to have some more information, eg the count of parameters, in that way it's possible to have different stubs for different argument counts and reference that the arguments are used (and that r0 contains the return).

    Arguably clang is actually right here and gcc is sort of wrong, but that doesn't really help!

Children
No Data
Related