On 10/28/2015 05:56 AM, Andersson, Joakim wrote:
> So that means that ARM actually has at least 3 different compilers,

Thank you for the explanation.

> and my patches only cover ARM Compiler 5 (armcc). This is the only
> compiler I have access to and a license for and the only one that
> is used in my projects.

Okay.  We don't need to implement support for any other compiler now,
but I'd like to choose the compiler ids now in case they need to be
distinct.

> So in my opinion we either use a single compiler ID for all of the
> ARM-provided toolchains (something like ARMCT) or we use different
> compiler IDs per toolchain (ARMC5, ARMC6 and ARMGCC).

Each compiler id corresponds to a particular stream of versions of
that compiler along with expectation that particular flags exist.
Given the compiler id one should know what CMAKE_C_COMPILER_VERSION
components mean.  This is why `Clang` and `AppleClang` are different
ids: their version numbers differ.

Currently you're detecting the compiler with:

   /* __ARMCC_VERSION = PVVbbbb */
 # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/1000000)
 # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 
100)
 # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION     % 
10000)")

Do all the compilers define that?  Are they different?  Is there
another preprocessor definition that distinguishes them?  Do they
also define __GNUC__ and/or __clang__?

> It's likely that the ARM GCC toolchain doesn't actually require a
> new ID and may work directly with the current CMake support.

Yes, it is probably fine to identify it as "GNU".  Does it define
the __ARMCC_VERSION macro?

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to