[CMake] How to determine a ABI version of the arm-linux-gcc?

Yegor Yefremov yegor_sub1 at visionsystems.de
Mon Jan 25 05:00:40 EST 2010


Alexander Neundorf wrote:
> On Friday 22 January 2010, Yegor Yefremov wrote:
>> Hello,
>>
>> I have two toolchains to compile programs for ARM Debian: one supporting
>> older ABI (Etch) and one for EABI (Lenny). How can I determine the ABI
>> version using CMake?
> 
> Please post the output of the following command for both versions:
> <your_arm_gcc> -v -E -x c++ -dD /dev/null

This is for EABI one:

Using built-in specs.
Target: arm-unknown-linux-gnueabi
Configured with: /home/user/Projects/distros/targets/src/gcc-4.3.2/configure --build=i486-build_pc-linux-gnu --host=i486-build_pc-linux-gnu --target=arm-unknown-linux-gnueabi --prefix=/opt/arm-linux-gcc-4.3.2-gnueabi --with-sysroot=/opt/arm-linux-gcc-4.3.2-gnueabi/arm-unknown-linux-gnueabi/sys-root --enable-languages=c,c++ --disable-multilib --with-float=soft --with-gmp=/opt/arm-linux-gcc-4.3.2-gnueabi --with-mpfr=/opt/arm-linux-gcc-4.3.2-gnueabi --with-pkgversion=crosstool-NG-1.3.2 --enable-__cxa_atexit --with-local-prefix=/opt/arm-linux-gcc-4.3.2-gnueabi/arm-unknown-linux-gnueabi/sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.3.2 (crosstool-NG-1.3.2)
COLLECT_GCC_OPTIONS='-v' '-E' '-dD' '-mfloat-abi=soft'
 /opt/arm-linux-gcc-4.3.2-gnueabi/libexec/gcc/arm-unknown-linux-gnueabi/4.3.2/cc1plus -E -quiet -v -D_GNU_SOURCE /dev/null -mfloat-abi=soft -dD
ignoring nonexistent directory "/opt/arm-linux-gcc-4.3.2-gnueabi/arm-unknown-linux-gnueabi/sys-root/opt/arm-linux-gcc-4.3.2-gnueabi/arm-unknown-linux-gnueabi/sys-root/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/include/c++/4.3.2
 /opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/include/c++/4.3.2/arm-unknown-linux-gnueabi
 /opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/include/c++/4.3.2/backward
 /opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/include
 /opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/include-fixed
 /opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/include
 /opt/arm-linux-gcc-4.3.2-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/include
