Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC v3 0/5] Support qmake for Qt6
@ 2025-08-14 15:32 Dario Binacchi
  2025-08-14 15:32 ` [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality Dario Binacchi
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-08-14 15:32 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Andrea Ricchi, Roy Kollen Svendsen,
	Angelo Compagnucci, Thomas Petazzoni, Jesse Van Gavere,
	linux-amarula, Giuseppe D'Angelo

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

-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality
  2025-08-14 15:32 [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Dario Binacchi
@ 2025-08-14 15:32 ` Dario Binacchi
  2025-08-15 15:28   ` Thomas Petazzoni via buildroot
  2025-09-01 12:43   ` Richard GENOUD via buildroot
  2025-08-14 15:32 ` [Buildroot] [RFC v3 2/5] package/qwt: bump to version 6.3.0 Dario Binacchi
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-08-14 15:32 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Andrea Ricchi, Roy Kollen Svendsen,
	Angelo Compagnucci, Thomas Petazzoni, Jesse Van Gavere,
	linux-amarula, Giuseppe D'Angelo, Angelo Compagnucci

From: Jesse Van Gavere <jesseevg@gmail.com>

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.

Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
[dario: fix HostData in qt.conf.in]
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

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

diff --git a/package/qt6/qt6.mk b/package/qt6/qt6.mk
index 33cbf7551f23..2d51c69269ac 100644
--- a/package/qt6/qt6.mk
+++ b/package/qt6/qt6.mk
@@ -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++
diff --git a/package/qt6/qt6base/qmake.conf.in b/package/qt6/qt6base/qmake.conf.in
new file mode 100644
index 000000000000..ebb8497d2df5
--- /dev/null
+++ b/package/qt6/qt6base/qmake.conf.in
@@ -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)
diff --git a/package/qt6/qt6base/qplatformdefs.h b/package/qt6/qt6base/qplatformdefs.h
new file mode 100644
index 000000000000..99e9a2792329
--- /dev/null
+++ b/package/qt6/qt6base/qplatformdefs.h
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/package/qt6/qt6base/qt.conf.in b/package/qt6/qt6base/qt.conf.in
new file mode 100644
index 000000000000..fee209f38c00
--- /dev/null
+++ b/package/qt6/qt6base/qt.conf.in
@@ -0,0 +1,7 @@
+[Paths]
+Prefix=/usr
+HostPrefix=@@HOST_DIR@@
+HostData=@@STAGING_DIR@@/usr
+Sysroot=@@STAGING_DIR@@
+SysrootifyPrefix=true
+TargetSpec=devices/linux-buildroot-g++
diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
index 51a4f1b5be7f..697d1a96a920 100644
--- a/package/qt6/qt6base/qt6base.mk
+++ b/package/qt6/qt6base/qt6base.mk
@@ -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))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC v3 2/5] package/qwt: bump to version 6.3.0
  2025-08-14 15:32 [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Dario Binacchi
  2025-08-14 15:32 ` [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality Dario Binacchi
@ 2025-08-14 15:32 ` Dario Binacchi
  2025-08-14 15:32 ` [Buildroot] [RFC v3 3/5] package/pkg-qmake: support Qt6 Dario Binacchi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-08-14 15:32 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Andrea Ricchi, Roy Kollen Svendsen,
	Angelo Compagnucci, Thomas Petazzoni, Jesse Van Gavere,
	linux-amarula, Giuseppe D'Angelo

Release 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

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

(no changes since v1)

 package/qwt/qwt.hash | 8 ++++----
 package/qwt/qwt.mk   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/qwt/qwt.hash b/package/qwt/qwt.hash
index d4fd210cbd69..e20c9ebadab9 100644
--- a/package/qwt/qwt.hash
+++ b/package/qwt/qwt.hash
@@ -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
diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
index 9f0b78655f6f..67292ee025be 100644
--- a/package/qwt/qwt.mk
+++ b/package/qwt/qwt.mk
@@ -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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC v3 3/5] package/pkg-qmake: support Qt6
  2025-08-14 15:32 [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Dario Binacchi
  2025-08-14 15:32 ` [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality Dario Binacchi
  2025-08-14 15:32 ` [Buildroot] [RFC v3 2/5] package/qwt: bump to version 6.3.0 Dario Binacchi
@ 2025-08-14 15:32 ` Dario Binacchi
  2025-08-14 15:32 ` [Buildroot] [RFC v3 4/5] package/qwt: enable build with Qt6 Dario Binacchi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-08-14 15:32 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Andrea Ricchi, Roy Kollen Svendsen,
	Angelo Compagnucci, Thomas Petazzoni, Jesse Van Gavere,
	linux-amarula, Giuseppe D'Angelo

Extend build support to Qt6.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

(no changes since v1)

 package/pkg-qmake.mk | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
index ccf78692e885..1449690ca114 100644
--- a/package/pkg-qmake.mk
+++ b/package/pkg-qmake.mk
@@ -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
 
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC v3 4/5] package/qwt: enable build with Qt6
  2025-08-14 15:32 [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Dario Binacchi
                   ` (2 preceding siblings ...)
  2025-08-14 15:32 ` [Buildroot] [RFC v3 3/5] package/pkg-qmake: support Qt6 Dario Binacchi
@ 2025-08-14 15:32 ` Dario Binacchi
  2025-08-14 15:32 ` [Buildroot] [RFC v3 5/5] package/cutekeyboard: " Dario Binacchi
  2025-09-01  8:03 ` [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Richard GENOUD via buildroot
  5 siblings, 0 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-08-14 15:32 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Andrea Ricchi, Roy Kollen Svendsen,
	Angelo Compagnucci, Thomas Petazzoni, Jesse Van Gavere,
	linux-amarula, Giuseppe D'Angelo

Version 6.3.0 added support for Qt6, so enable building Qwt with Qt6 as
well.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

(no changes since v1)

 package/qwt/Config.in | 22 ++++++++++++++--------
 package/qwt/qwt.mk    |  4 ++++
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/package/qwt/Config.in b/package/qwt/Config.in
index 736ccc2a5ea5..c816b48a0851 100644
--- a/package/qwt/Config.in
+++ b/package/qwt/Config.in
@@ -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
diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
index 67292ee025be..0e835c700e16 100644
--- a/package/qwt/qwt.mk
+++ b/package/qwt/qwt.mk
@@ -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
 
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC v3 5/5] package/cutekeyboard: enable build with Qt6
  2025-08-14 15:32 [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Dario Binacchi
                   ` (3 preceding siblings ...)
  2025-08-14 15:32 ` [Buildroot] [RFC v3 4/5] package/qwt: enable build with Qt6 Dario Binacchi
@ 2025-08-14 15:32 ` Dario Binacchi
  2025-09-01  8:03 ` [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Richard GENOUD via buildroot
  5 siblings, 0 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-08-14 15:32 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Andrea Ricchi, Roy Kollen Svendsen,
	Angelo Compagnucci, Thomas Petazzoni, Jesse Van Gavere,
	linux-amarula, Giuseppe D'Angelo

Enable building of cutekeyboard with Qt6. With the merge of
QuickControls2 into qtdeclarative, the corresponding Kconfig option has
also disappeared in Buildroot.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

(no changes since v2)

Added in v2

 package/cutekeyboard/Config.in       | 13 ++++++++-----
 package/cutekeyboard/cutekeyboard.mk |  6 +++++-
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/package/cutekeyboard/Config.in b/package/cutekeyboard/Config.in
index bd661b0cd42e..4f83316644a2 100644
--- a/package/cutekeyboard/Config.in
+++ b/package/cutekeyboard/Config.in
@@ -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.
diff --git a/package/cutekeyboard/cutekeyboard.mk b/package/cutekeyboard/cutekeyboard.mk
index 775bed0fe995..8181950aac50 100644
--- a/package/cutekeyboard/cutekeyboard.mk
+++ b/package/cutekeyboard/cutekeyboard.mk
@@ -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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality
  2025-08-14 15:32 ` [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality Dario Binacchi
@ 2025-08-15 15:28   ` Thomas Petazzoni via buildroot
  2025-09-01 20:32     ` Dario Binacchi
  2025-09-01 12:43   ` Richard GENOUD via buildroot
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-08-15 15:28 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: buildroot, Andrea Ricchi, Roy Kollen Svendsen, Angelo Compagnucci,
	Jesse Van Gavere, linux-amarula, Giuseppe D'Angelo,
	Angelo Compagnucci

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:

> 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?

On Thu, 14 Aug 2025 17:32:55 +0200
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:


> diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
> index 51a4f1b5be7f..697d1a96a920 100644
> --- a/package/qt6/qt6base/qt6base.mk
> +++ b/package/qt6/qt6base/qt6base.mk
> @@ -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.

> +
>  # 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.

> +	$(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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Buildroot] [RFC v3 0/5] Support qmake for Qt6
  2025-08-14 15:32 [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Dario Binacchi
                   ` (4 preceding siblings ...)
  2025-08-14 15:32 ` [Buildroot] [RFC v3 5/5] package/cutekeyboard: " Dario Binacchi
@ 2025-09-01  8:03 ` Richard GENOUD via buildroot
  2025-09-01 12:25   ` Richard GENOUD via buildroot
  5 siblings, 1 reply; 12+ messages in thread
From: Richard GENOUD via buildroot @ 2025-09-01  8:03 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: Andrea Ricchi, Roy Kollen Svendsen, Angelo Compagnucci,
	Thomas Petazzoni, Jesse Van Gavere, linux-amarula,
	Giuseppe D'Angelo

Le 14/08/2025 à 17:32, Dario Binacchi a écrit :
> The series supports qmake for qt6.
This is great to have this moving forward.

Thanks for this job!

> 
> 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
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Buildroot] [RFC v3 0/5] Support qmake for Qt6
  2025-09-01  8:03 ` [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Richard GENOUD via buildroot
@ 2025-09-01 12:25   ` Richard GENOUD via buildroot
  2025-09-01 13:18     ` Dario Binacchi
  0 siblings, 1 reply; 12+ messages in thread
From: Richard GENOUD via buildroot @ 2025-09-01 12:25 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: Andrea Ricchi, Roy Kollen Svendsen, Angelo Compagnucci,
	Thomas Petazzoni, Jesse Van Gavere, linux-amarula,
	Giuseppe D'Angelo

Le 01/09/2025 à 10:03, Richard GENOUD a écrit :
> Le 14/08/2025 à 17:32, Dario Binacchi a écrit :
>> 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.

Tested-by: Richard GENOUD <richard.genoud@bootlin.com>

>>
>> 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
>>
> 


-- 
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality
  2025-08-14 15:32 ` [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality Dario Binacchi
  2025-08-15 15:28   ` Thomas Petazzoni via buildroot
@ 2025-09-01 12:43   ` Richard GENOUD via buildroot
  1 sibling, 0 replies; 12+ messages in thread
From: Richard GENOUD via buildroot @ 2025-09-01 12:43 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: Andrea Ricchi, Roy Kollen Svendsen, Angelo Compagnucci,
	Thomas Petazzoni, Jesse Van Gavere, linux-amarula,
	Giuseppe D'Angelo, Angelo Compagnucci

Le 14/08/2025 à 17:32, Dario Binacchi a écrit :
> From: Jesse Van Gavere <jesseevg@gmail.com>
> 
> 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.
> 
> Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
> Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>

Tested-by: Richard GENOUD <richard.genoud@bootlin.com>
> [dario: fix HostData in qt.conf.in]
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
> 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
> 
> diff --git a/package/qt6/qt6.mk b/package/qt6/qt6.mk
> index 33cbf7551f23..2d51c69269ac 100644
> --- a/package/qt6/qt6.mk
> +++ b/package/qt6/qt6.mk
> @@ -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++
> diff --git a/package/qt6/qt6base/qmake.conf.in b/package/qt6/qt6base/qmake.conf.in
> new file mode 100644
> index 000000000000..ebb8497d2df5
> --- /dev/null
> +++ b/package/qt6/qt6base/qmake.conf.in
> @@ -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)
> diff --git a/package/qt6/qt6base/qplatformdefs.h b/package/qt6/qt6base/qplatformdefs.h
> new file mode 100644
> index 000000000000..99e9a2792329
> --- /dev/null
> +++ b/package/qt6/qt6base/qplatformdefs.h
> @@ -0,0 +1 @@
> +#include "../../linux-g++/qplatformdefs.h"
> diff --git a/package/qt6/qt6base/qt.conf.in b/package/qt6/qt6base/qt.conf.in
> new file mode 100644
> index 000000000000..fee209f38c00
> --- /dev/null
> +++ b/package/qt6/qt6base/qt.conf.in
> @@ -0,0 +1,7 @@
> +[Paths]
> +Prefix=/usr
> +HostPrefix=@@HOST_DIR@@
> +HostData=@@STAGING_DIR@@/usr
> +Sysroot=@@STAGING_DIR@@
> +SysrootifyPrefix=true
> +TargetSpec=devices/linux-buildroot-g++
> diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
> index 51a4f1b5be7f..697d1a96a920 100644
> --- a/package/qt6/qt6base/qt6base.mk
> +++ b/package/qt6/qt6base/qt6base.mk
> @@ -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))


-- 
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Buildroot] [RFC v3 0/5] Support qmake for Qt6
  2025-09-01 12:25   ` Richard GENOUD via buildroot
@ 2025-09-01 13:18     ` Dario Binacchi
  0 siblings, 0 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-09-01 13:18 UTC (permalink / raw)
  To: Richard GENOUD
  Cc: buildroot, Andrea Ricchi, Roy Kollen Svendsen, Angelo Compagnucci,
	Thomas Petazzoni, Jesse Van Gavere, linux-amarula,
	Giuseppe D'Angelo

Hi Richard,

On Mon, Sep 1, 2025 at 2:26 PM Richard GENOUD
<richard.genoud@bootlin.com> wrote:
>
> Le 01/09/2025 à 10:03, Richard GENOUD a écrit :
> > Le 14/08/2025 à 17:32, Dario Binacchi a écrit :
> >> 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.

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/20250814153259.6822-2-dario.binacchi@amarulasolutions.com/

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


>
> Tested-by: Richard GENOUD <richard.genoud@bootlin.com>
>
> >>
> >> 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
> >>
> >
>
>
> --
> Richard Genoud, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com



-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi@amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info@amarulasolutions.com

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality
  2025-08-15 15:28   ` Thomas Petazzoni via buildroot
@ 2025-09-01 20:32     ` Dario Binacchi
  0 siblings, 0 replies; 12+ messages in thread
From: Dario Binacchi @ 2025-09-01 20:32 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: buildroot, Andrea Ricchi, Roy Kollen Svendsen, Angelo Compagnucci,
	Jesse Van Gavere, linux-amarula, Giuseppe D'Angelo,
	Angelo Compagnucci, Richard GENOUD

Hello Thomas,

On Fri, Aug 15, 2025 at 5:28 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> 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:
>
> > 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.

>
> 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
>
>  ?

Since QT6_QT_CONF_FIXUP, unlike QT5_QT_CONF_FIXUP, is not called,
I will remove it in v4.

>
> If so, why does this has to be different?
>
> On Thu, 14 Aug 2025 17:32:55 +0200
> Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
>
>
> > diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
> > index 51a4f1b5be7f..697d1a96a920 100644
> > --- a/package/qt6/qt6base/qt6base.mk
> > +++ b/package/qt6/qt6base/qt6base.mk
> > @@ -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.

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.

>
> > +
> >  # 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.

I will drop in v4

>
> > +     $(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

>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com



-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi@amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info@amarulasolutions.com

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-09-01 20:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 15:32 [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Dario Binacchi
2025-08-14 15:32 ` [Buildroot] [RFC v3 1/5] package/qt6: Add qmake functionality Dario Binacchi
2025-08-15 15:28   ` Thomas Petazzoni via buildroot
2025-09-01 20:32     ` Dario Binacchi
2025-09-01 12:43   ` Richard GENOUD via buildroot
2025-08-14 15:32 ` [Buildroot] [RFC v3 2/5] package/qwt: bump to version 6.3.0 Dario Binacchi
2025-08-14 15:32 ` [Buildroot] [RFC v3 3/5] package/pkg-qmake: support Qt6 Dario Binacchi
2025-08-14 15:32 ` [Buildroot] [RFC v3 4/5] package/qwt: enable build with Qt6 Dario Binacchi
2025-08-14 15:32 ` [Buildroot] [RFC v3 5/5] package/cutekeyboard: " Dario Binacchi
2025-09-01  8:03 ` [Buildroot] [RFC v3 0/5] Support qmake for Qt6 Richard GENOUD via buildroot
2025-09-01 12:25   ` Richard GENOUD via buildroot
2025-09-01 13:18     ` Dario Binacchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox