Alloca() is not supported on all platforms, like
INTEGRITY on ARM, so adding a configure check for it.
This can be used when building QtQml and 3rd party
code, in particular PCRE2 and SQLite.
Change-Id: I9785e16c21f67d1a68fef567e18c3356170f027e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
this makes it consistent with the determination of the default
include/library paths. this makes sense, as it's possible to switch the
sdk/toolchain after building qt (within reason).
a side effect of this change is that for compilers which emulate other
compilers, both the real and the emulated version are now made
available.
Change-Id: Icfcc672c0d2e3d1b5e622993c366063d70ad327c
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
instead of letting the specs validate themselves on each call, let them
only define a callback for use by the verifyspec configure test. this
is somewhat faster, and allows them to be loaded before qdevice.pri is
populated.
Change-Id: I2b60d006b33bbf42c28949f10ad429520ed32f46
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
PCRE1 is going towards EOL. PCRE2 is the way forward in terms
of new features, performance, and security improvements. The
APIs that QRegularExpression uses are similar so the required
modifications aren't extensive.
The biggest difference comes to JIT-compiling of the pattern.
In PCRE1, JIT-compiling did not modify the processed PCRE pattern,
but returned a new chunk of data.
This allowed multiple threads to keep matching using the same
processed data and NULL for the JIT data, until a thread
JIT-compiled and atomically set the shared JIT data to the results
of the compilation.
In PCRE2, JIT-compiling _modifies_ the processed PCRE pattern in a
way that it's thread unsafe [1]; the results of JIT-compilation
are stored somewhere inside the processed pattern.
This means the above approach cannot work -- a thread may be
matching while another one JIT-compiles, causing a data race.
While waiting for better workarounds from upstream, employ a
read/write mutex to protect the matching from JIT-compilation.
[1] https://lists.exim.org/lurker/message/20160104.105831.3cb25b39.en.html
[ChangeLog][General] QRegularExpression now requires the PCRE2
library, at least version 10.20. Support for the PCRE1 library
has been dropped. A copy of PCRE2 is shipped with Qt and will
automatically be used on those platforms which lack it.
Change-Id: I9fe11104230a096796df2d0bdcea861acf769f57
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit re-enables support for OpenVG in Qt, but not in the
same way as in Qt 4.8. The first part is about adding a test
and using the new configure system to enable OpenVG.
There is still support code in Qt for setting up EGL to provide a
surface and context for rendering with the OpenVG API, this commit
enables a path to do so.
Normally to get access to an EGLContext from a QWindow you do so via
QOpenGLContext, but in setups without OpenGL but with EGL and OpenVG
this doesn't make sense (there would be no QOpenGLContext). So the
intended way is to use a QWindow to get an EGLSurface, then create
an EGLContext directly (without going through QPA).
Change-Id: I0f75aadbaa3cd006deb7e6fd12cfbb574870fba4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Recent Khronos headers decided to break the world by guarding all
function prototypes with GL_GLEXT_PROTOTYPES which has traditionally
been used for extension headers only.
Until this gets corrected - see
https://lists.freedesktop.org/archives/mesa-dev/2016-September/128654.html
- add the define to the config tests and qopengl.h.
While 5.7 already has some of the qopengl.h fixes due to an upgraded
ANGLE shipping with newer headers, this is a cross-platform issue that
will surface everywhere eventually. Therefore we target the full set
of fixes to 5.6.
This time we also make sure the forced define of GL_GLEXT_PROTOTYPES
is removed before including the ext header, thus apps get the ext
protos only if they actually requested them.
Task-number: QTBUG-56764
Change-Id: Ib2c6d2e7b71b8fb8683424f43e6289e64e4ee46c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
this is much more intuitive, and actually produces a sensible result
with configure -recheck after a compiler upgrade.
Change-Id: Icfa0b85377d9fc014e66490c8ebf6c9236df978e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Partial Direct2D was added to recent versions of MinGW, which made the
config test pass but is not sufficient to actually build the plugin.
Check for IDXGISurface1 in addition.
Change-Id: Ie108f5735ceb0a44934429b0fd2213612ed28848
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There may not be a version when libinput is not picked up via
pkg-config. Add a config test instead.
Task-number: QTBUG-56017
Change-Id: I421af4cef1b896413a4ebda561809a8b2a3386b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
convert the ugly config.tests/[...]/freetype.pri file into a custom
callback in configure.pri, and reinstate pkg-config use for freetype.
subsequently, use QMAKE_USE for the actual library references.
this fixes in particular cross-builds, as the new configure was not
passing the necessary information to the test any more, so the old .pri
file misbehaved.
Task-number: QTBUG-54911
Change-Id: I5fc9c254334a2675f7db4d54df4c77637e8e2487
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
5971b88e is not needed in new configure.
This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.
Conflicts:
mkspecs/features/default_pre.prf
mkspecs/features/mac/toolchain.prf
mkspecs/features/toolchain.prf
src/dbus/qdbusconnection.cpp
src/plugins/sqldrivers/mysql/qsql_mysql.cpp
src/sql/drivers/mysql/qsql_mysql.cpp
src/widgets/widgets/qmenubar.cpp
src/widgets/widgets/qmenubar_p.h
tools/configure/configureapp.cpp
tools/configure/environment.cpp
tools/configure/environment.h
Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
Yes, yes, this is just a configure test, but why do something stupid
in the code and then have to shut up Coverity manually?
Fix by making it a global, which means it will be zero-initialized
(I didn't want to do the obvious = 0, as that could protentially
create a "0 used as nullptr" warning at some point in the future.
Coverity-Id: 59485
Change-Id: I49ecd28be983a0e42b420d20da0db34a872c6f44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows setting of variables, like FOO=bar.
Yes, it's intentional that there are no quotes.
Change-Id: Ib306f8f647014b399b87ffff13f1d9e6a10fa2f8
(cherry picked from commit e79200bf7f)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
cleaner, and covers windows as well.
Change-Id: I0e884909a3f49610fab750ba1ef6112f43e5d5d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
so far, each library was distributed over a test and (optionally) a
'library' output of a feature. this was conceptually messy and limiting.
so instead, turn libraries into a category of their own.
libraries now support multiple properly separated sources, which makes
overriding them a lot saner. sources can be conditional to accommodate
platform differences.
as an immediate consequence, move (almost) all library references from
the config test projects to the json file.
a few tests were excluded, because they are doing somewhat magic things
that should not be handled in this bulk change:
- freetype: .pri file shared with actual source code
- clock-gettime: -lrt is conditional, and there is a .pri file which is
shared with actual source code
- ipc_posix: -lrt & -lpthread conditional
- iconv: -liconv conditional
the multi-source mechanism is used to make a variety of tests work on
windows, where the library name differs from unix (and sometimes between
build configurations). some tests still needed minor adjustments to
actually work.
on the way, fix up disagreements between manually specified libraries
and pkg-config lines (affecting several xcb-related tests).
Change-Id: Ic8c58556fa0cf8f981d386b13ea34b4431b127c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
having compound tests is messy, and we already have a separate test for
that anyway.
the kms test itself gains a fallback library, as that's what both the
egldevice test did and the actual projects using kms do.
Change-Id: I4544b64de86d58d6c6449bc0ad9095acaf144056
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
it's bound to the bourne shell, which is not readily available on
windows hosts.
on the way, the pch, fvisibility, and bsymbolic_functions tests were
rewritten as regular compile tests. they now just verify that qmake's
built-in support for the tested features actually works.
Change-Id: Ibac246f21b5ececa40da3f576dc789982eaf9fdf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
d520c825f already mentioned it, but failed to actually remove it.
Change-Id: I3aef8f057baad1c1c66aab8b3e5c4e879a544834
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
don't mix in gles2 stuff, and rely on the library definitions from the
mkspec.
Change-Id: Id81b27a8c4f24729866d3ceb5cf97b443def542c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
mitshm, xcursor, xfixes, xrandr, xshape, and xsync were dead for a long
time (see also 4cb795cbdb).
glxfbconfig was also dead (see also d54b77d55).
x11/notype and x11/xkb became dead in 4535913c4f.
javascriptcore-jit became dead in 24f1025663.
stdint was another webkit vestige (see also 1b716724f7).
Change-Id: I04f408cb917c767951645c6445f15f24378fa43a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Conflicts:
configure
5.7 now supports clang on android; but dev re-worked configure
src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line. Applied the rename to both
for consistency.
tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.
.qmake.conf
Ignored 5.7's change to MODULE_VERSION.
configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.
Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
Conflicts:
src/corelib/io/qtemporarydir.cpp
One side encapsulated a repeated piece of #if-ery in a local define;
the other added to the #if-ery. Made its addition to the other's.
src/corelib/kernel/qeventdispatcher_unix_p.h
One side moved some members into a struct; this collided with a #undef
check that neither side now has. Discarded the #undef part.
src/gui/opengl/qopengltexturehelper_p.h
5.7 deleted a bunch of methods; not clear why merge got confused.
src/tools/moc/moc.cpp
One added a name to the copyright header; another changed its URL.
Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
On macOS, the test script is passed the full path to the compiler, like
/usr/local/bin/icpc. That doesn't match "icpc".
Change-Id: I149e0540c00745fe8119fffd1463c87b8f6a89b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
it positively makes no sense to have a configure test which will be
never reached due to the configure/qmake bootstrap failing with a
slew of totally unhelpful error messages.
pre-standardization partial c++11 implementations are now rejected,
except for VS2013, which is still sufficient despite not announcing full
compatibility.
Change-Id: I58af10e03960af06b80cedac105cf8433f7a1745
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change d1b09dba45 removed the
support to detect the C++ version the compiler used by
default. In essence, it forced the compiler in C++11 mode,
if the default was still C++98.
This change reimplements the functionality in the new
configuration system.
Change-Id: Ib4bf7ade85288776f9ae2a870f19764df727e0a5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Detect host and target architecture from within qmake, and set
QT_ARCH accordingly.
Change-Id: I30255f88c7645d197bd07355a1dff02b377cbbe8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reference an SQLite3 function to verify that the library is being
linked. Discovered that the test didn't do this when I switched the
Windows configure to use a compile test to determine whether the
system has SQLite3. The test passed even though the initial
configure changes failed to provide the test with information about
the SQLite3 libraries.
Change-Id: I3114cfc2dec3a42a60c8e1e432eb8375b440d7e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Where accept4() is used, NetBSD offers paccept() as a replacement function.
Modify check for using accept4() and use paccept() on NetBSD.
See http://netbsd.gw.com/cgi-bin/man-cgi?paccept++NetBSD-current
and http://reviews.llvm.org/D12485
Change-Id: I9b3ecba5f3afad6c357d3f7b8f89589bf313e273
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>