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 @@ -142,6 +142,15 @@ // # define Q_PROCESSOR_BLACKFIN // # 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 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 @@ -86,6 +86,15 @@ \sa QSysInfo::buildCpuArchitecture() */ +/*! + \macro Q_PROCESSOR_HPPA + \relates + + Defined if the application is compiled for PA-RISC processors. + + \sa QSysInfo::buildCpuArchitecture() +*/ + /*! \macro Q_PROCESSOR_IA64 \relates diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 2890e55311..09b73b206a 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -113,6 +113,8 @@ struct ElfMachineCheck EM_AARCH64 #elif defined(Q_PROCESSOR_BLACKFIN) EM_BLACKFIN +#elif defined(Q_PROCESSOR_HPPA) + EM_PARISC #elif defined(Q_PROCESSOR_IA64) EM_IA_64 #elif defined(Q_PROCESSOR_MIPS) @@ -378,6 +380,7 @@ Q_DECL_UNUSED Q_DECL_COLD_FUNCTION static QDebug &operator<<(QDebug &d, ElfHeade #endif case EM_IA_64: d << ", IA-64"; break; case EM_MIPS: d << ", MIPS"; break; + case EM_PARISC: d << ", HPPA"; break; case EM_PPC: d << ", PowerPC"; break; case EM_PPC64: d << ", PowerPC 64-bit"; break; #ifdef EM_RISCV