Commit Graph

39 Commits

Author SHA1 Message Date
Jeroen Hofstee
6b7208cedd sdk: don't append the first line to qt.conf
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>
2021-12-08 07:07:30 +01:00
Jeroen Hofstee
002b2ce29f sdk: fix compiler location for QT6_INSTALL_BINDIR != bindir
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>
2021-12-07 06:44:13 +00:00
Samuli Piippo
3bb76773a8 qtbase-native: don't try to find tools
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>
2021-11-08 05:20:06 +02:00
Samuli Piippo
f61b87ae78 Move all Qt module SRCREVs into one file
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>
2021-09-15 07:53:53 +03:00
Samuli Piippo
7e83f2fc76 Convert to new override syntax
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>
2021-08-24 14:37:21 +03:00
Samuli Piippo
7ac9c84014 sdk: use relative paths in qt.conf
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>
2021-06-28 15:27:36 +03:00
Samuli Piippo
f850278548 qmake: use correct host prefix
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>
2021-05-25 22:38:17 +03:00
Samuli Piippo
22f55689b5 sdk: use pkg-config from the sdk
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>
2021-05-25 22:38:07 +03:00
Samuli Piippo
7ec2742246 Enable ptest support for Qt modules
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>
2021-05-12 08:03:07 +03:00
Samuli Piippo
212ae9b201 Use bindir for tools on Windows SDK
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>
2021-03-18 14:45:31 +02:00
Samuli Piippo
f55ee894d0 sdk: copy qt.conf to libexec dir
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>
2021-03-16 09:56:33 +02:00
Samuli Piippo
381dcb985d qt6: add support for QT_HOST_LIBEXECS
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>
2021-03-10 09:31:09 +02:00
Samuli Piippo
21c1abd75b Add QMAKE_AR_LTCG
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>
2021-01-20 15:17:55 +02:00
Samuli Piippo
ac8056ef0e Add QMAKE_OBJCOPY and QMAKE_NM to mkspec
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>
2021-01-18 09:44:52 +02:00
Samuli Piippo
9bd853d4fe Add bbclass for disabling unsupported modules
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>
2020-11-16 22:04:43 +02:00
Samuli Piippo
07cc8b02a0 sdk: make qt-cmake usable from the sdk
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>
2020-10-16 10:14:02 +03:00
Samuli Piippo
e400d8ff3c Use QT_HOST_PATH only with target and nativesdk builds
Native build cannot use QT_HOST_PATH as it doens't exists yet.

Change-Id: I4ca81b15b13e1fe422f04b334eeab058e7db0c9d
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
2020-09-30 14:46:46 +03:00
Samuli Piippo
9e69b0f3b0 sdk: set default install prefix
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>
2020-09-24 10:35:44 +00:00
Samuli Piippo
08d101c2eb Add support for mingw32 build
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>
2020-09-22 04:31:51 +00:00
Samuli Piippo
69b4e15f1c sdk: tell qmake to sysrootify all paths
Qmake is no longer using sysroot by default, add config in qt.conf
to make it happen when using from nativesdk.
2020-08-25 10:05:30 +03:00
Samuli Piippo
0a7a810787 Add class for updating SRCREVs
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
2020-06-29 10:03:09 +03:00
Samuli Piippo
c8b6dfd5e7 Use qt.conf to sysrootify the qmake builds
Instead of patching the qtbase sources, use the qt.conf to override
the sysrootify option for qmake.
2020-06-23 10:43:29 +03:00
Samuli Piippo
6b57024c9a qmake: patch prl and pri files
Replace host paths with qmake built-in properties
2020-06-09 15:00:59 +03:00
Samuli Piippo
a6f0dd9305 Update modules
Remove merged patches and remove unneeded patching from qtbase.
2020-05-25 08:37:02 +03:00
Samuli Piippo
15d42fc22c Remove obsolete install fix for qmake builds
With recipe-sysroot now used, the concurrent installation
cannot occur and the install fix is not needed.
2020-05-19 09:48:58 +03:00
Samuli Piippo
b3107df602 Add default qmake configration to work from SDK
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
2020-05-18 12:18:10 +03:00
Samuli Piippo
b00138a4d5 cmake: add compiler to the PATH
Compiler needs to be in PATH to be found by CMake.
2020-05-18 08:45:54 +03:00
Samuli Piippo
313d317a42 Add missing quotes 2020-05-18 08:45:26 +03:00
Samuli Piippo
33593d668e Support qmake from SDK
Add correct paths to the qt.conf file for the SDK. Remove unneeded
qtbase patch and patching of the pri/prf files.
2020-05-14 17:26:48 +03:00
Samuli Piippo
90925c5d16 Create cmake toolchain file for Qt
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.
2020-05-14 13:06:23 +03:00
Samuli Piippo
4ef5a29445 Add support for building toolchain
A WIP patch that supports cross-compiling tools needed for the
nativesdk. Patching needed for the cmake files to work in
the relocated sdk.
2020-04-28 17:38:43 +03:00
Samuli Piippo
c83312d402 Use syncqt from libexecs
syncqt is moved to libexec, but prf files still try to find it from bins.
2020-04-07 17:26:38 +03:00
Samuli Piippo
85b084989a add class for sdk population
... to create qt.conf
2020-03-25 14:34:47 +02:00
Samuli Piippo
fe753369b5 add dependency to perl 2020-03-25 12:34:35 +02:00
Samuli Piippo
2f4aa0aff4 qmake: don't use recursive by default 2020-03-20 08:45:35 +02:00
Samuli Piippo
bcb8c13a7f Add support for qmake 2020-02-17 17:21:03 +02:00
Samuli Piippo
250391d3a4 Use INSTALL_MKSPECSDIR 2020-02-13 09:26:07 +02:00
Samuli Piippo
92e625526b Fix install paths 2020-01-29 09:57:48 +02:00
Samuli Piippo
7d63e448b7 initial commit 2020-01-24 11:54:52 +02:00