summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2022-10-06 23:15:30 +0200
committerPino Toscano <toscano.pino@tiscali.it>2022-10-07 23:01:01 +0200
commite81cba0cd33339c2e5f5e3c670741605264b21c2 (patch)
tree9c27bfa887a1f5188c8796a39b8b246d8b2e068e /src/corelib/global
parentf7a34630a1c13c054cf06199bbb907ddc718e48c (diff)
Add HPPA detection
- detect the HPPA architecture (PA-RISC) and define Q_PROCESSOR_HPPA - set the right machine type in QElfParser for HPPA ELF files Change-Id: I5214ce64ef1fdd0ecca3d6c1694c5db9b2852a22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/archdetect.cpp2
-rw-r--r--src/corelib/global/qprocessordetection.h9
-rw-r--r--src/corelib/global/qprocessordetection.qdoc9
3 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
index a0ce5baa43..0bb6853fea 100644
--- a/src/corelib/global/archdetect.cpp
+++ b/src/corelib/global/archdetect.cpp
@@ -17,6 +17,8 @@
# define ARCH_PROCESSOR "bfin"
#elif defined(Q_PROCESSOR_WASM)
# define ARCH_PROCESSOR "wasm"
+#elif defined(Q_PROCESSOR_HPPA)
+# define ARCH_PROCESSOR "hppa"
#elif defined(Q_PROCESSOR_X86_32)
# define ARCH_PROCESSOR "i386"
#elif defined(Q_PROCESSOR_X86_64)
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index 34d39512e9..d72b83bf1a 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -143,6 +143,15 @@
// # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
/*
+ PA-RISC family, no revisions or variants
+
+ PA-RISC is big-endian.
+*/
+#elif defined(__hppa__)
+# define Q_PROCESSOR_HPPA
+# define Q_BYTE_ORDER Q_BIG_ENDIAN
+
+/*
X86 family, known variants: 32- and 64-bit
X86 is little-endian.
diff --git a/src/corelib/global/qprocessordetection.qdoc b/src/corelib/global/qprocessordetection.qdoc
index 1cb16fce0c..b0e0b99597 100644
--- a/src/corelib/global/qprocessordetection.qdoc
+++ b/src/corelib/global/qprocessordetection.qdoc
@@ -87,6 +87,15 @@
*/
/*!
+ \macro Q_PROCESSOR_HPPA
+ \relates <QtProcessorDetection>
+
+ Defined if the application is compiled for PA-RISC processors.
+
+ \sa QSysInfo::buildCpuArchitecture()
+*/
+
+/*!
\macro Q_PROCESSOR_IA64
\relates <QtProcessorDetection>