Reduce warnings from buildpaths QA test (contains reference to TMPDIR)
by removing QMAKE_PRL_BUILD_DIR from prl files.
Change-Id: I1a5fbac82c4a026b6ba41db3b0cca6a9fbf1e31a
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 8fb6c082d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The default flags in TARGET_CFLAGS contain '-g' which matches
better to RELWITHDEBINFO build type than RELEASE. Don't define
any build type flags in the toolchain as CMake provides good
default values for each build type.
Change-Id: I6493597f6becf774893386df952c72ab4f66ead2
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 6672e84e6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Building Qt modules uses extra CMake instructions that try to be clever
about which CMAKE_PREFIX_PATH to use. With SDK, these instructions end
up using the SDK host paths in the device instead of the actual device
paths. Add CMake option to prevent Qt from changing the default prefix.
Fixes: QTBUG-103577
Change-Id: Ia933c843d811e6adb2ed4ede4708f55a6f0e8f0c
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit ec7e50bbaf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt configure has lowered its verbose when not using developer-build.
Increase the verbose level to have the configure summary of the
Qt module back into the logs.
Change-Id: If742b68353fe6f0614bf4be8f355cfc24f9a42f3
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 312d7185d8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Prepend PATH env with the path to the bin directory in the cmake
toolchain file. This let's CMake to find CMAKE_MAKE_PROGRAM (make or
ninja) without need to specify it explicitly when using the qt-cmake*
helper scripts.
Change-Id: Ic7ce057421395d98158b3ad6e529f30b629bdded
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit eaee55e9fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake and Ninja combination does not support changing RPATH on Windows hosts,
even when cross-compiling. Add CMake configuration to workaround this.
Change-Id: I5d82c0a7f91cf81a0b3ed7c0f14aeccc36464f91
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 554b947ba4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Generate Conan profiles that can then be used with the SDK.
Task in qtbase generates profile that has all the architecture bits
and configure arguments in place. The profile added in the SDK phase
lets Conan recipes know how to use the SDK with the QT_CONFIGURE_MODULE
environment variable.
Change-Id: I33a9b0f3915417d98ad12559ce7661c92b1cc739
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit a64c978983)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
MinGW toolchain doesn't perform relocation during installation,
so all the absolute path point to the temporary sdk paths.
Use the location of the toolchain file to get the absolute
paths at runtime instead instead of using external SDKPATH
env for it.
Change-Id: I699b2178baf5cc855a57186056341b6c6eefbbf5
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
(cherry picked from commit 0ef2348d49)
The default OEToolchainConfig.cmake uses environment variables
to set all the cmake variables in place. The Qt6Toolchain.cmake
chainloaded the same toolchain file after setting everything to env.
Rewrite the Qt6Toolchain.cmake now to set all the cmake variables
directly without using environment variables or chainloading
the origin OEToolchainConfig.cmake.
This allow better integration to QtCreator that might be used
to modify the compiler flags for projects.
Change-Id: I7c7c42ec17c86f53b62ed557d9b61d5d19abc1e0
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 5cbac6cf35)
Additional check was added into the bb.fetcher that needs to be
workaround in srcrev_update task. Otherwise task will fail with
error:
Exception: bb.fetch2.FetchError: Fetcher failure: Recipe uses a
floating tag/branch without a fixed SRCREV yet doesn't call
bb.fetch2.get_srcrev() (use SRCPV in PV for OE).
Change-Id: Ib3c2665257c344c312074519a03d96437866cd8d
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 6492c16955)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Paths in mingw toolchain are not relocated when installed, so we
need to use relative path for the Qt6Toolchain.cmake file.
Fixes: QTBUG-100642
Change-Id: I48542f20f4443c8130f89c2436f5b0ecea914bb0
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit e78c281c0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Static build needs pkgconfig for every Qt module. Include it already
in qt6-cmake class instead of in each individual module.
Change-Id: I065382ee49d6b40b76ede9e632d17221451de8d1
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit cbac31ee90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qt-cmake* helper build scripts by default use Qt's generated
qt.toolchain.cmake as the CMAKE_TOOLCHAIN_FILE. Keep this behavior and
patch qt.toolchain.cmake so that will chain-load our Qt6Toolchain.cmake.
qt.toolchain.cmake includes bits that are needed for the conan
integration to work correctly with the sdk.
Change-Id: I89a5e152324178151ba8a5ab4734d542fa4c995c
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 7f3cb3884d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The bindir and libexecdir can be set to a different directory. Since
qmake and tools were searched for in the normal native staging bindir
and libexec dir, they would not be found. So use the OE_QMAKE version
of them instead.
Change-Id: I834bded248a79a6f0d18c6a32b4230f44ddf6a64
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
(cherry picked from commit af73962f3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtBase has several helper scripts available that can be used
to build other modules and tests. Patch those so they work
properly from the sdk.
Fixes: QTBUG-93342
Change-Id: If393d1a0abdebe21a70439190e49715bcd3e35a1
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit 7297b1bee8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since commit 212ae9b ("Use bindir for tools on Windows SDK) qt.conf is
now created in the WORKDIR and is still present when rebuilding the SDK.
Since all lines are appended to the file it will continuesly increase.
So write the first line to the file instead of appending it.
Pick-to: 6.2
Change-Id: I52d4cb91630884a1ecdc1e6b225fda4cf39d852b
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
If QT6_INSTALL_BINDIR is set to a different value than bindir, the compiler
cannot be found, since it is typically installed in bindir. So point to
bindir by default instead.
Pick-to: 6.2
Change-Id: I3bb94c2daf97f1b2500560fdcc4304cba9699ab5
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING triggered qtbase-native
to try to find tools from QT_HOST_PATH, which obviously
doesn't exists yet. Use it only for target and nativesdk
builds.
Fixes compilation failure:
| -- Searching for tool 'Qt6::moc' in package Qt6CoreTools.
| CMake Error at cmake/QtToolHelpers.cmake:122 (message):
| Neither QT_HOST_PATH_CMAKE_DIR nor Qt6HostInfo_DIR} available.
Pick-to: 6.2
Change-Id: I260526c08f48f179049eb4b0ab3e6561958d0a53
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Move all the module SRCREV into qt6-git.inc file using the same format,
where repository name is used for the postfix. Changes to the module SRCREVs
are mostly done by updating all the modules at once, usually either with
a separate update script, srcrev_update bbclass or by external update bot.
This change should make the update process more easily automated.
Update the srcrev_update bbclass to handle updates in qt6-git.inc in addition
to recipe files, with and without the repository name postfix.
Pick-to: 6.2
Change-Id: I711e7867dba3b066d363ca40f78e7b4aa740a69c
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
This is the result of automated script (0.9.1) conversion:
oe-core/scripts/contrib/convert-overrides.py .
converting the metadata to use ":" as the override character instead of "_".
Task-number: QTBUG-95705
Change-Id: Ieb57084e2cea47eb3407960ebfce404cee1ddc36
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Change the absolute host paths in qt.conf to relative. This allows
SDK to work in Windows without need to patch the paths.
Pick-to: 6.2 6.1
Change-Id: I0a3f6e793b033d727f7633c022b27392acc91823
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
QT_HOST_PREFIX should point to the root of the host sysroot.
Pick-to: 6.1
Change-Id: I7bb02df58da432ef70dba47f5e5866948f121c53
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Add needed envs to the default toolchain file used when
the setup-environment-* script have not been used.
Fixes: QTBUG-93896
Pick-to: 6.1
Change-Id: I5dc1773152b87f0c11434643de75386ddd999f72
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
Build tests for ptest in Qt modules. The default build using
PACKAGECONFIG[tests] doesn't work as the installation of tests is
not working correctly. Instead build the tests separately after
the module has been built and installed.
The tests have dependencies to the data and source files which
need to be packaged with the test binaries.
Change-Id: Ibae55a29135267ce96949aa0c15ad7e236ef2512
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Move all the builttime tools back to bindir when building a Windows
SDK. This saves us from adding mingw libraries to the libexec dir
needed by the tools.
Fixes: QTBUG-91895
Pick-to: 6.1
Change-Id: I4da0f03190e3862e93c49fbd267baf567bf7a5d5
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Some of the tools have been moved to libexec dir and need to have
the qt.conf available there as well. Amend also commit
381dcb985d so that qt.conf in the SDK
contains the path for the host libexecdir.
Task-number: QTBUG-91756
Pick-to: 6.1
Change-Id: Id76b603d1107dd70c63be7682007e4c34621750a
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
QMake has new config path for QT_HOST_LIBEXECS that's used for
tools moved from bin to libexec dir.
Change-Id: I7b8ea8c137ce93ff9d9f583eb8e333ab6b16c0bf
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Amend 438c538fd285b33406633574f65dd5045baf8134 with QMAKE_AR_LTCG which
is needed when using LTCG configure option. Cleanup unused variables:
QMAKE_NM has never been used and QMAKE_CFLAGS_ISYSTEM is no longer used.
Pick-to: 6.0
Change-Id: Icdb9ba48f867ff30066d8fda0c223cc3b2be2c2d
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Needed to use the correct cross-compiler tools for objcopy and nm.
Fixes: QTBUG-90256
Pick-to: 6.0
Change-Id: I38048033b17d388b86612bc7205c4e22d948be29
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
The bbclass can be used to temporarily disable build of a broken
Qt module recipe without breaking the CI, packagegroup or toolchain
builds that include it.
Change-Id: I3a3e4b72350521b16f1c4fe50f423146ad86515d
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
By default qt-cmake contains paths to the build time locations.
Overwrite it so that it's usable from the SDK. Set toolchain file
to Qt6Toolchain.cmake making it work without need to source the
environment-setup script.
Change-Id: I157c0ad3cdb814438be03028a0e045abb85bf058
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Native build cannot use QT_HOST_PATH as it doens't exists yet.
Change-Id: I4ca81b15b13e1fe422f04b334eeab058e7db0c9d
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Set default install prefix to match the Qt's prefix path. This makes
deployment on Windows work as otherwise the default path would be some
Windows path instead of target path in the device.
Use CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT same as cmake so that
projects can still set their default path if not forced from command line.
Change-Id: If2d703a3f46abaeaa015df4e9385313498ec9d17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add support for building nativesdk components with meta-mingw layer
for Windows SDK. Skip some of the nativesdk tools as they cannot be built.
Qt6Toolchain.cmake can be used with SDKPATH environment variable set
to the SDK installation path using forward slashes as path separators.
It depends on the nativesdk-cmake which cannot be built until upstream
patches to meta-mingw are approved.
Task-number: QTBUG-86431
Change-Id: I482f85f10461e77bb183cf763d6ef531b45e016a
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
The class can be used for updating the SRCREVs in the recipes
to the latest revision available. It's inherited by default in
all the Qt module recipes. The update can be done for all recipes
with command
bitbake world -c srcrev_update
The default options are used when the setup-environment script
is not used. This is useful when running qmake builds from
Qt Creator
Task-number: QTBUG-84228
Generate new toolchain file that allows using Qt from the SDK
without sourcing the setup-environment script. This is particularly
useful for integrating the SDK with QtCreator.
Remove qt-cmake and the related qt.toolchain.cmake as they do not
work correctly when used with OE.