Commit Graph

150 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
591edbb11c Detect C standard and try using the most recent one (take 2)
Fixes the default C version used with gcc < 5

Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-21 09:05:14 +00:00
Oswald Buddenhagen
2c6801cb37 configure: cache test output as well
that way we can create a config.log which is consistent with the end
state even if (some) tests are not executed this time around.

Change-Id: Ia953ede62d6640aab912559f435ceb1f9ec6d9dc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-10 18:51:13 +00:00
Friedemann Kleint
dbc983a513 Revert "Detect C standard and try using the most recent"
The change causes a crash when compiling the xkbcommon 3rdparty
library and compile failures (qtimageformats on Android).

This reverts commit a47cb14680.

Task-number: QTBUG-67326
Task-number: QTBUG-67327
Change-Id: I5ddc4eccad699e3eaec535fd6a63d11b0026b42e
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-03-26 15:10:33 +00:00
Allan Sandfeld Jensen
a47cb14680 Detect C standard and try using the most recent
Fixes the default C version used with gcc < 5

Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 13:52:10 +00:00
Oswald Buddenhagen
5cfd5fd9d7 configure: introduce 'subarch' term to expression evaluator
... and make use of it.

it's a logical continuation of the 'arch' term, and will be used also in
qt3d's configure.

Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I940917d6763842499b18fffd1514c96889a0cc63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-22 21:39:36 +00:00
Oswald Buddenhagen
ff1c8baf4a configure: make cached results immediately available
otherwise test de-duplication between modules doesn't work.

Change-Id: I2c6222d853108df223758aa8907dc8d004efd87f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-12-14 18:02:36 +00:00
Oswald Buddenhagen
fd3423bfb8 configure: support discarding selected test results with -recheck
especially during debugging, it is often necessary to re-run only one
(or a few) tests, where -recheck-all would be wasteful.

Task-number: QTBUG-64059
Change-Id: I9410894dec4289ff832d7f75e04f9b60fe76c57c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-12-14 18:02:30 +00:00
Oswald Buddenhagen
8dfcc3b023 configure: reset *_LIBS when *_LIBS_{DEBUG|RELEASE} are specified
it could be somewhat surprising that specifying variant-specific libs
would not clear the common libs, so do that. of course, the default
for the common libs could theoretically contain common deps of the
variant-specific libs, in which case clearing them would be surprising
in turn - luckily, we have no such case.

Change-Id: Ifca08b9e1949c6a0cefed6931ade4021927d7c90
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-30 20:25:14 +00:00
Oswald Buddenhagen
26e9a6a514 configure: make *_LIBS_{DEBUG|RELEASE} always work
... and not only when the source explicitly specifies build variants.

Change-Id: Iac6c8fda8f431d5fb50fada8338d1b660ab040d7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-30 20:25:08 +00:00
Oswald Buddenhagen
79a068c396 configure: fix over-quoting in library exporting
unlike for the other fields, we forgot to eval() the values of the
build-specific library values, leading to over-quoting of values which
require any quoting at all.

amends c0cc50520.

Task-number: QTBUG-62521
Change-Id: I4dfce31040dd09248d3f9dd4294f7fb147c13bdd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-30 20:25:04 +00:00
Oswald Buddenhagen
0fbf78250e configure: fix processing of *_LIBS_{DEBUG|RELEASE}= args
qtConfLibrary_inline() used to set $${1}.builds.$${b}.libs, while
everything else assumed no such .libs suffix. fix the former.

amends 9172143f52.

Task-number: QTBUG-61431
Started-by: Konstantin Ritt <ritt.ks@gmail.com>
Change-Id: I0bd81591c46266d81baa9c12315411183bbc7a63
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-30 20:25:00 +00:00
Thiago Macieira
94c4827a9f configure: Disable warnings in configure tests
No need to log them.

Change-Id: I3868166e5efc45538544fffd14d8c3cc0012ba12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-24 03:47:10 +00:00
Oswald Buddenhagen
4e5af88a8c configure: fix detection of icu in static build
don't complain about library inline sources which have 'builds' but no
'libs'.

Task-number: QTBUG-62150
Change-Id: Ib215d438fc02ebdafde95f31cd48088b1bafc663
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:35 +00:00
Oswald Buddenhagen
ad70f2ed20 configure: simplify construction of QMAKE_CONFIG_CACHE
there doesn't appear to be a reason for the former complexity.
QMAKE_CONFIG_LOG was already assigned the simple way.

Change-Id: I6b7e3b5b97c7647237841fa5e16c4959079edc16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:31 +00:00
Thiago Macieira
f54f7d8470 configure: Add a feature to write tests in the .json file
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>
2017-08-02 16:37:48 +00:00
Oswald Buddenhagen
6f735b6839 configure: factor out $$qtConfScalarOrList()
we'll need it in more places.

Change-Id: Ia7e3d9ea4a27cc01294bde4cafe6721eb9f59343
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:36:22 +00:00
Oswald Buddenhagen
5dab77ba96 build the configure tests in the top-level build dir
there isn't really a point in doing strict shadow builds of them, and
it complicates stand-alone building of sub-projects (because it points
below the build root).

Task-number: QTBUG-58372
Change-Id: Ia3bde3826baac44749b27452fd4aeb9491ecb94e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-12 09:55:39 +00:00
Oswald Buddenhagen
9e04102180 fix library retrieval in pkg-config source, take 2
the entry's libs field is supposed to be a single pre-quoted string.
that implies that the libs and libpaths need to be joined first.

amends 7e298e2f.

Task-number: QTBUG-60925
Change-Id: Id85b2784e3c081b3ff8eb9ee2216976691f8580d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-31 12:57:23 +00:00
Oswald Buddenhagen
961fe0df2e make configure -list-features print the section field
prefix it to the purpose field. this makes the presentation more
consistent with the graphical tool, and avoids the need to be redundant
in the description.

Change-Id: Iea58885637e0518aa1ec2f69ff05090b7e1e77a9
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-08 14:10:43 +00:00
Oswald Buddenhagen
7e298e2f2c don't call pkg-config with --libs-only-L and --libs-only-l at once
the options are mutually exclusive, with the last one winning.

Task-number: QTBUG-60382
Change-Id: Ie6d888ac8be6b22b204fcad93c184477baa38965
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-28 16:08:20 +00:00
Oswald Buddenhagen
3250581aed always clear config.log after all
delaying the logging setup until the cache use is determined (which
depends on xspec determination) causes too much trouble.

as already explained in 7ac15ab0f, there is a bit of a gray area when
exactly the log should be cleared anyway.
a more complete solution would cache the tests' output along with the
results and re-log it (with an appropriate marker) upon re-use.

Task-number: QTBUG-59565
Change-Id: I17d457598d885bceafd6505cad5ff074c4ace502
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-28 16:08:07 +00:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Liang Qi
de49839df8 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	mkspecs/features/moc.prf

Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
2017-02-24 20:01:42 +01:00
Oswald Buddenhagen
b9c5c7139e don't assume that configure --foo options' value is 'yes'
otherwise, the invalid "--qpa xcb" would complain about "xcb" being
unknown, rather than "--qpa" missing an argument.

actual booleans are handled by the type-specific callback, just like
-foo would be.

Task-number: QTBUG-59062
Change-Id: I96632dacfb721cfcbf223b76f6c5c38c810e8d0e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-24 16:39:58 +00:00
Oswald Buddenhagen
611b7c9ce7 de-duplicate and simplify condition checking in qtConfProcessOneOutput()
amends 90eee08b3.

