summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qprocessordetection.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove -arch argument and #define QT_ARCH from configuresBradley T. Hughes2012-03-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not try to detect the host or target architectures using uname or similar, and do not override with the -arch or -host-arch configure arguments. The configures will still accept the -arch and -host-arch arguments, but it ignores them and instead outputs a warning stating that these arguments are obsolete and should not be used. Set QT_ARCH and QT_HOST_ARCH qconfig.pri variables based on the compiler target. This is done by running qmake (twice when cross-compiling) on config.tests/arch/arch.pro, which preprocesses a file that contains all knowns processors. On Windows, configure.exe has never run any config.tests before, and does not currently have a function to run a program and capture its output. Use _popen() to accomplish this (as qmake does for its system() function). This needs to be done after qmake is built, as does the mkspecs/qconfig.pri generation. As a side effect, the configure steps have been slightly re-ordered, but the overall result is the same. The displayConfig() call is moved to just before generating Makefiles, so that it can show the detected architecture(s). Change-Id: I77666c77a93b48848f87648d08e79a42f721683f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* byteorder: Fix compilation for MIPS and GCC < 4.6.Holger Hans Peter Freyther2012-03-101-0/+6
| | | | | | | | | Use the pre-processor macros to detect the byte order. This is how it is done for ARM and other platforms. Use the variant of the macro with the most underscores to match our ARM detection. Change-Id: I7d2b34bf45a7f3979b44a1fe2e95f678152a5dcd Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* byteorder: Improve the implementation comments for auto-detectHolger Hans Peter Freyther2012-03-091-6/+14
| | | | | | | | | | Parts of the auto-detection is using __BYTE_ORDER__. This pre-processor macro was added in GCC 4.6. Document that in the auto-detection code. Remove the misleading error message in qsysinfo.h. Change-Id: I66430ba1c9a1cdf476889ae6d5f3ca476243e000 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* misc: Fix some random typos and grammar while reading code.Holger Hans Peter Freyther2012-03-091-1/+1
| | | | | | | | | | | | Typos: recieve -> receive descrived -> describe Grammar: this types -> these types Change-Id: Iedacc51a6322996f423ac9472af0a597424a4fed Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fixed warnings from arm builds with -WundefRohan McGovern2012-03-071-3/+3
| | | | | | | | | Do not use the value of a macro before verifying that the macro is defined. Change-Id: I36bebe37da5f4e5e7af1e423b7f2b18091e35707 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove Q_BYTE_ORDER and -*-endian arguments from configuresBradley T. Hughes2012-03-021-1/+75
| | | | | | | | | | | | | | | | | | Do not write Q_BYTE_ORDER to qconfig.h in the configures. Instead, we #define Q_BYTE_ORDER in qprocessordetection.h, since many CPUs only support a single endian format. For bi-endian processors, we set Q_BYTE_ORDER depending on how the preprocessor sets __BYTE_ORDER__, __BIG_ENDIAN__, or __LITTLE_ENDIAN__ (instead of using a compile test to do so). For operating systems that only support a single byte order, we can check for Q_OS_* in addition to the preprocessor macros above. This is possible because qprocessordetection.h is included by qglobal.h after Q_OS_* and Q_CC_* detection has been done. Do this for Windows CE, which is always little- endian according to MSDN. Change-Id: I019a95e05252ef69895c4b38fbfa6ebfb6a943cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Rename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWERBradley T. Hughes2012-02-201-6/+10
| | | | | | | | | IBM's POWER and the PowerPC architecture have been merged into a single ISA, the Power ISA (see http://www.power.org). Use this unified name in Qt. Change-Id: Ia41492b0031d890843e43c5f7ecd1e60c65bb75b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document Q_PROCESSOR_* macrosBradley T. Hughes2012-02-181-0/+3
| | | | | | | | | | All known processors and their variants/revisions are documented. I added Q_PROCESSOR_MIPS_V based on the MIPS64 online documentation, which documents MIPS64 as a superset of MIPS IV and MIPS V. Change-Id: Ie2796d4f03499283aa2c96d60f5e37bd74a36ab0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove HP PA-RISC atomic implementation.Bradley T. Hughes2012-02-131-6/+0
| | | | | | | | | | | This architecture is obsolete and discontinued. Support for PA-RISC can be re-added if needed, but it would be preferred to use the GCC intrinsic support from qatomic_gcc.h (on Linux/HPPA, for example). Change-Id: I952e521a2c8c68840df0d44843b5487d5c20b135 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove failing for ARM Architectures.Andreas Holzammer2012-02-111-2/+0
| | | | | | | | Checks cover only V7, V6 and V5. But when trying to compile for V4 it fails. Change-Id: I573361c61acc904661bf2c8bfe1132cba57f296a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add qprocessordetection.hBradley T. Hughes2012-02-081-0/+194
This detects the target processor based on preprocessor #defines, setting Q_PROCESSOR_${FAMILY} accordingly. Optional Q_PROCESSOR_${FAMILY}_${REVISION/VARIANT} #defines are also provided, usually dependent on how the compiler is invoked. Currently detected families (and variants) include: ARM (v5, v6, and v7) X86 (i386 and x86_64, as X86_32 and X86_64 respectively) IA-64 MIPS (I, II, III, IV, 32, 64) Other families that currently are not detected, but Qt has (or had) support for include: Alpha AVR32 Blackfin PA-RISC PowerPC (optional 64-bit variant) S390 (and S390X 64-bit variant) SH (and SH-4A) SPARC (SPARC V9) Detection for these is currently commented out, and can be easily enabled later. Change-Id: I571f245c189b9d80c7c3a5369ac595a271f37c8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>