diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2020-09-21 11:10:08 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2020-09-24 20:40:50 +0300 |
commit | 90ecb62cd57795e571c9b5bae64d967544644245 (patch) | |
tree | 47d6077a5c6dcb57c9fe179fa1c87e9d98bc00b1 | |
parent | d0f9ca7437a183eb5450a21ec908d13144794939 (diff) |
Add support for mingw nativesdk
Support for building nativesdk for Windows. Remove existing mingw
configurations that are no longer needed and add new ones, some of
which are being upstreamed to meta-mingw.
No longer patch gcc sources, but change the SDK_VENDOR to make cmake
compile correctly. Include ninja to the SDK as that's the default make
tool now with cmake and Qt Creator.
Enable CI build test for the mingw toolchain.
Use more recent poky that fixes cmake issues and latest meta-qt6
for the mingw support.
Task-number: QTBUG-86431
Change-Id: Ica4f810ad2cd46ae42fa3f5dccd8bbe149c73a1f
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
12 files changed, 24 insertions, 137 deletions
diff --git a/coin/module_config.yaml b/coin/module_config.yaml index 3538f6a9..47821027 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -72,6 +72,7 @@ build_instructions: export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR" export SSTATE_DIR=/mnt/yocto-cache/sstate-caches/$(sed -n -e "s/DISTRO_CODENAME.*\"\(.*\)\"/\1/p" ../sources/poky/meta-*/conf/distro/poky.conf) bitbake meta-b2qt-embedded-qbsp + SDKMACHINE=x86_64-mingw32 bitbake meta-b2qt-embedded-qbsp sudo umount /mnt/yocto-cache filename: "{{.BuildDir}}/start-build" diff --git a/meta-boot2qt-distro/conf/conf-notes.txt b/meta-boot2qt-distro/conf/conf-notes.txt index d543ab7b..62342ebc 100644 --- a/meta-boot2qt-distro/conf/conf-notes.txt +++ b/meta-boot2qt-distro/conf/conf-notes.txt @@ -11,7 +11,7 @@ QBSP target is: meta-b2qt-embedded-qbsp For creating toolchain or QBSP for Windows, set environment variable before running bitbake: - SDKMACHINE=i686-mingw32 + SDKMACHINE=x86_64-mingw32 For more information about Boot to Qt, see https://doc.qt.io/QtForDeviceCreation/ diff --git a/meta-boot2qt-distro/conf/distro/b2qt.conf b/meta-boot2qt-distro/conf/distro/b2qt.conf index 17c9abad..8307da6d 100644 --- a/meta-boot2qt-distro/conf/distro/b2qt.conf +++ b/meta-boot2qt-distro/conf/distro/b2qt.conf @@ -33,6 +33,9 @@ DISTRO = "b2qt" DISTRO_NAME = "Boot to Qt for Embedded Linux" SDK_VERSION := "${DISTRO_VERSION}" +SDK_VENDOR_mingw32 = "-w64" +SDK_VENDOR_sdkmingw32 = "-w64" + SDK_MACHINE = "${@d.getVar('SDKMACHINE') or '${SDK_ARCH}'}" SDK_NAME = "${DISTRO}-${SDK_MACHINE}-${IMAGE_BASENAME}" TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-${MACHINE}" @@ -56,10 +59,6 @@ INIT_MANAGER = "systemd" PREFERRED_PROVIDER_jpeg ?= "libjpeg-turbo" PREFERRED_PROVIDER_jpeg-native ?= "libjpeg-turbo-native" -# Override mkspec for mingw build -OE_QMAKE_PLATFORM_NATIVE_mingw32 = "win32-g++-oe" -OE_QMAKE_PLATFORM_mingw32 = "win32-g++-oe" - # Default to commercially licensed Qt QT_EDITION = "commercial" diff --git a/meta-boot2qt-distro/recipes-core/packagegroups/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb b/meta-boot2qt-distro/recipes-core/packagegroups/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb index ba3be58e..64fa1660 100644 --- a/meta-boot2qt-distro/recipes-core/packagegroups/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb +++ b/meta-boot2qt-distro/recipes-core/packagegroups/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb @@ -35,28 +35,20 @@ inherit nativesdk packagegroup MACHINE_EXTRA_INSTALL_SDK_HOST ?= "" -python __anonymous() { - overrides = d.getVar("OVERRIDES").split(":") - if "mingw32" not in overrides: - d.appendVar("OVERRIDES", ":linux") -} - RDEPENDS_${PN} = "\ - nativesdk-gperf \ + ${MACHINE_EXTRA_INSTALL_SDK_HOST} \ nativesdk-cmake \ + nativesdk-gperf \ nativesdk-make \ - ${MACHINE_EXTRA_INSTALL_SDK_HOST} \ - " - -RDEPENDS_${PN}_append_linux = "\ + nativesdk-ninja \ + nativesdk-perl-modules \ nativesdk-python3-modules \ nativesdk-python3-misc \ - nativesdk-perl-modules \ ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "nativesdk-wayland-dev", "", d)} \ " -RDEPENDS_${PN}_append_mingw32 = "\ - nativesdk-make \ - nativesdk-libgcc \ - nativesdk-libstdc++ \ +RDEPENDS_${PN}_remove_mingw32 = "\ + nativesdk-python3-modules \ + nativesdk-python3-misc \ + nativesdk-perl-modules \ " diff --git a/meta-boot2qt-distro/recipes-devtools/gcc/gcc-source_%.bbappend b/meta-boot2qt-distro/recipes-devtools/gcc/gcc-source_%.bbappend deleted file mode 100644 index b8f8b23d..00000000 --- a/meta-boot2qt-distro/recipes-devtools/gcc/gcc-source_%.bbappend +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################ -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the Boot to Qt meta layer. -## -## $QT_BEGIN_LICENSE:GPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 or (at your option) any later version -## approved by the KDE Free Qt Foundation. The licenses are as published by -## the Free Software Foundation and appearing in the file LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################ - -FILESEXTRAPATHS_append := "${THISDIR}/gcc:" -SRC_URI += "\ - file://0001-Always-use-config-os-mingw32-w64-for-mingw-builds.patch \ -" diff --git a/meta-boot2qt-distro/recipes-devtools/gcc/gcc/0001-Always-use-config-os-mingw32-w64-for-mingw-builds.patch b/meta-boot2qt-distro/recipes-devtools/gcc/gcc/0001-Always-use-config-os-mingw32-w64-for-mingw-builds.patch deleted file mode 100644 index 5a167f25..00000000 --- a/meta-boot2qt-distro/recipes-devtools/gcc/gcc/0001-Always-use-config-os-mingw32-w64-for-mingw-builds.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 052f7e5db0d793155015530b639c4e42d37eb7eb Mon Sep 17 00:00:00 2001 -From: Samuli Piippo <samuli.piippo@qt.io> -Date: Fri, 23 Aug 2019 10:10:43 +0300 -Subject: [PATCH] Always use config/os/mingw32-w64 for mingw builds - -Make sure we use the w64 version of the configs, since that's what -meta-mingw is using. - -Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> ---- - libstdc++-v3/configure.host | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) - -diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host -index 155a3cdea..adbda8784 100644 ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -277,16 +277,8 @@ case "${host_os}" in - os_include_dir="os/hpux" - ;; - mingw32*) -- case "$host" in -- *-w64-*) -- os_include_dir="os/mingw32-w64" -- error_constants_dir="os/mingw32-w64" -- ;; -- *) -- os_include_dir="os/mingw32" -- error_constants_dir="os/mingw32" -- ;; -- esac -+ os_include_dir="os/mingw32-w64" -+ error_constants_dir="os/mingw32-w64" - OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)" - ;; - netbsd*) diff --git a/meta-boot2qt-distro/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_6.0.0.bbappend b/meta-boot2qt-distro/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_6.0.0.bbappend new file mode 100644 index 00000000..2546bfe8 --- /dev/null +++ b/meta-boot2qt-distro/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_6.0.0.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_x86-64 = "--disable-lib32" diff --git a/meta-boot2qt-distro/recipes-devtools/ninja/ninja_%.bbappend b/meta-boot2qt-distro/recipes-devtools/ninja/ninja_%.bbappend new file mode 100644 index 00000000..e7ddb4d1 --- /dev/null +++ b/meta-boot2qt-distro/recipes-devtools/ninja/ninja_%.bbappend @@ -0,0 +1,8 @@ +do_compile_mingw32() { + python3 ./configure.py --platform mingw + ninja +} + +do_install_mingw32() { + install -D -m 0755 ${S}/ninja.exe ${D}${bindir}/ninja.exe +} diff --git a/meta-boot2qt-distro/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt6-toolchain-host.bb b/meta-boot2qt-distro/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt6-toolchain-host.bb index ccbcc4f4..49111b03 100644 --- a/meta-boot2qt-distro/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt6-toolchain-host.bb +++ b/meta-boot2qt-distro/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt6-toolchain-host.bb @@ -33,12 +33,6 @@ PR = "r0" inherit nativesdk packagegroup -python __anonymous() { - overrides = d.getVar("OVERRIDES").split(":") - if "mingw32" not in overrides: - d.appendVar("OVERRIDES", ":linux") -} - RDEPENDS_${PN} += "\ nativesdk-packagegroup-b2qt-embedded-toolchain-host \ nativesdk-qtbase \ @@ -48,8 +42,5 @@ RDEPENDS_${PN} += "\ nativesdk-qtdeclarative-staticdev \ nativesdk-qtdeclarative-tools \ nativesdk-qttools-tools \ - " - -RDEPENDS_${PN}_append_linux = "\ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-qtwayland-tools', '', d)} \ " diff --git a/meta-boot2qt-distro/recipes-qt/qt6/qtdeclarative_git.bbappend b/meta-boot2qt-distro/recipes-qt/qt6/qtdeclarative_git.bbappend deleted file mode 100644 index d9144a89..00000000 --- a/meta-boot2qt-distro/recipes-qt/qt6/qtdeclarative_git.bbappend +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################ -## -## Copyright (C) 2018 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the Boot to Qt meta layer. -## -## $QT_BEGIN_LICENSE:GPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 or (at your option) any later version -## approved by the KDE Free Qt Foundation. The licenses are as published by -## the Free Software Foundation and appearing in the file LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################ - -FILES_${PN}-plugins_mingw32 = " \ - ${OE_QMAKE_PATH_PLUGINS}/*/*.dll \ -" diff --git a/meta-boot2qt/classes/populate_b2qt_qt6_sdk.bbclass b/meta-boot2qt/classes/populate_b2qt_qt6_sdk.bbclass index 6fc86be0..97fb2b8d 100644 --- a/meta-boot2qt/classes/populate_b2qt_qt6_sdk.bbclass +++ b/meta-boot2qt/classes/populate_b2qt_qt6_sdk.bbclass @@ -37,10 +37,6 @@ create_sdk_files_append () { rm -f ${SDK_OUTPUT}${SDKTARGETSYSROOT}${sysconfdir}/resolv.conf } -create_sdk_files_append_sdkmingw32 () { - echo "set(OE_QMAKE_BIN_SUFFIX .exe)" >> ${MACHINE_CMAKE} -} - create_qtcreator_configure_script () { # add qtcreator configuration script install -m 0755 ${BOOT2QTBASE}/files/configure-qtcreator.sh ${SDK_OUTPUT}/${SDKPATH} diff --git a/scripts/manifest.xml b/scripts/manifest.xml index 1264318a..162e72eb 100644 --- a/scripts/manifest.xml +++ b/scripts/manifest.xml @@ -5,7 +5,7 @@ fetch="git://git.yoctoproject.org"/> <project name="poky" remote="yocto" - revision="569b1f5d67c57de957e243997c53ec2f81dc8dfe" + revision="44ab5a84770bfe28a1b52678abb58b166231dfc6" path="sources/poky"/> <project name="meta-mingw" remote="yocto" @@ -30,7 +30,7 @@ fetch="ssh://codereview.qt-project.org/yocto"/> <project name="meta-qt6" remote="qt" - revision="1bfc6219e95299f200d54d136f3fc3b9bb49c794" + revision="9e69b0f3b08669f29ee2a151578fd534a05dc73c" path="sources/meta-qt6"/> <!-- NXP --> |