Change-Id: If1fa2b14d758cc252d9a2ec3f9deedd1dd200c5e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-24 16:39:40 +00:00
Oswald Buddenhagen
421bbefb9d configure: fix 'use' for detecting static libraries
these statements are assumed to provide dependencies for the currently
detected library. this implies that their resolved content must be
passed to the linker after the to be detected static library.

Change-Id: Ifaaee2ac71bf176e8a0033765fb979fe119deaba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:47:02 +00:00
Oswald Buddenhagen
fcf0aee044 configure: make it possible to make 'use' conditional
Change-Id: I8390634c5b23bf34692b4f532ab00a7aba690037
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:59 +00:00
Oswald Buddenhagen
52b260fb0f configure: support using libraries by their exported name
Change-Id: Ibe43c587e83e679baa5f0fc91f452ee06c1e293f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:55 +00:00
Oswald Buddenhagen
8ccb46d80e configure: fix cross-module library uses
this went unnoticed, because the only cross-module 'use' so far is that
of egl, for which the code path provided for modular builds happens to
(mostly) work due to the specs already providing the library definition.

amends cc842ca4.

Change-Id: I58c638d896eabd26f27d5cd90e3a7f8eeece9bc0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:50 +00:00
Oswald Buddenhagen
2408166f5a clash-check configure sub-config names
we derive the keys from the last fragment of the parent directory, which
is potentially not globally unique.

Change-Id: I57cf13394984e6e3d902c0f1bb495bd3920bfc75
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:45 +00:00
Oswald Buddenhagen
0f16ac3d64 configure: propagate errors from libraries' transitive dependencies
if a library uses another library which happens to be absent, then the
former must also fail.

amends cc842ca4.

Change-Id: I91f157a6d1ed40b66e196340a282ebe493fcf40e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:39 +00:00
Oswald Buddenhagen
632b1c1345 configure: error out on activating conflicting libraries
Change-Id: I5d7dbeb3b3a653f7151279c7eba9387c107f9c42
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:35 +00:00
Oswald Buddenhagen
59a3abd1f1 configure: generalize command line overrides of library parameters
the outdated ones remain for backwards compatibility; some remain
unchanged.

Task-number: QTBUG-30083
Change-Id: Ia596b854d26b00fcb4f48df0da7ad893650ac1c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:25 +00:00
Oswald Buddenhagen
5f20954291 add configure -list-libraries
currently mostly for debugging purposes (especially with -verbose).

Change-Id: I8af32c61df0b19861aa79bc4bbdd3f6095dbe9b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:11 +00:00
Oswald Buddenhagen
7509ccc0f7 add configure -list-features
also actually deletes qfeatures.txt, which was already claimed by
a668c6a6, but not actually done.

Task-number: QTBUG-58411
Change-Id: I686760632fee7c10b01bd2e83f2481b01bc2b774
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:05 +00:00
Oswald Buddenhagen
4f2a571f09 fix usage of "empty" libraries
a header-only library in a default location would produce no variables
at all, making it appear undefined. fix this by forcing the writeout of
the QMAKE_LIBS_* variable, and use its definedness (rather than
non-emptiness) as a signifier.

this works for both QMAKE_USE and configure tests'/libraries' 'use'
entries.

Change-Id: Id7a1e23725caba1a91ea4db448b4aeb7fe632393
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:52 +00:00
Oswald Buddenhagen
980daa49b2 prefer library's export name when looking up input variables
if multiple library entries provide the same export (as openssl is going
to), it makes sense to make them recognize the same input variables, as
it would be rather counterproductive to require different configure
arguments for each.

Change-Id: Ia32842e95294296d50220297f85689bc92de2d05
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:46 +00:00
Oswald Buddenhagen
4a93adba60 configure: refactor qtConfExportLibrary()'s interface
pass the library name instead of a library source object.
improves overall legibility at a marginal runtime cost.

Change-Id: I248ee9622af2b2c37daa2dbc0cc0bca5701d7925
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:42 +00:00
Liang Qi
27432d40f2 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
2017-02-14 11:33:02 +01:00
Oswald Buddenhagen
9e579f64d7 don't litter configure test build dirs with .qmake.cache files
there should be only one, at the level of the isolating .qmake.conf.

