diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-06 08:28:53 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-06 08:36:32 (GMT) |
commit | b163780ff12c3b36cc7e2d5ef1f79001e67ccec6 (patch) | |
tree | be2ac3c3dd43681d64b5fe4ff0b57fec82a48869 /src/corelib/tools | |
parent | 5668b043497f054f61fa08d94c64d9c8a1307bfa (diff) | |
download | Qt-b163780ff12c3b36cc7e2d5ef1f79001e67ccec6.zip Qt-b163780ff12c3b36cc7e2d5ef1f79001e67ccec6.tar.gz Qt-b163780ff12c3b36cc7e2d5ef1f79001e67ccec6.tar.bz2 |
Fix compilation on ARM: don't include kernel headers
Kernel headers are sometimes evil that they are incompatible or
missing. At least one toolchain on ARM doesn't have them, so don't
include.
Instead, copy the definitions. The kernel ABI is stable so these
values won't change on us.
Reviewed-by: Benjamin Poulain
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 7349432..a9c33f1 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -54,8 +54,20 @@ #if defined(Q_OS_LINUX) && defined(__arm__) #include "private/qcore_unix_p.h" -#include <asm/hwcap.h> -#include <linux/auxvec.h> +// the kernel header definitions for HWCAP_* +// (the ones we need/may need anyway) + +// copied from <asm/hwcap.h> (ARM) +#define HWCAP_IWMMXT 512 +#define HWCAP_CRUNCH 1024 +#define HWCAP_THUMBEE 2048 +#define HWCAP_NEON 4096 +#define HWCAP_VFPv3 8192 +#define HWCAP_VFPv3D16 16384 + +// copied from <linux/auxvec.h> +#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ + #endif QT_BEGIN_NAMESPACE |