diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2015-02-26 14:45:13 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-02-27 05:54:36 +0000 |
commit | 4e966497ce3674286f38faab68679201ec6ca22e (patch) | |
tree | d12535ba25337549af0174752713a31a4407854a /src/corelib/tools/qsimd.cpp | |
parent | 3f858a07726666222372f793f1e1a5de3c8ec373 (diff) |
Android: Fix compilation for x86
Bionic on x86 does not have an implementation of ffs(),
for some reason. The declaration is available in
strings.h, but causes a linker error. The toolchain has
a builtin version though, which can be used instead.
Change-Id: Iaf4c27542c1aabe88713842303251db44ae6ba86
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qsimd.cpp')
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index a031080fdb..52ffc161bf 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -512,7 +512,9 @@ int ffs(int i) #endif } #endif -#endif // Q_OS_WIN +#elif defined(Q_OS_ANDROID) +# define ffs __builtin_ffs +#endif QBasicAtomicInt qt_cpu_features = Q_BASIC_ATOMIC_INITIALIZER(0); |