summaryrefslogtreecommitdiffstats
path: root/config.tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-1634-796/+3
|\ | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * x86: Disable AVX support on 64-bit MinGWThiago Macieira2019-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC for 64-bit Windows has a bug that it fails to properly re-align the stack pointer for use with 256-bit memory addresses (AVX). Therefore, there's about a 50/50 chance that any function using AVX will have an improperly-aligned stack. In release mode, stack accesses should be rare, but in debug mode they happen frequently. Either way, this is a ticking time bomb, so we disable. Clang is not affected. 32-bit MinGW is not affected. 64-bit in other OSes with GCC are not affected. Fixes: QTBUG-73539 Change-Id: Id061f35c088044b69a15fffd1580967808f31671 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * configure: modernize iconv useOswald Buddenhagen2018-12-195-112/+0
| | | | | | | | | | | | | | use library objects for all variants, and inline the tests. Change-Id: I029f9a6655a783dab4a22abf601aadbb484c03af Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * configure: enable inline tests to refer to PWDOswald Buddenhagen2018-12-193-106/+0
| | | | | | | | | | | | | | ... and use that to inline the xlocalescanprint test. Change-Id: I0973133d7f9ecc9a38b70dc4b83df174a35b2b1f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * configure: enable inline tests to contain auxiliary filesOswald Buddenhagen2018-12-193-49/+0
| | | | | | | | | | | | | | ... and use that to migrate the pch test. Change-Id: I2ce884442cab6124c37142f571cf6f82191ee4f5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * configure: inline openssl test sourcesOswald Buddenhagen2018-12-194-105/+0
| | | | | | | | | | Change-Id: I47c1c43b5db30cf1d59de9c6c20ca83abef2cf8c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * configure: inline a few more testsOswald Buddenhagen2018-12-1716-375/+0
| | | | | | | | | | | | | | | | these were new on dev while the original migration happened on 5.9, or came from new changes which hadn't adapted yet. Change-Id: I5e48437061a97e6df6e93881c98471455e177631 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * configure: inline corewlan testOswald Buddenhagen2018-12-172-48/+0
| | | | | | | | | | | | | | we have support for objc++ since 591edbb11. Change-Id: I5f430fd7c410913d4532627d18529b077f794035 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * configure: convert xlib to a proper library definitionOswald Buddenhagen2018-12-071-1/+0
| | | | | | | | | | Change-Id: I1623aee9e8632e4bfd466e09e275cc23f94c6dab Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-211-2/+2
| |\ | | | | | | | | | Change-Id: Iaf28977e7ecf566b28b9406dcb005d48621169c2
| | * OpenSSL: force the "1.0.0" soname when loading OpenSSL 1.0Giuseppe D'Angelo2018-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Linux distributions patch OpenSSL's soname, making builds on such distributions not deployable elsewhere. The problem is that the code loading OpenSSL symbols would attempt to use the soname of the build machine, and therefore not finding the OpenSSL libraries on the deploy system. The binary builds of Qt for Linux are affected by this problem, as they build under RHEL7.4 which changes to soname of OpenSSL to a non-standard string. This makes the binary builds not pick up OpenSSL 1.0 from the machine where the build gets installed on. Given that in the pre-1.1 versions only the 1.0 series is supported, bump the minimum requirement of Qt to that. The 1.0.x releases (up to 1.0.2, at the time of this writing) have kept binary compatibility, and advertise a soname of "1.0.0", which is used by most distributions. So, if loading of OpenSSL with the build-time soname fails, try to load them with the "1.0.0" hardcoded soname. [ChangeLog][QtNetwork][SSL] OpenSSL >= 1.0 is now required to build Qt with OpenSSL support. Task-number: QTBUG-68156 Change-Id: Ieff1561a3c1d278b511f09fef06580f034f188c6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Fix sub-architecture (instruction sets / SIMD) handlingAlexandru Croitor2019-03-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qmake there are at least 2 things to know regarding sub-architectures and instruction sets. Which instruction sets does the compiler know to compile for, represented by the various config.tests and features in qtbase/configure.json. And which instructions sets are enabled by the compiler by default, represented by the configure.json "architecture" test and accessed via QT_CPU_FEATURES.$$arch qmake argument. Before this patch there was some mishandling of the above concepts in CMake code. The former can now be checked in CMake with via TEST_subarch_foo and QT_FEATURE_foo (where foo is sse2, etc). The latter can now be checked by TEST_arch_${TEST_architecture_arch}_subarch_foo (where foo is sse2, etc and the main arch is dynamyicall evaluated). The configurejson2cmake script was adjusted to take care of the above changes, and the cmake files were regenerated as well. Change-Id: Ifbf558242e320cafae50da388eee56fa5de2a50c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | CMake: Add QT_CFLAGS_* when building x86simd testsTobias Hunger2019-03-181-0/+15
|/ / | | | | | | | | Change-Id: I5caa088d517cb9d3749c3ed8ef88a41552c1d340 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | AVX512 test: an intrinsic that GCC forgot to implement prior to GCC8Thiago Macieira2018-09-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | _mm512_mask_cvtepi32_storeu_epi8 is VPMOVDB (convert from 32-bit to 8-bit with truncation) where the destination is a memory address, with an OpMask register used to indicate which of the lanes in the vector to store. Similarly, _mm512_mask_cvtepi16_storeu_epi8 is VPMOVWB (convert from 16-bit o 8-bit), which is useful for UTF-16 to Latin1 conversion. Change-Id: I8f261579aad648fdb4f0fffd15542ea306841ce6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | SIMD: Remove unused (and unlikely to be ever used) AVX-512 profilesThiago Macieira2018-06-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | "AVX512MIC" (Many Integrated Cores) is the set of AVX-512 features found on the Intel Xeon Phi coprocessors (codename "Knights Landing"), which is an unlikely architecture for Qt to run on. The two profiles with VL came from study of early GCC code and are no longer applicable. GCC source code now shows both VBMI and IFMA as part of the -march=cannonlake feature set. Change-Id: Iff4151c519c144d580c4fffd153a0f268919fe2c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | qsimd: add support for new x86 CPU featuresThiago Macieira2018-05-051-1/+33
|/ | | | | | | | | | | | | | | | | | | | | | | | | This adds detection for: VAES, GFNI, AVX512VBMI2, AVX512VNNI, AVX512BITALG, AVX512VPOPCNTDQ, AVX512_4NNIW, AVX512_4FMAPS. These features were found in the "Intel® Architecture Instruction Set Extensions and Future Features" manual, revision 30. This commit also adds support for RDPID (already in the main manual) and the Control-flow Enforcement Technology, which appears in a separate Intel paper. This new support was done by adding a new generator script so we don't have to maintain two tables in sync, one in qsimd.cpp with the feature names, and the other in qsimd_p.h. Since we now need a lot more bits, it's no longer worth keeping the two halves of the qt_cpu_features variable mostly similar to the main two CPUID results. This commit goes back to keeping things in order, like we used to prior to commit 6a8251a89b6a61258498f4af1ba7b3d5b7f7096c (Qt 5.6) At the time of this commit, GCC 8 has macros for AVX512VPOPCNTDQ, AVX512_4NNIW, AVX512_4FMAPS, AVX512VBMI2 and GFNI. Change-Id: I938b024e38bf4aac9154fffd14f7afae50faaa96 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-142-50/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * configure: inline D3D11_QUERY_DATA_TIMESTAMP_DISJOINT testOswald Buddenhagen2018-01-182-50/+0
| | | | | | | | | | | | | | amends a96656a8fb. Change-Id: Ic434c272bfe985ea0410090537b8a22aad3192f1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Centralize the x86 SIMD testing in one placeThiago Macieira2017-11-308-165/+7
| | | | | | | | | | | | | | | | Since the x86_simd/main.cpp file already has all the source for each and every test anyway, just reuse it. Change-Id: I938b024e38bf4aac9154fffd14f779f450827fb9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add a configure-time check for QT_COMPILER_SUPPORTS_SIMD_ALWAYSThiago Macieira2017-11-302-0/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has two main benefits: 1) introduces a qmake CONFIG we can use in .pro/.pri/.prf files 2) removes the need to keep an up-to-date list of which compilers support the feature The test is implemented as trying to compile every single SIMD test we currently have, but without passing the -mXXX option. The reason for trying all of them is that some people may have modified their mkspecs to add -mXXX options or -march=XXX, which could enable the particular feature we tried, resulting in a false positive outcome. Change-Id: I938b024e38bf4aac9154fffd14f7784dc8d1f020 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add support for AVX-512 intrinsics found in MSVC 2017 15.3Thiago Macieira2017-11-302-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems the compiler supports /arch:AVX512 and /arch:AVX512F but none of the other switches (and neither are documented). And when you pass those, you also get Conflict Detection (CD), Double & Quad (DQ), Byte & Word (BW) and Vector Length (VL), which matches the ICC switch "-xCORE-AVX512". Unlike ICC, there doesn't seem to be an option to enable only the common part of AVX-512. Support for Intel Xeon Phi's current features (Exponential & Reciprocation and Prefetch) and future ones (IFMA, VBMI, 4FMAPS, 4VNNI and VPOPCNTDQ) seems to be missing altogether. See https://blogs.msdn.microsoft.com/vcblog/2017/07/11/microsoft-visual-studio-2017-supports-intel-avx-512/ Change-Id: I98105cd9616b8097957db680d73eb1f86e487e6d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Clean up OS version checks for Apple platformsJake Petroules2017-09-291-0/+5
| | | | | | | | | | | | | | | | | | | | Convert QSysInfo/QOperatingSystemVersion to __builtin_available where required or possible, or to QOperatingSystemVersion where __builtin_available cannot be used and is not needed (such as negated conditions, which are not supported by that construct). Change-Id: I83c0e7e777605b99ff4d24598bfcccf22126fdda Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileSystemEngine::setFileTime/Unix: remove the fallback to futimesatThiago Macieira2017-08-052-48/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use as in the code: futimesat(fd, NULL, &tv) is not documented to work. The file descriptor should be a directory's one, not an open file (though the Linux source code seems to handle that case). This call was done as a fallback to futimes, so it's very unlikely a system would have futimesat and not futimes. Both the Linux and the FreeBSD man pages say it's deprecated anyway. Change-Id: I8d96dea9955d4c749b99fffd14cd94068dc7668a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-02220-5438/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * ANGLE: Fix build for newer MinGW versionsOliver Wolff2017-08-022-0/+50
| | | | | | | | | | | | | | | | | | | | | | Availability of D3D11_QUERY_DATA_TIMESTAMP_DISJOINT depends on the used MinGW version so that the check for MINGW is not sufficient. The newly added configure test can be used for every toolset. Task-number: QTBUG-57916 Change-Id: Ia9cb48f3e673841101a93cbc8ea23aff9547f639 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * configure: clean up projects of remaining non-inline testsOswald Buddenhagen2017-08-027-8/+0
| | | | | | | | | | | | | | remove redundant and wholly ineffective CONFIG manipulations. Change-Id: I3836369a0eb32abfe985c7619c0f7c8037ad82e2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: un-namespace remaining non-inline configure testsOswald Buddenhagen2017-08-0220-0/+0
| | | | | | | | | | | | | | only few tests remain, and many of these were mis-classified anyway. Change-Id: Ic3bc96928a0c79fe77b9ec10e6508d4822f18df2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: Add a feature to write tests in the .json fileThiago Macieira2017-08-02198-5359/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're adding a lot of unnecessary files that end up later as cargo-cult, for at most a handful of lines. So instead move the testcases directly into the .json file. The following sources were not inlined, because multiple tests share them, and the inlining infra does not support that (yet): - avx512 - openssl - gnu-libiconv/sun-libiconv (there is also a command line option to select the exact variant, which makes it hard/impossible to properly coalesce the library sources) The following sources were not inlined because of "complications": - verifyspec contains a lengthy function in the project file - stl contains lots of code in the source file - xlocalescanprint includes a private header from the source tree via a relative path, which we can't do, as the test's physical location is variable. - corewlan uses objective c++, which the inline system doesn't support reduce_relocs and reduce_exports now create libraries with main(), which is weird enough, but doesn't hurt. Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: Ic3a088f9f08a4fd7ae91fffd14ce8a262021cca0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * configure: remove redundant parts of xcb_xkb testOswald Buddenhagen2017-08-021-9/+0
| | | | | | | | | | | | | | | | testing the non-xkb xcb parts is unnecessary, as we already did that separately. Change-Id: I452cc746315117a0169f0e0c764fe7e0229437e9 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * configure: dispose of which.testOswald Buddenhagen2017-08-021-39/+0
| | | | | | | | | | | | | | | | | | just use 'which' and be done with it. the script was rather arcane, and worked around deficiencies of cygwin (no longer relevant) and solaris (assumed to be somewhat sane meanwhile). Change-Id: I2e11ea3c87ac06a85604ac8d58d8fee95eae2e15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: modernize dbus testOswald Buddenhagen2017-08-021-6/+1
| | | | | | | | | | | | | | | | remove useless define and ifdef/error, and check for a more appropriate function. Change-Id: I1a1622cc157c49ebb6787068ade7b33e45e228ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: remove check for ancient libpng < 1.0.17Oswald Buddenhagen2017-08-021-4/+0
| | | | | | | | | | | | | | that's just noise nowadays. Change-Id: Ife75ebcc67de45db76265b1a8fb3b8130ff58c0f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: prune checks for ancient compilers from some testsOswald Buddenhagen2017-08-022-9/+0
| | | | | | | | | | | | | | | | these would be caught by the central verifyspec test, if we even got that far. Change-Id: I3eda80c4614b94f869d907f0a40166f4914ea692 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: remove support for obsolete platformsOswald Buddenhagen2017-08-026-20/+0
| | | | | | | | | | | | | | | | | | | | - #error hack for MIPSpro compiler from unix/clock-* - irix exclusions from unix/*iconv - hpux defines from unix/{getifaddrs,ipv6ifname} (the obsolete hpuxi-g++-64 spec would add them automatically anyway) Change-Id: Ib227e5626c0e8c8f6faebf76c312d77955f80b92 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: don't force debug build for arch & cpu feature testsOswald Buddenhagen2017-08-0210-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | amends b4525b3407, which gives no indication for why this was done. judging by other tests, it wasn't cargo-culted. i presume it was just about disabling debug-and-release, and the debug choice was arbitrary. the central system nowadays does the same, just that it uses release. amends 1533bfc5fc, which certainly _was_ cargo-culted from the former. as a side effect, this removes some other CONFIG manipulations which are handled centrally or are wholly ineffective nowadays. Change-Id: Ib9af2837925a2f19af05506e798a26d363635735 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * configure: get rid of indirect #defines in gl testsOswald Buddenhagen2017-08-025-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the gles tests, use #ifdef __APPLE__ directly instead of defining BUILD_ON_MAC. this is consistent with the desktop gl test, less magic, and corresponds with the later usage (which does #ifdef Q_OS_MAC). amends f3d82a89. in the desktop gl test, clean out the dead Q_OS_MAC define from the project file (added in 45dc5852 concurrently to the more direct fix in 864815ef). Change-Id: Ieebad3c7e87218b887f61485c331b93eadfcf406 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-132-51/+0
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * configure: Remove test for unused feature "mremap"Thiago Macieira2017-07-102-51/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a Linux-specific call that was added to the kernel in pre historical times (before Git). Sqlite3 uses mremap(2) but it has its own checking. Nothing else in Qt uses this. Looks like the last user was the QPF font engine, removed in commit d7e424ee6686f663f5134666e09c2875bb3e42b6 almost four years ago. And that's considering that the QPF font engine wasn't in use since Qt 5.0 because QWS was no more... Change-Id: Idaa189413f404cffb1eafffd14ceee7488514c1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Rename the "sys_auxv" feature to "getauxval"Thiago Macieira2017-07-063-1/+1
| | | | | | | | | | Change-Id: I8d96dea9955d4c749b99fffd14cdbd1e69940d33 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QSslSocket: OpenSSL 1.1 backendRichard J. Moore2017-07-042-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch-set implements a new QSslSocket backend based on OpenSSL 1.1. 1. General. The code in this patch was organized to achieve these (somewhat contradicting) objectives: - keep the new code free of #if-ery, as far as possible; - make it easy to clean away dead code when we're eventually able to retire out-dated OpenSSL versions; - reduce the amount of code duplication. If changes in some file/component were insignificant (~5 one-liners per file), we still use pp-checks like: #if QT_CONFIG(opensslv11) ... #else ... #endif - the logic is simple and it's still easy to clean the code if we remove the legacy back-end. Where it saved #if-ery, we also introduced 'forward-compatible' macros implementing equivalents of 1.1 functions using older OpenSSL. In case some class contains a lot of version-specific ifdefs (particularly where nested #if-ery was complex) we choose to split code into: "pre11" h/cpp files, "shared" h/cpp files (they preserve their original names, e.g qsslsocket_openssl.cpp) and "11" h/cpp files. If in future we remove the legacy back-end, "pre11" should be removed; "shared" and "11" parts - merged. 2. Configuration. We introduced a new feature 'opensslv11' which complements the pre-existing 'openssl' and 'openssl-linked' features. The 'opensslv11' feature is enabled by a simple test which either compiles successfully or ends in a compilation error, depending on a value of the OPENSSL_VERSION_NUMBER constant. If the feature was enabled, we also append an additional compilation flag -DOPENSSL_API_COMPAT=0x10100000L to make sure our new code does not contain deprecated structures, function calls, macro-invocations from OpenSSL < 1.1. Change-Id: I2064efbe9685def5d2bb2233a66f7581954fb74a Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QRandomGenerator: use getentropy on Linux & OpenBSDThiago Macieira2017-06-302-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The getentropy function, first found in OpenBSD, is present in glibc since version 2.25 and Bionic since Android 6.0 and NDK r11. It uses the Linux 3.17 getrandom system call. Unlike glibc's getrandom() wrapper, the glibc implementation of getentropy() function is not a POSIX thread cancellation point, so we prefer to use that even though we have to break the reading into 256-byte blocks. The big advantage is that these functions work even in the absence of a /dev/urandom device node, in addition to a few cycles shaved off by not having to open a file descriptor and close it at exit. What's more, the glibc implementation blocks until entropy is available on early boot, so we don't have to worry about a failure mode. The Bionic implementation will fall back by itself to /dev/urandom and, failing that, gathering entropy from elsewhere in the system in a way it cannot fail either. uClibc has a wrapper to getrandom(2) but no getentropy(3). MUSL has neither. Change-Id: Ia53158e207a94bf49489fffd14c8cee1b968a619 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add support for OpenGL ES 3.2 in QOpenGLExtraFunctionsLaszlo Agocs2017-06-302-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the usual pattern: Add a config test and automatic include of GLES3/gl32.h if there is a GLES 3.2 capable header+lib at build time. Then, regardless of this being enabled, expose all new 3.2 API functions in QOpenGLExtraFunctions and resolve them dynamically at run time. This way 3.2 functions will be available when deployed to a 3.2 capable system (or OpenGL 3/4.x with the functions in question available) regardless of what was present in the sysroot at build time. Change-Id: Ia52551f3178591e1e56ceac8e45d89c6b13f4927 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QRandomGenerator: don't internally rely on QT_HAS_INCLUDEThiago Macieira2017-06-204-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC didn't support it until version 5 or 6, so add configure tests for both <random> and <sys/auxv.h>. Normally I'd say "upgrade", but this is too low-level and important a feature. There's a good chance that all our supported compilers have <random> anyway. As for <sys/auxv.h>, it's present on Glibc, Bionic and MUSL, but I don't see it in uClibc (AT_RANDOM is a Linux-specific feature). Change-Id: Ia3e896da908f42939148fffd14c5b2af491f7a77 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-195-4/+54
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * rework detection and use of clock_gettime()/librtOswald Buddenhagen2017-06-173-4/+0
| | | | | | | | | | | | | | | | recent versions of glibc include clock_gettime() inside libc itself. Task-number: QTBUG-41009 Change-Id: I7401773be99682a356bf06a69571d11c4b15978b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Enable stack-protector-strong for QNX 7.0.0James McDonnell2017-06-132-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally enabled in the mkspecs for 64-bit QNX 7.0.0 but that broke when the qtConfig change was made. It looks like qtConfig shouldn't be used in the platform mkspecs. I suspect the stack-protector changes were left out of the 32-bit mkspecs so that 6.6.0 builds wouldn't be affected. Ignore the stack-protector/stack-protector-all possibility since it isn't possible to access it without a command line option. Specifying both options doesn't even make sense since stack-protector-all encompasses stack-protector. For now, leave out command line control of this feature. Task-number: QTBUG-59644 Change-Id: I99323216be5b592dd2c3bef6d22da195764a6e65 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add proper detection of x86 RDRAND instructionThiago Macieira2017-06-122-0/+59
| | | | | | | | | | | | | | | | | | The instruction is "RDRAND", but the feature name, according to GCC, is RDRND, so I had to change some macros in qsimd_p.h. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5166779137e63 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-075-0/+105
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Fix build with clang 4.0 and libstdc++ 7.1.1Sérgio Martins2017-06-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this setup clang cannot use c++1z yet. Fixed with clang 5.0. In file included from /data/sources/qt/qt5/qtbase/src/corelib/codecs/qtextcodec.cpp:53: In file included from ../../../include/QtCore/5.9.1/QtCore/private/qcoreglobaldata_p.h:1: In file included from ../../../include/QtCore/5.9.1/QtCore/private/../../../../../../../../../sources/qt/qt5/qtbase/src/corelib/kernel/qcoreglobaldata_p.h:55: In file included from ../../../include/QtCore/qmap.h:1: In file included from ../../../include/QtCore/../../../../../../sources/qt/qt5/qtbase/src/corelib/tools/qmap.h:52: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/map:60: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/stl_tree.h:72: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/node_handle.h:39: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:27: error: use of class template 'optional' requires template arguments Change-Id: Ib4cd8a9f5791a6e6cae4e6d61dfec3ad50dd63ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Add USB HID device feature to INTEGRITYKimmo Ollila2017-05-302-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | This change adds USB mouse handling support for INTEGRITY Change-Id: I8a2a51c8c3578898e90dd5bbb01f6aed6c64e2a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Nikola Velinov <nvelinov@ghs.com> Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Tero Alamaki <tero.alamaki@qt.io>