End of search list.
# 1 "/dev/null"
# 1 "<built-in>"
#define __STDC__ 1
#define __cplusplus 1
#define __STDC_HOSTED__ 1
#define __GNUC__ 4
#define __GNUG__ 4
#define __GNUC_MINOR__ 3
#define __GNUC_PATCHLEVEL__ 2
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __WCHAR_TYPE__ unsigned int
#define __WINT_TYPE__ unsigned int
#define __INTMAX_TYPE__ long long int
#define __UINTMAX_TYPE__ long long unsigned int
#define __GXX_WEAK__ 1
#define __DEPRECATED 1
#define __GXX_RTTI 1
#define __EXCEPTIONS 1
#define __GXX_ABI_VERSION 1002
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __INT_MAX__ 2147483647
#define __LONG_MAX__ 2147483647L
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __WCHAR_MAX__ 4294967295U
#define __CHAR_BIT__ 8
#define __INTMAX_MAX__ 9223372036854775807LL
#define __FLT_EVAL_METHOD__ 0
#define __DEC_EVAL_METHOD__ 2
#define __FLT_RADIX__ 2
#define __FLT_MANT_DIG__ 24
#define __FLT_DIG__ 6
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN__ 1.17549435e-38F
#define __FLT_EPSILON__ 1.19209290e-7F
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_DIG__ 15
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 53
#define __LDBL_DIG__ 15
#define __LDBL_MIN_EXP__ (-1021)
#define __LDBL_MIN_10_EXP__ (-307)
#define __LDBL_MAX_EXP__ 1024
#define __LDBL_MAX_10_EXP__ 308
#define __DECIMAL_DIG__ 17
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __DEC32_MANT_DIG__ 7
#define __DEC32_MIN_EXP__ (-95)
#define __DEC32_MAX_EXP__ 96
#define __DEC32_MIN__ 1E-95DF
#define __DEC32_MAX__ 9.999999E96DF
#define __DEC32_EPSILON__ 1E-6DF
#define __DEC32_DEN__ 0.000001E-95DF
#define __DEC64_MANT_DIG__ 16
#define __DEC64_MIN_EXP__ (-383)
#define __DEC64_MAX_EXP__ 384
#define __DEC64_MIN__ 1E-383DD
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __DEC128_MIN_EXP__ (-6143)
#define __DEC128_MAX_EXP__ 6144
#define __DEC128_MIN__ 1E-6143DL
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC128_EPSILON__ 1E-33DL
#define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
#define __REGISTER_PREFIX__
#define __USER_LABEL_PREFIX__
#define __VERSION__ "4.3.2"
#define __GNUC_GNU_INLINE__ 1
#define __NO_INLINE__ 1
#define __FINITE_MATH_ONLY__ 0
#define __CHAR_UNSIGNED__ 1
#define __WCHAR_UNSIGNED__ 1
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG__ 4
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_LONG_DOUBLE__ 8
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __SIZEOF_POINTER__ 4
#define __arm__ 1
#define __APCS_32__ 1
#define __ARMEL__ 1
#define __SOFTFP__ 1
#define __VFP_FP__ 1
#define __THUMB_INTERWORK__ 1
#define __ARM_ARCH_5T__ 1
#define __ARM_EABI__ 1
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#define __gnu_linux__ 1
#define __linux 1
#define __linux__ 1
#define linux 1
#define __unix 1
#define __unix__ 1
#define unix 1
#define __ELF__ 1
# 1 "<command-line>"
#define _GNU_SOURCE 1
# 1 "/dev/null"
COMPILER_PATH=/opt/arm-linux-gcc-4.3.2-gnueabi/libexec/gcc/arm-unknown-linux-gnueabi/4.3.2/:/opt/arm-linux-gcc-4.3.2-gnueabi/libexec/gcc/arm-unknown-linux-gnueabi/4.3.2/:/opt/arm-linux-gcc-4.3.2-gnueabi/libexec/gcc/arm-unknown-linux-gnueabi/:/opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/:/opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/:/opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/bin/
LIBRARY_PATH=/opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/:/opt/arm-linux-gcc-4.3.2-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/lib/:/opt/arm-linux-gcc-4.3.2-gnueabi/arm-unknown-linux-gnueabi/sys-root/lib/:/opt/arm-linux-gcc-4.3.2-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-E' '-dD' '-mfloat-abi=soft'

This is non-EABI one:

Using built-in specs.
Target: arm-vscom-linux-gnu
Configured with: /usr/local/src/temp2/targets/src/gcc-4.2.2/configure --build=i686-unknown-linux-gnu --target=arm-vscom-linux-gnu --host=i686-unknown-linux-gnu --prefix=/opt/arm-linux-gcc-4.2.2 --with-sysroot=/opt/arm-linux-gcc-4.2.2/arm-vscom-linux-gnu/sys-root --enable-languages=c,c++ --with-float=soft --enable-__cxa_atexit --disable-multilib --with-local-prefix=/opt/arm-linux-gcc-4.2.2/arm-vscom-linux-gnu/sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.2.2
 /opt/arm-linux-gcc-4.2.2/libexec/gcc/arm-vscom-linux-gnu/4.2.2/cc1plus -E -quiet -v -D_GNU_SOURCE /dev/null -mfloat-abi=soft -dD
