From 5f6af9de48eba5e505dfe67d4ec36cfefdf23da6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 13 Jun 2014 15:12:28 -0700 Subject: Add the -qreal option to the Qt ABI information If -qreal float is passed, fullCpuArchitecture() will now include "-qreal_float". If something else other than "float" is passed to -qreal, we'll try to encode it (e.g., -qreal "fixed"). Change-Id: Ie33fd1a643f4376e6f01a7966e01c7c34e6fcffd Reviewed-by: Oswald Buddenhagen --- src/corelib/global/archdetect.cpp | 9 ++++++++- src/corelib/global/qglobal.cpp | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp index a3f05a40db..4697db52bb 100644 --- a/src/corelib/global/archdetect.cpp +++ b/src/corelib/global/archdetect.cpp @@ -87,6 +87,13 @@ # define ARCH_POINTER "ilp32" #endif +// qreal type, if not double (includes the dash) +#ifdef QT_COORD_TYPE_STRING +# define ARCH_COORD_TYPE "-qreal_" QT_COORD_TYPE_STRING +#else +# define ARCH_COORD_TYPE "" +#endif + // secondary: ABI string (includes the dash) #if defined(__ARM_EABI__) || defined(__mips_eabi) # define ARCH_ABI1 "-eabi" @@ -111,4 +118,4 @@ #define ARCH_ABI ARCH_ABI1 ARCH_ABI2 -#define ARCH_FULL ARCH_PROCESSOR "-" ARCH_ENDIANNESS "-" ARCH_POINTER ARCH_ABI +#define ARCH_FULL ARCH_PROCESSOR "-" ARCH_ENDIANNESS "-" ARCH_POINTER ARCH_COORD_TYPE ARCH_ABI diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 4aa25e5450..dd75421a55 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2221,6 +2221,11 @@ QString QSysInfo::cpuArchitecture() component is the main ABI (such as "eabi", "o32", "n32", "o64"); another is whether the calling convention is using hardware floating point registers ("hardfloat" is present). + + Additionally, if Qt was configured with \c{-qreal float}, the ABI option tag "qreal_float" + will be present. If Qt was configured with another type as qreal, that type is present after + "qreal_", with all characters other than letters and digits escaped by an underscore, followed + by two hex digits. For example, \c{-qreal long double} becomes "qreal_long_20double". \endtable \sa QSysInfo::cpuArchitecture() -- cgit v1.2.3