Amend 769d4acc80 and calculate all host
paths correctly. This removes use of OE_QMAKE_PATH_EXTERNAL_HOST_BINS
which has never been part of Qt6, instead using OE_QMAKE_PATH_HOST_BINS.
Also remove generation of target qt.conf and the effective qt.conf paths
that are no longer required.
Fixes: QTBUG-140631
Pick-to: 6.10 6.9 6.8
Change-Id: Ie4eb25d60a93c476fdd1ffefe4e90fad50e91127
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
The OE_QMAKE_PATH_EXTERNAL_HOST_BINS is used for native host tools,
such as qmake, and it was working only for target builds. Calculate
correct path for native and nativesdk builds as well, taking into
account case where additional subdirectory is added to QT6_INSTALL_BINDIR.
Fixes: QTBUG-140631
Pick-to: 6.10 6.9 6.8
Change-Id: Ic8f36a64a6a43b0a073586a90ecf832482727dad
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Bitbake drop multiple branch/revision support for single git urls
in walnascar release. Add support to srcrev_update bbclass to
work on both versions of scm.
Pick-to: 6.9 6.8
Change-Id: Ic72a508aa1e52a25a6b392930479421743cbbdf5
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Qml2ImportsPath is deprecated config and QmlImportsPath should
be used instead. This fixes qmake crash on aarch64 linux when
using GCC 14.
Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-132288
Change-Id: I683ae7755b0b8ac496eeb8017c1c0d059b2fe011
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
By default, the example sources are not exported with the binary,
as was the case in qt5 times. Add options to enable the export
using variable QT_INSTALL_EXAMPLES_SOURCES = "ON".
Pick-to: 6.8
Change-Id: Ieedb65034264086b84d4df541480cbb02ecb82f2
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
Some of the Qt modules have static libraries that need to be present
in the SDK for it work correctly. Use SDKIMAGE_FEATURES to include
staticdev packages to the SDK.
Fixes: QTBUG-130442
Pick-to: 6.8 6.5
Change-Id: I043e3ab02df212f6fdc656ae3dd542dd7a824fd9
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Qt now produces SBOM (Software Bill of Material) files, include
those in the -dev packages.
The file cointains references to buildpaths, get rid of those
until fixed upstream.
Pick-to: 6.8
Change-Id: Ibe2972649db74925aab3fbe0307fd679e1ea53bf
Reviewed-by: Alex Bu <alex.bu@qt.io>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Qmake files still have references to build time paths
that cannot be mapped to any real runtime path.
Task-number: QTBUG-105913
Pick-to: 6.8
Change-Id: I047a21204e2154cbf36c8417ae0e2e63be45564f
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Add variable to find base dir for meta-qt6 and use that in
srcrev-update to support using it in any recipe.
Pick-to: 6.7 6.6
Change-Id: I91960508a8ec96ee6fe7af69046915f048925f62
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
oe-core renamed its internal variable, set both old and new variable
to work with old and new versions of oe-core.
Pick-to: 6.5
Change-Id: I90293c6d37c3ca5d5d82d67e1269afa2b12f1d89
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Keep the SECURITY_CFLAGS set by Yocto builds also in the SKD's
CMake toolchain file. Instead remove only the fortify flags,
since they add unnecessary warnings when doing debug builds
with Qt Creator.
Pick-to: 6.5 6.4 6.2
Change-Id: Ia01f92f21c4f68b1be0d57f9a586a34acbe2333c
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Add support for using qmake directly from Yocto build sysroots
with following workflow:
bitbake meta-ide-support
bitbake build-sysroots
. ./tmp/deploy/images/qemuarm64/environment-setup-cortexa57-poky-linux
qmake & make
Use configurable sysroot paths in populate_qt6_sdk_base so that it can
be reused also for yocto build sysroots.
Fixes: QTBUG-108778
Pick-to: 6.5 6.4 6.2
Change-Id: Iee48f75edbc62e5adcca318a9f4cf17b7477f4a0
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
The qmake mkspec additions are used with the sdk when the toolchain
environment-setup script hasn't been run. Instead of adding those in
the sdk creation phase, do it already in the qtbase recipe.
Change the mkspec also so that CC/CXX has only the compiler executable,
but none of the compile flags that usually are there in Yocto builds.
This keeps Qt Creator happier as well.
Pick-to: 6.5 6.4 6.2
Task-number: QTCREATORBUG-27372
Change-Id: If27d595965df59ff9846f4c773469889a8480040
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Latest harfbuzz 6.0.0 has bad cmake config that uses absolute paths,
which breaks static builds for Qt. Add workaroud that causes Qt
to use pkg-config to find correct paths for libs and includes.
From qtshadertools build:
ninja: error: '/usr/lib/libharfbuzz.so.0.60000.0', needed by
'lib/libQt6ShaderTools.a', missing and no known rule to make it
Pick-to: 6.5 6.4
Change-Id: I9f8bca0d4b9648e58c008e4064ff4f7b88f5f4f0
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Compile time tools are not generally needed on the target.
Don't force them by default, but make it possible to enable
them with QT_FORCE_BUILD_TOOLS = "ON".
Task-number: QTBUG-99702
Change-Id: If2d3ce9252213b28cc06efe0e9c5cfd57db81371
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Add new class that can be used to create toolchain containing
all available Qt modules.
Pick-to: 6.4 6.2
Change-Id: I84982749ea9093bbbd20f99391b063c4bcaee39f
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
QtQuick3D's shadergen uses cache from user's home directory.
Disable the caching as it can lead to problems with pseudo.
Change-Id: I6b889fe94eb218d803ece49c9e0ca4ec18c3524a
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reduce warnings from buildpaths QA test (contains reference to TMPDIR)
by removing QMAKE_PRL_BUILD_DIR from prl files.
Pick-to: 6.4 6.3 6.2
Change-Id: I1a5fbac82c4a026b6ba41db3b0cca6a9fbf1e31a
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
After qtbase change 0f8017efb6d037c4f33f947eb3c56aeafa28313c, QT_HOST_PATH
is no longer set in qt.toolchain.cmake, but it was moved to Qt6 package
cmake files. Since the package is in target sysroot, we can no longer use
its location to determine the absolute path of the host sysroot. Instead,
resolve QT_HOST_PATH now in the CMake subscripts and use them also without
the environment-setup script from Qt6Toolchain.cmake.
Change-Id: I81d908321c0d05ab589b9340a62a45800e936252
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit 0b55d8ec94)
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.
Pick-to: 6.4 6.3 6.2
Change-Id: I6493597f6becf774893386df952c72ab4f66ead2
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
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
Pick-to: 6.3 6.2
Change-Id: Ia933c843d811e6adb2ed4ede4708f55a6f0e8f0c
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING is deprecated in favor of
QT_FORCE_BUILD_TOOLS.
Change-Id: Ibd644adabe9cdd8bd39179c38974d953ce34e5a4
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
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.
Pick-to: 6.3 6.2
Change-Id: If742b68353fe6f0614bf4be8f355cfc24f9a42f3
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
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.
Pick-to: 6.3 6.2
Change-Id: Ic7ce057421395d98158b3ad6e529f30b629bdded
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
CMake and Ninja combination does not support changing RPATH on Windows hosts,
even when cross-compiling. Add CMake configuration to workaround this.
Pick-to: 6.3 6.2
Change-Id: I5d82c0a7f91cf81a0b3ed7c0f14aeccc36464f91
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
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.
Pick-to: 6.3 6.2
Change-Id: I33a9b0f3915417d98ad12559ce7661c92b1cc739
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
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).
Pick-to: 6.3 6.2
Change-Id: Ib3c2665257c344c312074519a03d96437866cd8d
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
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>
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>
Paths in mingw toolchain are not relocated when installed, so we
need to use relative path for the Qt6Toolchain.cmake file.
Fixes: QTBUG-100642
Pick-to: 6.3 6.2
Change-Id: I48542f20f4443c8130f89c2436f5b0ecea914bb0
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Static build needs pkgconfig for every Qt module. Include it already
in qt6-cmake class instead of in each individual module.
Pick-to: 6.3 6.2
Change-Id: I065382ee49d6b40b76ede9e632d17221451de8d1
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
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.
Pick-to: 6.3 6.2
Change-Id: I89a5e152324178151ba8a5ab4734d542fa4c995c
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
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
Pick-to: 6.2 6.3
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
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
Pick-to: 6.3 6.2
Change-Id: If393d1a0abdebe21a70439190e49715bcd3e35a1
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
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>