summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-02-10 15:50:47 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-17 08:22:43 +0100
commitf0f78eb0a9cc5d5898937201baa0e543ce4cac22 (patch)
treeb9db7b48f92f01935f5c1fb5d0b75037d7537878 /src/corelib
parente7b8c9227132a26acd3d975050fd1f6fd4f22944 (diff)
Remove usages of QT_ARCH and QT_ARCH_* from qtbase
The architecture is detected at compile time based on the predefined macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf files. The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present in the current copy of src/3rdparty/libpng, so no change in functionality is expected. The conditional for the SUPPORT_JIT define in pcre.pri is moved to src/3rdparty/pcre/config.h, again so that we can use the compiler's predefined macros to detect the architecture at compile time. Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their Q_PROCESSOR_* equivalents. Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with their Q_OS_* equivalents. Note that this commit also effectively disables the SPARC atomic implementation. An inline implementation for SPARC needs to be added, or we remove the current code and instead rely on the GCC intrinsic or C++11 std::atomic support on SPARC. Note also that this commit does not remove QT_ARCH from configure or qconfig.h. This will continue to be set until all Qt 5 projects can be moved away from using QT_ARCH. Change-Id: I5de747cc4436d21941329974cff3016970f497b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/arch/arch.pri6
-rw-r--r--src/corelib/arch/sparc/arch.pri6
-rw-r--r--src/corelib/global/qglobal.h2
-rw-r--r--src/corelib/kernel/qmetatype.h2
-rw-r--r--src/corelib/tools/qvector.h2
5 files changed, 6 insertions, 12 deletions
diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri
index cb2102cefd..c64bbe2821 100644
--- a/src/corelib/arch/arch.pri
+++ b/src/corelib/arch/arch.pri
@@ -25,9 +25,3 @@ unix {
HEADERS += arch/qatomic_unix.h
SOURCES += arch/qatomic_unix.cpp
}
-
-QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
-exists($$QT_ARCH_CPP) {
- DEPENDPATH += $$QT_ARCH_CPP
- include($$QT_ARCH_CPP/arch.pri, "", true)
-}
diff --git a/src/corelib/arch/sparc/arch.pri b/src/corelib/arch/sparc/arch.pri
index 9bb3a888e8..b3ca399640 100644
--- a/src/corelib/arch/sparc/arch.pri
+++ b/src/corelib/arch/sparc/arch.pri
@@ -2,9 +2,9 @@
# SPARC architecture
#
*-64* {
- SOURCES += $$QT_ARCH_CPP/qatomic64.s
+ SOURCES += $$PWD/qatomic64.s
}
else {
- SOURCES += $$QT_ARCH_CPP/qatomic32.s \
- $$QT_ARCH_CPP/qatomic_sparc.cpp
+ SOURCES += $$PWD/qatomic32.s \
+ $$PWD/qatomic_sparc.cpp
}
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 91ac4bd41d..22e73ede26 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -463,7 +463,7 @@ typedef int QNoImplicitBoolCast;
// This logic must match the one in qmetatype.h
#if defined(QT_COORD_TYPE)
typedef QT_COORD_TYPE qreal;
-#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
+#elif defined(QT_NO_FPU) || defined(Q_PROCESSOR_ARM) || defined(Q_OS_WINCE)
typedef float qreal;
#else
typedef double qreal;
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 0b6a62e5c8..1473231d64 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -203,7 +203,7 @@ public:
// This logic must match the one in qglobal.h
#if defined(QT_COORD_TYPE)
QReal = 0,
-#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
+#elif defined(QT_NO_FPU) || defined(Q_PROCESSOR_ARM) || defined(Q_OS_WINCE)
QReal = Float,
#else
QReal = Double,
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 0eb227e59d..4230e55ff5 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -67,7 +67,7 @@ struct Q_CORE_EXPORT QVectorData
QtPrivate::RefCount ref;
int alloc;
int size;
-#if defined(QT_ARCH_SPARC) && defined(Q_CC_GNU) && defined(__LP64__) && defined(QT_BOOTSTRAPPED)
+#if defined(Q_PROCESSOR_SPARC) && defined(Q_CC_GNU) && defined(__LP64__) && defined(QT_BOOTSTRAPPED)
// workaround for bug in gcc 3.4.2
uint sharable;
uint capacity;