Add qprocessordetection.h
authorBradley T. Hughes <bradley.hughes@nokia.com>
Sun, 5 Feb 2012 12:10:55 +0000 (13:10 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 8 Feb 2012 11:33:11 +0000 (12:33 +0100)
commiteebc124f4c7fd28b3e8da327dcfcda354712cce3
tree494a2663350d03aebe3168bafc55f63cbdbc2ee3
parentbf69cc93323ccd9abe20fd1320d35bdfcced8761
Add qprocessordetection.h

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>
src/corelib/global/global.pri
src/corelib/global/qglobal.h
src/corelib/global/qprocessordetection.h [new file with mode: 0644]
sync.profile