Change-Id: I25f05864d6f5c1bb5caf2fb4138adb4bb9cc2f22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-08 23:39:36 +00:00
Liang Qi
dd756011da Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	configure.json
	mkspecs/win32-icc/qmake.conf

Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
2017-02-08 15:49:18 +01:00
Oswald Buddenhagen
2982d327f7 adjust configure to native build optimizations
don't fail to set up cross_compile early enough. otherwise, we'd
populate the cache for target builds with data for the host.

amends 6b8666c7 and 5060740f.

conversely, pass on extra flags to configure tests when not cross
building.

amends d8be8110 (and 2c5eb3e6).

Task-number: QTBUG-58556
Change-Id: I531d71e06204a0b17ae6dabf017a52e0f2efd9a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-06 16:34:22 +00:00
Liang Qi
246799d8a7 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	examples/network/network-chat/peermanager.cpp
	src/widgets/util/qsystemtrayicon.cpp
	src/widgets/util/qsystemtrayicon_qpa.cpp
	src/widgets/util/qsystemtrayicon_win.cpp
	src/widgets/util/qsystemtrayicon_x11.cpp

Change-Id: I1c026df83818c0ccaf956980370e7522960627db
2017-01-30 12:46:20 +01:00
Liang Qi
318b58562a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/common/msvc-version.conf
	mkspecs/common/winrt_winphone/qmake.conf
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/qt.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/winrt/default_pre.prf
	mkspecs/winphone-arm-msvc2013/qmake.conf
	mkspecs/winphone-x86-msvc2013/qmake.conf
	mkspecs/winrt-arm-msvc2013/qmake.conf
	mkspecs/winrt-x64-msvc2013/qmake.conf
	mkspecs/winrt-x86-msvc2013/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/network/kernel/qhostaddress.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.h
	src/widgets/util/qsystemtrayicon.cpp
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
	tools/configure/Makefile.mingw
	tools/configure/Makefile.win32

Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
2017-01-25 20:06:06 +01:00
Alexandru Croitor
91e5c7e1da Inform user that a non-prefix build can't be used on other machines
This implies that using tools like windeployqt and macdeployqt will not
generate a working standalone application.

Change-Id: I002cf6e527e479ccbee2f18df8766648196d6232
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-24 13:11:05 +00:00
Oswald Buddenhagen
9c05ccb6bc put some empty lines between configure runs into config.log
Change-Id: I6c3e3b139752bb9d1b60c590bb1ea72ae2e4fbdf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:47:49 +00:00
Oswald Buddenhagen
068fca3cec log configure command line to config.log
that makes the log file mostly self-contained.

for code re-use, the qtSystemQuote() function was factored out.

Change-Id: Ie3469518ba384131b69f5f15c577240e2674d507
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:47:44 +00:00
Oswald Buddenhagen
f2e39c4a15 inline "committing" of configure command line built-ins
the options may need to take effect before the regular test processing
commences (which is actually going to be the case in the next commit).
the indirection via the callback only obfuscated the code anyway.

Change-Id: I5307b0be15cf4cc2c2db391ce5b5a93f81076b5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:47:38 +00:00
Oswald Buddenhagen
342691b802 fix configure --opt=val syntax
the second dash would end up in the option name, which made it obviously
unrecognizable.
but the second dash isn't optional in the first place (as evidenced one
line up), so remove the question marks.

Task-number: QTBUG-57908
Change-Id: I6622fef7d11d7b3c485f16698349d1912037a41e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:56 +00:00
Oswald Buddenhagen
696c3f9af8 complain about various invalid configuration attempts
Task-number: QTBUG-56049
Change-Id: Id5eeb014c2b88195d2d14566a62dcb9185206b37
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:10 +00:00