ignoring nonexistent directory "/opt/arm-linux-gcc-4.2.2/arm-vscom-linux-gnu/sys-root/opt/arm-linux-gcc-4.2.2/arm-vscom-linux-gnu/sys-root/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/arm-linux-gcc-4.2.2/lib/gcc/arm-vscom-linux-gnu/4.2.2/../../../../arm-vscom-linux-gnu/include/c++/4.2.2
 /opt/arm-linux-gcc-4.2.2/lib/gcc/arm-vscom-linux-gnu/4.2.2/../../../../arm-vscom-linux-gnu/include/c++/4.2.2/arm-vscom-linux-gnu
 /opt/arm-linux-gcc-4.2.2/lib/gcc/arm-vscom-linux-gnu/4.2.2/../../../../arm-vscom-linux-gnu/include/c++/4.2.2/backward
 /opt/arm-linux-gcc-4.2.2/lib/gcc/arm-vscom-linux-gnu/4.2.2/include
 /opt/arm-linux-gcc-4.2.2/lib/gcc/arm-vscom-linux-gnu/4.2.2/../../../../arm-vscom-linux-gnu/include
 /opt/arm-linux-gcc-4.2.2/arm-vscom-linux-gnu/sys-root/usr/include
End of search list.
# 1 "/dev/null"
# 1 "<built-in>"
#define __STDC__ 1
#define __cplusplus 1
#define __STDC_HOSTED__ 1
#define __GNUC__ 4
#define __GNUG__ 4
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 2
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __WCHAR_TYPE__ long int
#define __WINT_TYPE__ unsigned int
#define __INTMAX_TYPE__ long long int
#define __UINTMAX_TYPE__ long long unsigned int
#define __GXX_WEAK__ 1
#define __DEPRECATED 1
#define __EXCEPTIONS 1
#define __GXX_ABI_VERSION 1002
#define __USING_SJLJ_EXCEPTIONS__ 1
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __INT_MAX__ 2147483647
#define __LONG_MAX__ 2147483647L
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __WCHAR_MAX__ 2147483647
#define __CHAR_BIT__ 8
#define __INTMAX_MAX__ 9223372036854775807LL
#define __FLT_EVAL_METHOD__ 0
#define __DEC_EVAL_METHOD__ 2
#define __FLT_RADIX__ 2
#define __FLT_MANT_DIG__ 24
#define __FLT_DIG__ 6
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN__ 1.17549435e-38F
#define __FLT_EPSILON__ 1.19209290e-7F
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_DIG__ 15
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 53
#define __LDBL_DIG__ 15
#define __LDBL_MIN_EXP__ (-1021)
#define __LDBL_MIN_10_EXP__ (-307)
#define __LDBL_MAX_EXP__ 1024
#define __LDBL_MAX_10_EXP__ 308
#define __DECIMAL_DIG__ 17
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __DEC32_MANT_DIG__ 7
#define __DEC32_MIN_EXP__ (-95)
#define __DEC32_MAX_EXP__ 96
#define __DEC32_MIN__ 1E-95DF
#define __DEC32_MAX__ 9.999999E96DF
#define __DEC32_EPSILON__ 1E-6DF
#define __DEC32_DEN__ 0.000001E-95DF
#define __DEC64_MANT_DIG__ 16
#define __DEC64_MIN_EXP__ (-383)
#define __DEC64_MAX_EXP__ 384
#define __DEC64_MIN__ 1E-383DD
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __DEC128_MIN_EXP__ (-6143)
#define __DEC128_MAX_EXP__ 6144
#define __DEC128_MIN__ 1E-6143DL
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC128_EPSILON__ 1E-33DL
#define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
#define __REGISTER_PREFIX__
#define __USER_LABEL_PREFIX__
#define __VERSION__ "4.2.2"
#define __GNUC_GNU_INLINE__ 1
#define __NO_INLINE__ 1
#define __FINITE_MATH_ONLY__ 0
#define __CHAR_UNSIGNED__ 1
#define __arm__ 1
#define __APCS_32__ 1
#define __ARMEL__ 1
#define __SOFTFP__ 1
#define __ARM_ARCH_3__ 1
#define __gnu_linux__ 1
#define __linux 1
#define __linux__ 1
#define linux 1
#define __unix 1
#define __unix__ 1
#define unix 1
#define __ELF__ 1
# 1 "<command-line>"
#define _GNU_SOURCE 1
# 1 "/dev/null"

Yegor


More information about the CMake mailing list