Support qmake for Qt6
v3 cover Support qmake for Qt6
The series supports qmake for qt6.
As stated in https://doc.qt.io/qt-6/qt6-buildsystem.html:
"This only affects users that want to build Qt from sources.
You can still use qmake as a build tool for your applications."
This series revives an older patch that exported qmake for Qt6, applying a minimal fix. It extends pkg-qmake to support Qt6 and uses qwt and cutekeyboard as test cases to validate the changes.
The series is marked as RFC because hardcoding the Qt5 and Qt6 version numbers in pkg-qmake is not ideal, even if the Qt5 versions were already hardcoded.
An alternative approach could be to add a BR2_PACKAGE_QT{5,6}_VERSION_VALUE option, but this can be discussed during review.
Dario Binacchi (4):
package/qwt: bump to version 6.3.0
package/pkg-qmake: support Qt6
package/qwt: enable build with Qt6
package/cutekeyboard: enable build with Qt6
Jesse Van Gavere (1):
package/qt6: Add qmake functionality
package/cutekeyboard/Config.in | 13 ++++++---- package/cutekeyboard/cutekeyboard.mk | 6 ++++- package/pkg-qmake.mk | 21 ++++++++++++---- package/qt6/qt6.mk | 18 ++++++++++++++ package/qt6/qt6base/qmake.conf.in | 36 ++++++++++++++++++++++++++++ package/qt6/qt6base/qplatformdefs.h | 1 + package/qt6/qt6base/qt.conf.in | 7 ++++++ package/qt6/qt6base/qt6base.mk | 18 ++++++++++++++ package/qwt/Config.in | 22 ++++++++++------- package/qwt/qwt.hash | 8 +++---- package/qwt/qwt.mk | 6 ++++- 11 files changed, 132 insertions(+), 24 deletions(-) create mode 100644 package/qt6/qt6base/qmake.conf.in create mode 100644 package/qt6/qt6base/qplatformdefs.h create mode 100644 package/qt6/qt6base/qt.conf.in
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
RFC v3 1/5 package/qt6: Add qmake functionality
From: Jesse Van Gavere <[email protected]>
The qmake functionality had been missing due to the new host/target build requirement, to get it working the main parts of the qt5 qmake has been kept, we're still making our own device spec which we use to run qmake with along with passing some additional device options for our flags/cross-compiler the biggest difference is that where previously qt.conf was used to fixup per-paths builds, this is now always created with changed contents so qmake looks at the correct target directories.
A big thanks to Angelo Compagnucci for the encouragement and testing.
---
Changes v2 -> v3:
- Drop package/qt6/qt6base/qt6base.mk.save
package/qt6/qt6.mk | 18 +++++++++++++++ package/qt6/qt6base/qmake.conf.in | 36 +++++++++++++++++++++++++++++ package/qt6/qt6base/qplatformdefs.h | 1 + package/qt6/qt6base/qt.conf.in | 7 ++++++ package/qt6/qt6base/qt6base.mk | 18 +++++++++++++++ 5 files changed, 80 insertions(+) create mode 100644 package/qt6/qt6base/qmake.conf.in create mode 100644 package/qt6/qt6base/qplatformdefs.h create mode 100644 package/qt6/qt6base/qt.conf.in
package/qt6/qt6.mk +18 -0
@@ -12,3 +12,21 @@ QT6_SITE = https://download.qt.io/archive/qt/$(QT6_VERSION_MAJOR)/$(QT6_VERSION) QT6_GIT = git://code.qt.io include $(sort $(wildcard package/qt6/*/*.mk)) + +# The file "qt.conf" can be used to override the hard-coded paths that are +# compiled into the Qt library. We need it to make "qmake" relocatable and +# tweak the per-package install paths +define QT6_INSTALL_QT_CONF + rm -f $(HOST_DIR)/bin/qt.conf + sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \ + $(QT6BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf +endef + +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y) +define QT6_QT_CONF_FIXUP + $(QT6_INSTALL_QT_CONF) +endef +endif + +# Variable for other Qt applications to use +QT6_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
package/qt6/qt6base/qmake.conf.in new file +36 -0
@@ -0,0 +1,36 @@ +# Qt6 has a mechanism to support "device" profiles, so that people can +# specify the compiler, compiler flags and so on for a specific device. + +# We leverage this mechanism in the Buildroot packaging of qt6 to +# simplify cross-compilation: we have our own "device" definition, which +# allows us to easily pass the cross-compiler paths and flags from our +# qt6.mk. + +include(../common/linux_device_pre.conf) + +# modifications to g++-unix.conf +QMAKE_CC = $${CROSS_COMPILE}gcc +QMAKE_CXX = $${CROSS_COMPILE}g++ +QMAKE_LINK = $${CROSS_COMPILE}g++ + +# modifications to gcc-base.conf +QMAKE_CFLAGS += $${BR_COMPILER_CFLAGS} +QMAKE_CXXFLAGS += $${BR_COMPILER_CXXFLAGS} +# Remove all optimisation flags, we really only want our own. +QMAKE_CFLAGS_OPTIMIZE = +QMAKE_CFLAGS_OPTIMIZE_DEBUG = +QMAKE_CFLAGS_OPTIMIZE_FULL = +QMAKE_CFLAGS_OPTIMIZE_SIZE = +QMAKE_CFLAGS_DEBUG = +QMAKE_CXXFLAGS_DEBUG = +QMAKE_CFLAGS_RELEASE = +QMAKE_CXXFLAGS_RELEASE = +CONFIG += nostrip + +QMAKE_LIBS += -lrt -lpthread -ldl +QMAKE_CFLAGS_ISYSTEM = + +@EGLFS_DEVICE@ + +include(../common/linux_device_post.conf) +load(qt_config)
package/qt6/qt6base/qplatformdefs.h new file +1 -0
@@ -0,0 +1 @@ +#include "../../linux-g++/qplatformdefs.h"
package/qt6/qt6base/qt.conf.in new file +7 -0
@@ -0,0 +1,7 @@ +[Paths] +Prefix=/usr +HostPrefix=@@HOST_DIR@@ +HostData=@@STAGING_DIR@@/usr +Sysroot=@@STAGING_DIR@@ +SysrootifyPrefix=true +TargetSpec=devices/linux-buildroot-g++
package/qt6/qt6base/qt6base.mk +18 -0
@@ -55,6 +55,9 @@ QT6BASE_CONF_OPTS = \ -DFEATURE_system_zlib=ON \ -DFEATURE_system_libb2=ON +QT6BASE_CFLAGS = $(TARGET_CFLAGS) +QT6BASE_CXXFLAGS = $(TARGET_CXXFLAGS) + # x86 optimization options. While we have a BR2_X86_CPU_HAS_AVX512, it # is not clear yet how it maps to all the avx512* options of Qt, so we # for now keeps them disabled.
@@ -431,5 +434,20 @@ define QT6BASE_RM_USR_MKSPECS endef QT6BASE_TARGET_FINALIZE_HOOKS += QT6BASE_RM_USR_MKSPECS +define QT6BASE_MAKE_BR_SPEC + mkdir -p $(@D)/mkspecs/devices/linux-buildroot-g++/ + sed 's/@EGLFS_DEVICE@/$(QT6BASE_EGLFS_DEVICE)/g' \ + $(QT6BASE_PKGDIR)/qmake.conf.in > \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf + $(INSTALL) -m 0644 -D $(QT6BASE_PKGDIR)/qplatformdefs.h \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +endef + +QT6BASE_CONF_OPTS += -DQT_QMAKE_DEVICE_OPTIONS=CROSS_COMPILE="$(TARGET_CROSS)";BR_COMPILER_CFLAGS="$(QT6BASE_CFLAGS)";BR_COMPILER_CXXFLAGS="$(QT6BASE_CXX_FLAGS)" + +QT6BASE_PRE_CONFIGURE_HOOKS += QT6BASE_MAKE_BR_SPEC + +QT6BASE_POST_INSTALL_STAGING_HOOKS += QT6_INSTALL_QT_CONF + $(eval $(cmake-package)) $(eval $(host-cmake-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality
Hello Dario,
Thanks for bringing this further. This really seems like a copy/paste of the Qt5 logic, with even some parts that are dead code (see below). How much have you validated that everything added by this patch is actually *needed*, as opposed to just blindly copy/pasted from the Qt5 logic?
Also, in the commit log:
Quoted 4 lines
flags/cross-compiler the biggest difference is that where previously qt.conf was used to fixup per-paths builds, this is now always created with changed contents so qmake looks at the correct target directories.
I'm a bit confused by what this means. Is this about QT6_INSTALL_QT_CONF being called not only by QT6_QT_CONF_FIXUP in the BR2_PER_PACKAGE_DIRECTORIES=y case but also being called by:
QT6BASE_POST_INSTALL_STAGING_HOOKS += QT6_INSTALL_QT_CONF
?
If so, why does this has to be different?
package/qt6/qt6base/qt6base.mk QT6BASE_CONF_OPTS = \ · line 59
Quoted 10 lines · On Thu, 14 Aug 2025 17:32:55 +0200 Dario Binacchi…
package/qt6/qt6base/qt6base.mk +2
-0@@ -55,6 +55,9 @@ QT6BASE_CONF_OPTS = \ -DFEATURE_system_zlib=ON \ -DFEATURE_system_libb2=ON +QT6BASE_CFLAGS = $(TARGET_CFLAGS) +QT6BASE_CXXFLAGS = $(TARGET_CXXFLAGS)
These variables are not "changed" anywhere, so you could directly use TARGET_CFLAGS/TARGET_CXXFLAGS. Unless the goal is to keep the logic as similar as qt5 as possible.
package/qt6/qt6base/qt6base.mk define QT6BASE_RM_USR_MKSPECS · line 441
Quoted 13 lines
package/qt6/qt6base/qt6base.mk +6
-0+ # x86 optimization options. While we have a BR2_X86_CPU_HAS_AVX512, it # is not clear yet how it maps to all the avx512* options of Qt, so we # for now keeps them disabled.@@ -431,5 +434,20 @@ define QT6BASE_RM_USR_MKSPECS endef QT6BASE_TARGET_FINALIZE_HOOKS += QT6BASE_RM_USR_MKSPECS +define QT6BASE_MAKE_BR_SPEC + mkdir -p $(@D)/mkspecs/devices/linux-buildroot-g++/ + sed 's/@EGLFS_DEVICE@/$(QT6BASE_EGLFS_DEVICE)/g' \ + $(QT6BASE_PKGDIR)/qmake.conf.in > \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
$(QT6BASE_EGLFS_DEVICE) doesn't seem to be defined anywhere, so I have some doubts that this is doing something useful.
This also means the @EGLFS_DEVICE@ in qmake.conf.in is not relevant.
package/qt6/qt6base/qt6base.mk define QT6BASE_RM_USR_MKSPECS · line 446
Quoted 5 lines
package/qt6/qt6base/qt6base.mk +5
-0+ $(INSTALL) -m 0644 -D $(QT6BASE_PKGDIR)/qplatformdefs.h \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +endef + +QT6BASE_CONF_OPTS += -DQT_QMAKE_DEVICE_OPTIONS=CROSS_COMPILE="$(TARGET_CROSS)";BR_COMPILER_CFLAGS="$(QT6BASE_CFLAGS)";BR_COMPILER_CXXFLAGS="$(QT6BASE_CXX_FLAGS)"
What is this doing? Does it actually work? I'm asking because that doesn't seem to exist in the Qt5 case.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality
Hello Thomas,
Quoted 15 lines · Thomas Petazzoni
Hello Dario,
Thanks for bringing this further. This really seems like a copy/paste of the Qt5 logic, with even some parts that are dead code (see below). How much have you validated that everything added by this patch is actually *needed*, as opposed to just blindly copy/pasted from the Qt5 logic?
Also, in the commit log:
Quoted 4 lines
flags/cross-compiler the biggest difference is that where previously qt.conf was used to fixup per-paths builds, this is now always created with changed contents so qmake looks at the correct target directories.
I think the commit message refers to HostData=../target/usr in qt.conf.in, which I later fixed to HostData=@@STAGING_DIR@@/usr.
So in v4 I will remove that comment from the commit message.
Quoted 8 lines
I'm a bit confused by what this means. Is this about
QT6_INSTALL_QT_CONFbeing called not only byQT6_QT_CONF_FIXUPin the BR2_PER_PACKAGE_DIRECTORIES=y case but also being called by:
QT6BASE_POST_INSTALL_STAGING_HOOKS+=QT6_INSTALL_QT_CONF?
Since QT6_QT_CONF_FIXUP, unlike QT5_QT_CONF_FIXUP, is not called, I will remove it in v4.
Quoted 15 lines
If so, why does this has to be different?
Quoted 8 lines · On Thu, 14 Aug 2025 17:32:55 +0200 Dario Binacchi…
package/qt6/qt6base/qt6base.mk +0
-0@@ -55,6 +55,9 @@ QT6BASE_CONF_OPTS = \ -DFEATURE_system_zlib=ON \ -DFEATURE_system_libb2=ON
Quoted 6 lines
package/qt6/qt6base/qt6base.mk QT6BASE_CONF_OPTS = \ · line 59
Quoted 2 lines
package/qt6/qt6base/qt6base.mk +2
-0+QT6BASE_CFLAGS = $(TARGET_CFLAGS) +QT6BASE_CXXFLAGS = $(TARGET_CXXFLAGS)These variables are not "changed" anywhere, so you could directly use TARGET_CFLAGS/TARGET_CXXFLAGS. Unless the goal is to keep the logic as similar as qt5 as possible.
In this case, I would prefer to keep using QT6BASE_CFLAGS and QT6BASE_CXXFLAGS, to keep the logic as close as possible to that of QT5 and in case they might be modified
elsewhere in the future. I would keep them in v4, but I have no problem removing them
in a possible v5 if you think it’s appropriate.
Quoted 18 lines
Quoted 6 lines
package/qt6/qt6base/qt6base.mk +1
-0+ # x86 optimization options. While we have a BR2_X86_CPU_HAS_AVX512, it # is not clear yet how it maps to all the avx512* options of Qt, so we # for now keeps them disabled.package/qt6/qt6base/qt6base.mk define QT6BASE_RM_USR_MKSPECS · line 441
Quoted 8 lines
package/qt6/qt6base/qt6base.mk +5
-0@@ -431,5 +434,20 @@ define QT6BASE_RM_USR_MKSPECS endef QT6BASE_TARGET_FINALIZE_HOOKS += QT6BASE_RM_USR_MKSPECS +define QT6BASE_MAKE_BR_SPEC + mkdir -p $(@D)/mkspecs/devices/linux-buildroot-g++/ + sed 's/@EGLFS_DEVICE@/$(QT6BASE_EGLFS_DEVICE)/g' \ + $(QT6BASE_PKGDIR)/qmake.conf.in > \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf$(QT6BASE_EGLFS_DEVICE) doesn't seem to be defined anywhere, so I have some doubts that this is doing something useful.
Quoted 1 line
This also means the @EGLFS_DEVICE@ in qmake.conf.in is not relevant.
I will drop in v4
Quoted 9 lines
package/qt6/qt6base/qt6base.mk define QT6BASE_RM_USR_MKSPECS · line 446
Quoted 6 lines
package/qt6/qt6base/qt6base.mk +5
-0+ $(INSTALL) -m 0644 -D $(QT6BASE_PKGDIR)/qplatformdefs.h \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +endef + +QT6BASE_CONF_OPTS += -DQT_QMAKE_DEVICE_OPTIONS=CROSS_COMPILE="$(TARGET_CROSS)";BR_COMPILER_CFLAGS="$(QT6BASE_CFLAGS)";BR_COMPILER_CXXFLAGS="$(QT6BASE_CXX_FLAGS)"What is this doing? Does it actually work? I'm asking because that doesn't seem to exist in the Qt5 case.
Yes, these settings are used by package/qt6/qt6base/qmake.conf, and if I remove them
I get the following compilation error when building qwt (and also cutekeyboard):
/home/dario/projects/buildroot-qt6/buildroot-qt6/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/gnu/stubs.h:7:11:
fatal error: gnu/stubs-soft.h: No such file or directory
7 | # include <gnu/stubs-soft.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
And, if I’m not mistaken, the same approach is also adopted for qt5:
$ git grep BR_COMPILER_CFLAGS package/qt5
package/qt5/qt5base/qmake.conf.in:QMAKE_CFLAGS +=
$${BR_COMPILER_CFLAGS}
package/qt5/qt5base/qt5base.mk: -device-option
BR_COMPILER_CFLAGS="$(QT5BASE_CFLAGS)" \Thanks and regards,
Dario
Quoted 8 lines
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Signature · 21 lines
Dario Binacchi Senior Embedded Linux Developer [email protected] __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality
In reply to Dario BinacchiLe 14/08/2025 à 17:32, Dario Binacchi a écrit :
Quoted 11 lines
From: Jesse Van Gavere <[email protected]>
The qmake functionality had been missing due to the new host/target build requirement, to get it working the main parts of the qt5 qmake has been kept, we're still making our own device spec which we use to run qmake with along with passing some additional device options for our flags/cross-compiler the biggest difference is that where previously qt.conf was used to fixup per-paths builds, this is now always created with changed contents so qmake looks at the correct target directories.
Quoted 4 lines
A big thanks to Angelo Compagnucci for the encouragement and testing.
Signed-off-by Jesse Van Gavere <[email protected]>Tested-by Angelo Compagnucci <[email protected]>
Quoted 141 lines
[dario: fix HostData in qt.conf.in]Signed-off-by Dario Binacchi <[email protected]>---
Changes v2 -> v3:
- Drop package/qt6/qt6base/qt6base.mk.savepackage/qt6/qt6.mk | 18 +++++++++++++++ package/qt6/qt6base/qmake.conf.in | 36 +++++++++++++++++++++++++++++ package/qt6/qt6base/qplatformdefs.h | 1 + package/qt6/qt6base/qt.conf.in | 7 ++++++ package/qt6/qt6base/qt6base.mk | 18 +++++++++++++++ 5 files changed, 80 insertions(+)create mode 100644 package/qt6/qt6base/qmake.conf.in create mode 100644
package/qt6/qt6base/qplatformdefs.hcreate mode 100644 package/qt6/qt6base/qt.conf.inpackage/qt6/qt6.mk +18
-0@@ -12,3 +12,21 @@ QT6_SITE = https://download.qt.io/archive/qt/$(QT6_VERSION_MAJOR)/$(QT6_VERSION) QT6_GIT = git://code.qt.io include $(sort $(wildcard package/qt6/*/*.mk)) + +# The file "qt.conf" can be used to override the hard-coded paths that are +# compiled into the Qt library. We need it to make "qmake" relocatable and +# tweak the per-package install paths +define QT6_INSTALL_QT_CONF + rm -f $(HOST_DIR)/bin/qt.conf + sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \ + $(QT6BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf +endef + +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y) +define QT6_QT_CONF_FIXUP + $(QT6_INSTALL_QT_CONF) +endef +endif + +# Variable for other Qt applications to use +QT6_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++package/qt6/qt6base/qmake.conf.in new file +36
-0@@ -0,0 +1,36 @@ +# Qt6 has a mechanism to support "device" profiles, so that people can +# specify the compiler, compiler flags and so on for a specific device. + +# We leverage this mechanism in the Buildroot packaging of qt6 to +# simplify cross-compilation: we have our own "device" definition, which +# allows us to easily pass the cross-compiler paths and flags from our +# qt6.mk. + +include(../common/linux_device_pre.conf) + +# modifications to g++-unix.conf +QMAKE_CC = $${CROSS_COMPILE}gcc +QMAKE_CXX = $${CROSS_COMPILE}g++ +QMAKE_LINK = $${CROSS_COMPILE}g++ + +# modifications to gcc-base.conf +QMAKE_CFLAGS += $${BR_COMPILER_CFLAGS} +QMAKE_CXXFLAGS += $${BR_COMPILER_CXXFLAGS} +# Remove all optimisation flags, we really only want our own. +QMAKE_CFLAGS_OPTIMIZE = +QMAKE_CFLAGS_OPTIMIZE_DEBUG = +QMAKE_CFLAGS_OPTIMIZE_FULL = +QMAKE_CFLAGS_OPTIMIZE_SIZE = +QMAKE_CFLAGS_DEBUG = +QMAKE_CXXFLAGS_DEBUG = +QMAKE_CFLAGS_RELEASE = +QMAKE_CXXFLAGS_RELEASE = +CONFIG += nostrip + +QMAKE_LIBS += -lrt -lpthread -ldl +QMAKE_CFLAGS_ISYSTEM = + +@EGLFS_DEVICE@ + +include(../common/linux_device_post.conf) +load(qt_config)package/qt6/qt6base/qplatformdefs.h new file +1
-0@@ -0,0 +1 @@ +#include "../../linux-g++/qplatformdefs.h" package/qt6/qt6base/qt.conf.in new file +7
-0@@ -0,0 +1,7 @@ +[Paths] +Prefix=/usr +HostPrefix=@@HOST_DIR@@ +HostData=@@STAGING_DIR@@/usr +Sysroot=@@STAGING_DIR@@ +SysrootifyPrefix=true +TargetSpec=devices/linux-buildroot-g++package/qt6/qt6base/qt6base.mk +18
-0@@ -55,6 +55,9 @@ QT6BASE_CONF_OPTS = \ -DFEATURE_system_zlib=ON \ -DFEATURE_system_libb2=ON +QT6BASE_CFLAGS = $(TARGET_CFLAGS) +QT6BASE_CXXFLAGS = $(TARGET_CXXFLAGS) + # x86 optimization options. While we have a BR2_X86_CPU_HAS_AVX512, it # is not clear yet how it maps to all the avx512* options of Qt, so we # for now keeps them disabled.@@ -431,5 +434,20 @@ define QT6BASE_RM_USR_MKSPECS endef QT6BASE_TARGET_FINALIZE_HOOKS += QT6BASE_RM_USR_MKSPECS +define QT6BASE_MAKE_BR_SPEC + mkdir -p $(@D)/mkspecs/devices/linux-buildroot-g++/ + sed 's/@EGLFS_DEVICE@/$(QT6BASE_EGLFS_DEVICE)/g' \ + $(QT6BASE_PKGDIR)/qmake.conf.in > \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf + $(INSTALL) -m 0644 -D $(QT6BASE_PKGDIR)/qplatformdefs.h \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +endef + +QT6BASE_CONF_OPTS += -DQT_QMAKE_DEVICE_OPTIONS=CROSS_COMPILE="$(TARGET_CROSS)";BR_COMPILER_CFLAGS="$(QT6BASE_CFLAGS)";BR_COMPILER_CXXFLAGS="$(QT6BASE_CXX_FLAGS)" + +QT6BASE_PRE_CONFIGURE_HOOKS += QT6BASE_MAKE_BR_SPEC + +QT6BASE_POST_INSTALL_STAGING_HOOKS += QT6_INSTALL_QT_CONF + $(eval $(cmake-package)) $(eval $(host-cmake-package))
Signature · 7 lines
Richard Genoud, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
RFC v3 2/5 package/qwt: bump to version 6.3.0
In reply to Dario BinacchiRelease notes:
https://sourceforge.net/p/qwt/git/ci/qwt-6.2/tree/CHANGES-6.2
https://sourceforge.net/p/qwt/git/ci/develop/tree/CHANGES-6.3
---
(no changes since v1)
package/qwt/qwt.hash | 8 ++++---- package/qwt/qwt.mk | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
package/qwt/qwt.hash +4 -4
@@ -1,7 +1,7 @@ -# From https://sourceforge.net/projects/qwt/files/qwt/6.1.6 -md5 cc71be5d6c33c2fc19ae8082ccdd3e83 qwt-6.1.6.tar.bz2 -sha1 b1f17a86c9b1b0790a0c0067ef69fb6277efac79 qwt-6.1.6.tar.bz2 +# From https://sourceforge.net/projects/qwt/files/qwt/6.3.0 +md5 06a8f8eb1bc07bedfb1df601804439cb qwt-6.3.0.tar.bz2 +sha1 9180f33f75ff8817f27019c94d10f92de840a5e4 qwt-6.3.0.tar.bz2 # Locally computed -sha256 99460d31c115ee4117b0175d885f47c2c590d784206f09815dc058fbe5ede1f6 qwt-6.1.6.tar.bz2 +sha256 dcb085896c28aaec5518cbc08c0ee2b4e60ada7ac929d82639f6189851a6129a qwt-6.3.0.tar.bz2 sha256 d8737db330e1eeb439962e11654ab7f1aece3561d9415454a8c538643824ede6 COPYING
package/qwt/qwt.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -QWT_VERSION = 6.1.6 +QWT_VERSION = 6.3.0 QWT_SOURCE = qwt-$(QWT_VERSION).tar.bz2 QWT_SITE = http://downloads.sourceforge.net/project/qwt/qwt/$(QWT_VERSION) QWT_INSTALL_STAGING = YES
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
RFC v3 3/5 package/pkg-qmake: support Qt6
In reply to Dario BinacchiExtend build support to Qt6.
---
(no changes since v1)
package/pkg-qmake.mk | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
package/pkg-qmake.mk +16 -5
@@ -20,11 +20,22 @@ # ################################################################################ + +ifeq ($(BR2_PACKAGE_QT5),y) +QT_VERSION = 5.15 +else +QT_VERSION = 6.8 +endif + +QT_VERSION_MAJOR = $(word 1,$(subst ., ,$(QT_VERSION))) +QT_VERSION_MINOR = $(word 2,$(subst ., ,$(QT_VERSION))) +QT_BASE = qt$(QT_VERSION_MAJOR)base + # # Hook to sync Qt headers # define QT_HEADERS_SYNC_HOOK - sed -e '/^MODULE_VERSION/s/5\.15\.[3456789]/$(QT5_VERSION)/' -i \ + sed -e '/^MODULE_VERSION/s/$(QT_VERSION_MAJOR)\.$(QT_VERSION_MINOR)\.[3456789]/$(QT_VERSION)/' -i \ $($(PKG)_BUILDDIR)/.qmake.conf touch $($(PKG)_BUILDDIR)/.git endef
@@ -45,15 +56,15 @@ define inner-qmake-package $(2)_INSTALL_STAGING_OPTS ?= install $(2)_INSTALL_TARGET_OPTS ?= $$($(2)_INSTALL_STAGING_OPTS) -ifneq ($(1),qt5base) -$(2)_DEPENDENCIES += qt5base +ifneq ($(1),$(QT_BASE)) +$(2)_DEPENDENCIES += $(QT_BASE) endif ifeq ($$($(2)_SYNC_QT_HEADERS),YES) $(2)_PRE_CONFIGURE_HOOKS += QT_HEADERS_SYNC_HOOK endif -$(2)_POST_PREPARE_HOOKS += QT5_QT_CONF_FIXUP +$(2)_POST_PREPARE_HOOKS += QT$(QT_VERSION_MAJOR)_QT_CONF_FIXUP # # Configure step. Only define it if not already defined by the package
@@ -62,7 +73,7 @@ $(2)_POST_PREPARE_HOOKS += QT5_QT_CONF_FIXUP ifndef $(2)_CONFIGURE_CMDS define $(2)_CONFIGURE_CMDS cd $$($(2)_BUILDDIR) && \ - $$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS) + $$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT$(QT_VERSION_MAJOR)_QMAKE) $$($(2)_CONF_OPTS) endef endif
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
RFC v3 4/5 package/qwt: enable build with Qt6
In reply to Dario BinacchiVersion 6.3.0 added support for Qt6, so enable building Qwt with Qt6 as well.
---
(no changes since v1)
package/qwt/Config.in | 22 ++++++++++++++-------- package/qwt/qwt.mk | 4 ++++ 2 files changed, 18 insertions(+), 8 deletions(-)
package/qwt/Config.in +14 -8
@@ -1,9 +1,13 @@ config BR2_PACKAGE_QWT bool "qwt" - depends on BR2_PACKAGE_QT5 - select BR2_PACKAGE_QT5BASE_GUI - select BR2_PACKAGE_QT5BASE_WIDGETS # printsupport - select BR2_PACKAGE_QT5BASE_CONCURRENT + depends on BR2_PACKAGE_QT5 || BR2_PACKAGE_QT6 + select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5 # printsupport + select BR2_PACKAGE_QT5BASE_CONCURRENT if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT6BASE_GUI if BR2_PACKAGE_QT6 + select BR2_PACKAGE_QT6BASE_WIDGETS if BR2_PACKAGE_QT6 + select BR2_PACKAGE_QT6BASE_PRINTSUPPORT if BR2_PACKAGE_QT6 + select BR2_PACKAGE_QT6BASE_CONCURRENT if BR2_PACKAGE_QT6 help Qwt is a graphics extension to the Qt GUI application framework. It provides a 2D plotting widget and more.
@@ -14,15 +18,17 @@ if BR2_PACKAGE_QWT config BR2_PACKAGE_QWT_SVG bool "SVG support" - select BR2_PACKAGE_QT5SVG + select BR2_PACKAGE_QT5SVG if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT6SVG if BR2_PACKAGE_QT6 config BR2_PACKAGE_QWT_MATHML bool "MathML support" config BR2_PACKAGE_QWT_OPENGL bool "OpenGL support" - depends on BR2_PACKAGE_QT5_GL_AVAILABLE - select BR2_PACKAGE_QT5BASE_OPENGL - select BR2_PACKAGE_QT5BASE_OPENGL_LIB + depends on BR2_PACKAGE_QT5_GL_AVAILABLE || BR2_PACKAGE_QT6 + select BR2_PACKAGE_QT5BASE_OPENGL if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE_OPENGL_LIB if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT6BASE_OPENGL if BR2_PACKAGE_QT6 endif
package/qwt/qwt.mk +4 -0
@@ -18,8 +18,12 @@ QWT_CONFIG += -e 's%/features%/mkspecs/features%' ifeq ($(BR2_PACKAGE_QWT_SVG),y) QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/' +ifeq ($(BR2_PACKAGE_QT5),y) QWT_DEPENDENCIES += qt5svg else +QWT_DEPENDENCIES += qt6svg +endif +else QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/' endif
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
RFC v3 5/5 package/cutekeyboard: enable build with Qt6
In reply to Dario BinacchiEnable building of cutekeyboard with Qt6. With the merge of QuickControls2 into qtdeclarative, the corresponding Kconfig option has also disappeared in Buildroot.
---
(no changes since v2)
Added in v2
package/cutekeyboard/Config.in | 13 ++++++++----- package/cutekeyboard/cutekeyboard.mk | 6 +++++- 2 files changed, 13 insertions(+), 6 deletions(-)
package/cutekeyboard/Config.in +8 -5
@@ -1,10 +1,13 @@ config BR2_PACKAGE_CUTEKEYBOARD bool "cutekeyboard" - depends on BR2_PACKAGE_QT5 - depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE # qt5declarative - select BR2_PACKAGE_QT5DECLARATIVE - select BR2_PACKAGE_QT5DECLARATIVE_QUICK - select BR2_PACKAGE_QT5QUICKCONTROLS2 + depends on BR2_PACKAGE_QT5 || BR2_PACKAGE_QT6 + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE || BR2_PACKAGE_QT6 # qt5declarative + select BR2_PACKAGE_QT5DECLARATIVE if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5DECLARATIVE_QUICK if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5QUICKCONTROLS2 if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT6BASE_GUI if BR2_PACKAGE_QT6 + select BR2_PACKAGE_QT6DECLARATIVE if BR2_PACKAGE_QT6 + select BR2_PACKAGE_QT6DECLARATIVE_QUICK if BR2_PACKAGE_QT6 help CuteKeyboard is a Qt virtual keyboard plugin for embedded applications.
package/cutekeyboard/cutekeyboard.mk +5 -1
@@ -6,7 +6,11 @@ CUTEKEYBOARD_VERSION = v1.3.0 CUTEKEYBOARD_SITE = $(call github,amarula,cutekeyboard,$(CUTEKEYBOARD_VERSION)) -CUTEKEYBOARD_DEPENDENCIES = qt5declarative qt5quickcontrols2 +ifeq ($(BR2_PACKAGE_QT5),y) +CUTEKEYBOARD_DEPENDENCIES += qt5declarative qt5quickcontrols2 +else +CUTEKEYBOARD_DEPENDENCIES += qt6declarative +endif CUTEKEYBOARD_INSTALL_STAGING = YES CUTEKEYBOARD_LICENSE = MIT CUTEKEYBOARD_LICENSE_FILES = LICENSE
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Le 14/08/2025 à 17:32, Dario Binacchi a écrit :
Quoted 1 line
The series supports qmake for qt6.
This is great to have this moving forward.
Thanks for this job!
Quoted 38 lines
As stated in https://doc.qt.io/qt-6/qt6-buildsystem.html:
"This only affects users that want to build Qt from sources.
You can still use qmake as a build tool for your applications."This series revives an older patch that exported qmake for Qt6, applying a minimal fix. It extends pkg-qmake to support Qt6 and uses qwt and cutekeyboard as test cases to validate the changes.
The series is marked as RFC because hardcoding the Qt5 and Qt6 version numbers in pkg-qmake is not ideal, even if the Qt5 versions were already hardcoded.
An alternative approach could be to add a BR2_PACKAGE_QT{5,6}_VERSION_VALUE option, but this can be discussed during review.
Dario Binacchi (4):
package/qwt: bump to version 6.3.0
package/pkg-qmake: support Qt6
package/qwt: enable build with Qt6
package/cutekeyboard: enable build with Qt6Jesse Van Gavere (1):
package/qt6: Add qmake functionalitypackage/cutekeyboard/Config.in | 13 ++++++---- package/cutekeyboard/cutekeyboard.mk | 6 ++++- package/pkg-qmake.mk | 21 ++++++++++++---- package/qt6/qt6.mk | 18 ++++++++++++++ package/qt6/qt6base/qmake.conf.in | 36 ++++++++++++++++++++++++++++ package/qt6/qt6base/qplatformdefs.h | 1 + package/qt6/qt6base/qt.conf.in | 7 ++++++ package/qt6/qt6base/qt6base.mk | 18 ++++++++++++++ package/qwt/Config.in | 22 ++++++++++------- package/qwt/qwt.hash | 8 +++---- package/qwt/qwt.mk | 6 ++++- 11 files changed, 132 insertions(+), 24 deletions(-)
Quoted 4 lines
create mode 100644 package/qt6/qt6base/qmake.conf.in create mode 100644
package/qt6/qt6base/qplatformdefs.hcreate mode 100644 package/qt6/qt6base/qt.conf.in
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Richard GENOUD via buildroot
Tested-by Richard GENOUDLe 01/09/2025 à 10:03, Richard GENOUD a écrit :
Quoted 6 lines
Le 14/08/2025 à 17:32, Dario Binacchi a écrit :
Quoted 1 line
The series supports qmake for qt6.
This is great to have this moving forward.
Thanks for this job!
I've tested that on a client's project that was previously using Qt5 qmake. Buildroot (2025.02.5), arm toolchain, build and relocate sdk. The project uses recursive qmake, it works like a charm.
Quoted 43 lines
Quoted 42 lines
As stated in https://doc.qt.io/qt-6/qt6-buildsystem.html:
"This only affects users that want to build Qt from sources. You can still use qmake as a build tool for your applications."
This series revives an older patch that exported qmake for Qt6, applying a minimal fix. It extends pkg-qmake to support Qt6 and uses qwt and cutekeyboard as test cases to validate the changes.
The series is marked as RFC because hardcoding the Qt5 and Qt6 version numbers in pkg-qmake is not ideal, even if the Qt5 versions were already hardcoded.
An alternative approach could be to add a BR2_PACKAGE_QT{5,6}
_VERSION_VALUEoption, but this can be discussed during review.Dario Binacchi (4):
package/qwt: bump to version 6.3.0
package/pkg-qmake: support Qt6
package/qwt: enable build with Qt6
package/cutekeyboard: enable build with Qt6Jesse Van Gavere (1):
package/qt6: Add qmake functionalitypackage/cutekeyboard/Config.in | 13 ++++++----
package/cutekeyboard/cutekeyboard.mk| 6 ++++- package/pkg-qmake.mk | 21 ++++++++++++---- package/qt6/qt6.mk | 18 ++++++++++++++ package/qt6/qt6base/qmake.conf.in | 36 ++++++++++++++++++++++++++++ package/qt6/qt6base/qplatformdefs.h | 1 + package/qt6/qt6base/qt.conf.in | 7 ++++++ package/qt6/qt6base/qt6base.mk | 18 ++++++++++++++ package/qwt/Config.in | 22 ++++++++++------- package/qwt/qwt.hash | 8 +++---- package/qwt/qwt.mk | 6 ++++-11 files changed, 132 insertions(+), 24 deletions(-)create mode 100644 package/qt6/qt6base/qmake.conf.in create mode 100644
package/qt6/qt6base/qplatformdefs.hcreate mode 100644 package/qt6/qt6base/qt.conf.in
Signature · 7 lines
Richard Genoud, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Richard,
Quoted 4 lines · Richard GENOUD
Quoted 2 lines · Richard GENOUD
Quoted 1 line · Dario Binacchi
The series supports qmake for qt6.
Quoted 8 lines
Quoted 4 lines
This is great to have this moving forward.
Thanks for this job!
I've tested that on a client's project that was previously using Qt5 qmake. Buildroot (2025.02.5), arm toolchain, build and relocate sdk. The project uses recursive qmake, it works like a charm.
Thanks a lot for your test.
I still need to address some of Thomas’ comments in the review:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
In particular the point:
"$(QT6BASE_EGLFS_DEVICE) doesn't seem to be defined anywhere, so I have some doubts that this is doing something useful."
I did some tests, but the last few days have been quite busy, so I couldn’t move forward with the series.
I plan to reply to Thomas’ review and send a v4 either today or tomorrow.
Thanks and regards,
Dario
Quoted 53 lines
Tested-by Richard GENOUD <[email protected]>Quoted 27 lines
Quoted 27 lines
As stated in https://doc.qt.io/qt-6/qt6-buildsystem.html:
"This only affects users that want to build Qt from sources.
You can still use qmake as a build tool for your applications."This series revives an older patch that exported qmake for Qt6, applying a minimal fix. It extends pkg-qmake to support Qt6 and uses qwt and cutekeyboard as test cases to validate the changes.
The series is marked as RFC because hardcoding the Qt5 and Qt6 version numbers in pkg-qmake is not ideal, even if the Qt5 versions were already hardcoded.
An alternative approach could be to add a BR2_PACKAGE_QT{5,6}
_VERSION_VALUE
option, but this can be discussed during review.Dario Binacchi (4):
package/qwt: bump to version 6.3.0
package/pkg-qmake: support Qt6
package/qwt: enable build with Qt6
package/cutekeyboard: enable build with Qt6Jesse Van Gavere (1):
package/qt6: Add qmake functionalityQuoted 17 lines
Quoted 12 lines
package/cutekeyboard/Config.in | 13 ++++++---- package/cutekeyboard/cutekeyboard.mk | 6 ++++- package/pkg-qmake.mk | 21 ++++++++++++---- package/qt6/qt6.mk | 18 ++++++++++++++ package/qt6/qt6base/qmake.conf.in | 36 ++++++++++++++++++++++++++++ package/qt6/qt6base/qplatformdefs.h | 1 + package/qt6/qt6base/qt.conf.in | 7 ++++++ package/qt6/qt6base/qt6base.mk | 18 ++++++++++++++ package/qwt/Config.in | 22 ++++++++++------- package/qwt/qwt.hash | 8 +++---- package/qwt/qwt.mk | 6 ++++- 11 files changed, 132 insertions(+), 24 deletions(-)Quoted 4 lines
create mode 100644 package/qt6/qt6base/qmake.conf.in create mode 100644
package/qt6/qt6base/qplatformdefs.hcreate mode 100644 package/qt6/qt6base/qt.conf.in--
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 21 lines
Dario Binacchi Senior Embedded Linux Developer [email protected] __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot