don't mess with the qmake cmdline args any more.
Change-Id: I399d87145d31d25e29951b6acd96387a3c7282f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
when qmake runs into the new option(host_build) command, it will restart
the project evaluation with a host spec.
the new default host spec is called default-host (gasp!). it is
overridden with the pre-exising -spec / -platform option, while the new
-xspec / -xplatform option overrides the pre-existing default spec.
specifying -spec but not -xspec will set the xspec, too, so the behavior
is backwards-compatible. same for the XQMAKESPEC override read from
.qmake.cache and the environment variable.
the cleaner solution would be adding -hostspec, to be symmetrical with
the override semantics, but that would deviate from configure in turn.
Change-Id: I4297c873780af16ab7928421b434ce0f1d3820da
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This solved QTBUG-26111 in which qtjsbackend gets built with an
incomplete framework on Mac OSX. This was traced back to commit
6a6fd56e66 which moved QMAKE_CONFIG
values from .qmake.cache to mkspecs/qmodule.pri. Since qtjsbackend
contains config tests it creates its own .qmake.cache which was
previously masking this issue.
QMAKE_CONFIG incorrectly contained debug for debug_and_release builds
even though debug and release are already present in the CONFIG variable
in mkspecs/qconfig.pri. The changes to configure prevent CONFIG in
qmodule.pri from containing debug and release variables and ensure
that QT_CONFIG contains build_all and debug_and_release if appropriate.
Configure.app is also adjusted to match this behaviour.
The other part of the change is to qt_module_config.prf and
qt_plugin.prf. These changes take care of populating CONFIG with
the appropriate debug_and_release and build_all variables depending
upon what is present in QT_CONFIG. This ensures that the Qt modules
and plugins get built with the same configuration as qtbase.
The special handling for the qcocoa QPA plugin ensures that it is
built in release mode only to preserve the behaviour introduced by
commit 5603f94eaa.
Task-number: QTBUG-26111
Change-Id: I6f65aba50709e1b2431b8b4411ff30a06f7d8aed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
$VAL just happens to work in resolveDeviceMkspec because it is
set in the parent shell environment when the function is called.
Change-Id: I67350f2a9e790cc7eca2a73ef6a4a0d7f09b8d3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Follow-up to 0074cc5d34.
The configure script can be used for cross-building for Windows on
unix.
Change-Id: Ie7f9d0ff308ad5763cdf7b2664fa255e89bd5013
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This is the first step in supporting these checks on Windows.
Change-Id: I77cfd46bd733161ad2e52c2f76a6354b95ff737d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This allows us to have different flags for the compilers for
supporting the same feature. For example, the official flag in GCC to
support AVX2 is -mavx2, but ICC does not support it (yet), requiring
-march=core-avx2 or -xCORE-AVX2. That flag, instead, enables support
for all the features that the "Core-AVX2" processor (codename Haswell)
will support. And clearly, the MSVC flags are different.
Change-Id: I33b6d8617520925e807747180a8dbaafd79b7a9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
PLATFORMS is unused. Also remove the loop that printed all the
PLATFORMS when the mkspec couldn't be autodetected. Even if the
PLATFORMS variable was moved up, it wouldn't work anyway since
it detects files and not directories.
Change-Id: Id483c431a179fb01fcf680538e28c81763bc0b90
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
EGLFS has a hard dependency on evdev, so don't compile it when
evdev is not present.
This also removes the check that disabled EGLFS specifically for QNX.
Since QNX doesn't have evdev, EGLFS will get disabled automatically.
Change-Id: I9fdb364b2eff9b370fa238609a8f98af6ccb7f7b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
XPLATFORM_QNX was never explicitly set, yet the tests which evaluate it
assume that it is.
Change-Id: If97d2ee1f4432ada0c68e36348bf5bec85f94e43
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Commit 2a1b50d67c introduced a dependency
on evdev for eglfs which QNX does not provide. QNX also has a dedicated
QPA plugin so the eglfs plugin is not needed there.
It is not possible to use the -device configure defaults approach as
it is not cross-platform.
Change-Id: I2d151f16cf1a9576a0b0b528f0e9c17834c66e91
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Enabling support for C++11 adds CONFIG+=c++11 to the Qt build. Projects
using Qt can check for C++11 support using contains(QT_CONFIG, c++11) in
their .pr[iof] files.
The QMAKE_CXXFLAGS_CXX11 and QMAKE_LFLAGS_CXX11 qmake varibles contain
any arguments the compiler needs to enable C++11. CONFIG+=c++11 adds
these arguments to the build.
Support for clang, g++, and the Intel C++ Compiler for Linux are
included in this commit.
Change-Id: Id77f86d7ad4d5c740b890446a40b105879a0d327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Fontconfig has no X11 dependency and is of broader use to us than the X11
context. The test should also disambiguate whether fontconfig support is
successfully detected or not.
This change also removes a false X11 dependency from the freetype test.
Change-Id: I68a596aa06f614a64163772fe29a09edba119a81
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This information is required by qmake when cross compiling for Debian based
multi-arch devices in order to adequately resolve system libraries and
pkg-config information.
Change-Id: If96e677ab27c6f0453889c8f7cc43bdb9016f8b6
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
this is needed to correctly resolve the compiler (cf. $$CROSS_COMPILE)
Change-Id: Iaf7266ae464c15e8483780dcf9c970212630a93b
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
We already do this for -I and -L compiler flags, but not -D.
This caused configure tests to give incorrect results in some cases.
Task-number: QTBUG-25963
Task-number: QTQAINFRA-523
Change-Id: Ib270a1dc67759e36bc439e80ab8136a64c405d26
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Instead of saving the ability of the compiler to produce SSE2, AVX,
Neon, etc. code in .qmake.cache (Unix) or qconfig.pri (Windows), move
everything to qmodule.pri. Accordingly, move the DEFINES += settings
to qt_module.prf instead of qt.prf.
This allows us to re-use these settings in other Qt modules (other
than qtbase), if necessary. Though currently the extra compiler
definitions are found only in src/gui/gui.pro. They can be moved
elsewhere when it becomes necessary.
As a side-effect of this change, some other flags are moved from
.qmake.cache to qmodule.pri (on Unix). The flags that are getting
moved should probably be moved anyway.
Change-Id: Ibc3ab0111e148d81870772f9357273660aa93417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The configure script uses the bash $"..." string internationalization
syntax; this generates an error in other shells.
Since this feature is only used in one place it is likely a typo.
Change-Id: I076a785c3901b04175b8669e32c55989385720e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
If the system's compiler has extra features on top of the base
settings enabled or if the mkspec or $CXXFLAGS variable included some,
record them.
This will allow us to choose whether or not to use our own special
compilers, based on whether the system default compiler contains it or
not.
Change-Id: I87cada9fab4cfa58846a831d0a7c7b50d8fa87fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
For the Unix part, this now obeys the -v option, printing the full
command-line it used to compile, allowing testers to identify why
something went wrong.
Unfortunately, it requires a full compilation cycle, instead of just
preprocessing. Just one more among the many on Unix, but maybe a
noticeable slow-down on Windows.
Change-Id: I654b70d99887e04c96731a5b91be9ad555e4d8fe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
sometimes it pays off to actually check where variables are used ...
Change-Id: Ia91c89cb963ace50f432c54ffe5f57366ccd5603
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Qt's configure allows for spaces between an option and its
argument. This patch brings -l in line with -L et al.
Change-Id: Iea5c78dc06f69c21b7419fd9fa73c52ae1cea18f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
result was never returned by resolveDeviceMkspec
Change-Id: Ibd2f647e5524cdc9dbf4ea06f7b815f9dcc43212
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Specifying -device linux-amlogic-8726M-g++ is error prone. With this
change, one can specify any substring of the mkspec names under
devices/ and the first one will be picked.
Change-Id: I7c4522fdaefe4a11e9292f7831075aa766a62c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
In at least one case found in our testfarm, the compiler runs into an
ICE (Internal Compiler Error) compiling the new AVX code. The error it
reported was:
fatal error: error in backend: Cannot select: 0x7fbf1aa42210: f64 = sint_to_fp 0x7fbf1aa88a10 [ORD=1936] [ID=37]
0x7fbf1aa88a10: i32,ch = CopyFromReg 0x7fbf19538768, 0x7fbf1a9f2610 [ORD=1936] [ID=27]
0x7fbf1a9f2610: i32 = Register %vreg38 [ORD=1936] [ID=9]
As is the nature of ICEs, juggling the code around will probably make
it pass. But since I have plenty more AVX changes pending, which make
the code even more complex, it's also very likely that this issue will
happen in other places. For that reason, I choose to blacklist the
compiler instead.
Change-Id: Ide3201f0cc49c7ceb63e966f6de65a8315cbea4b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This significantly reduces the size of the generated code
in places where we don't need exceptions.
The -(no-)exceptions configure flag has been removed in the
process, as there is now a fine grained way to control this
on a per module level, and Qt is being compiled without
exceptions in most places.
Change-Id: I99a15c5d03339db1fbffd4987935d0d671cdbc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Store PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR for the usecase of
cross compilation in qconfig.pri. They will get picked up by
pkgConfigExecutable() in qt_functions.prf used from link_pkgconfig.prf
as environment for pkg-config calls.
Change-Id: I7d0de05c0bd21b435275fc26c66a80035ba30970
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Modern versions of Xcode properly support dwarf2, and as such dwarf2 is
always enabled. This change removes the ability to turn it off, making
dwarf2 non-optional.
Change-Id: I149daeae6048ee8a1ed116363572173ad219102e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Mostly straightforward porting: Add configure test from Qt 4. Add X11
include to qgtkstyle_p.cpp. Use renamed QGuiApplicationPrivate::showModalWindow.
Change-Id: I83020e13ec00b49f3fe346814f881bce19a6f602
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Let configure generate the QT_QPA_DEFAULT_PLATFORM_NAME in
qconfig.h. This allows us to override the platform name
using a configure argument.
This commit adds -qpa <platform> that lets the user specify
the default platform at configure time. Note that the default
platform is not checked against the tree since plugins are
allowed to exist outside the Qt source tree.
In the absence of -qpa argument, configure checks the mkspec
for a variable named QT_QPA_DEFAULT_PLATFORM. This check is
implemented only in the unix configure because it will be primarily
used in custom mkspecs (devices, boards).
If -qpa argument is absent and the mkspec variable is absent,
the default value is determined based on the OS as below:
Unix - "xcb"
Windows - "windows"
Mac - "cocoa"
QNX - "qnx"
Done-with: Jørgen Lind
Change-Id: I0df31811a1b901a3242bfada1232e596ebda04f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
The build tree is not initialized when -help is passed to configure.
The mkspecs/ directory is not created and thus the mv fails results
with the following error:
mv: cannot move `.device.vars' to `/tmp/qtbase/mkspecs/qdevice.pri': No such file or directory
The solution is to create qdevice.pri just before we run config.tests.
Change-Id: Ie83018e27a03bb840d213aae8c963b0074e62bb4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Some versions of the DirectFB headers are unclean and will cause Qt
compilation failures. So blacklist those versions. Version 1.5.3
(present in Fedora 16) is known to be buggy and gets disabled by this
patch.
The compile error was:
qurlquery.h:169:5: error: ‘typeof’ was not declared in this scope
(qplatformcursor_qpa.h includes qevent.h which includes qurl.h which
includes that)
The error comes from the Q_FOREACH expansion. Note that Q_FOREACH uses
__typeof__, so it's supposed to be safe, unless someone ill-advised
goes and defines the GCC "safe" macro (double underscores on both
sides) to something else.
Change-Id: Ida41ee3b3c2fcba86a7e12182e7055123166693b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The include files have a hard dependency on OpenGL (ES2); testing for the
presence of EGL support is insufficient grounds for including this
functionality
Change-Id: I391b5dbbcbef40ecf68d16617b6eb1c0bb4b799e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Instead of having to pass -no-xcb -no-eglfs -no-directfb, it's
better to pass -no-qpa-platform-guard which is also resilient
against future platform additions.
Change-Id: Id68bfe3688980fa273665b01b9332f5d6f359491
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Add DirectFB buildsystem integration by adding a configure target
and adding it as subdirectory to the project file. The default is
to automatically build directfb. Update the Broadcom/9425 build.
Change-Id: I482f865cebd9d5cd4c98c184773f8534f92db9df
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Scrolling the configure output to locate the build configuration
is painful. So save it in config.summary.
Change-Id: I40a2f7628e9a2b91a8ea44619dd49c00d5a61561
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The configure script currently automatically assumes that if you are cross
compiling, we should avoid trying to generate and strip separate debug
information due to toolchain limitations.
Historically there may have been good grounds for this, but it seems like
an aggressively pessimistic assumption which ignores the
standardization/advancement of embedded toolchains as a whole.
This assumption also extends to host compilers which deviate from the
automatically detected "platform" compiler, such as Clang.
Change-Id: Ifed2750325178bb5291d8ca1dde92925bfa36065
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Since the library and almost everything got renamed to qml, we
should do so for the debugging support, too.
(CONFIG+=declarative_debug will continue to work for some time
being, but prints a deprecated warning).
Change-Id: I295155dce873e2585c1452d2bf0625ea6ce219c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
configure parses the compiler from the mkspecs using an awk script.
The detected compiler is then used to determine sysroot support.
The awk script is currently unable to handle loading of qmake
features and thus configure will not detect the compiler correctly.
This is the case when using device profiles. The qdevice.pri is loaded
through the qmake feature file device_config.prf.
One possible way to fix this is to move this detection after qmake is
built and make this a .pro based config.test. However, this cannot be done
because the sysroot is actually baked into the qmake binary as the
QT_SYSROOT variable.
The solution is to remove this check completely and let the build fail
when Qt starts compiling with --sysroot.
Change-Id: I6c3b7ec2c8e5e390d6f5b1e602d656682d610b98
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-sysroot has been undocumented so far.
Change-Id: I552f9233778de9490a3479292f0cda9c8c439282
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>