package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
PATCH 1/1 package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
The Qt configure auto detection (and anounced runtime detection feature) failes (see e.g. [1]), so override the configuration with the buildroot determined settings.
[1] http://lists.busybox.net/pipermail/buildroot/2019-January/241862.html
---
Notes:
- suggested by Arnout Vandecappelle [2]
[2] http://lists.busybox.net/pipermail/buildroot/2019-January/242030.html
--- package/qt5/qt5base/qt5base.mk | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
package/qt5/qt5base/qt5base.mk +31 -0
@@ -33,6 +33,37 @@ else QT5BASE_DEPENDENCIES += pcre2 endif +ifeq ($(BR2_X86_CPU_HAS_SSE2),) +QT5BASE_CONFIGURE_OPTS += -no-sse2 +else +ifeq ($(BR2_X86_CPU_HAS_SSE3),) +QT5BASE_CONFIGURE_OPTS += -no-sse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSSE3),) +QT5BASE_CONFIGURE_OPTS += -no-ssse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSE4),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.1 +else +ifeq ($(BR2_X86_CPU_HAS_SSE42),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.2 +else +ifeq ($(BR2_X86_CPU_HAS_AVX),) +QT5BASE_CONFIGURE_OPTS += -no-avx +else +ifeq ($(BR2_X86_CPU_HAS_AVX2),) +QT5BASE_CONFIGURE_OPTS += -no-avx2 +else +# no BR2_X86_CPU_HAS_AVX512 for qt configure option +# '-no-avx512' (available for latest) +endif +endif +endif +endif +endif +endif +endif + QT5BASE_CONFIGURE_OPTS += $(call qstrip,$(BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS)) ifeq ($(BR2_PACKAGE_LIBDRM),y)
Signature · 1 line
2.20.1
PATCH 1/1 package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
Hi Peter,
Quoted 48 lines · Peter Seiderer
The Qt configure auto detection (and anounced runtime detection feature) failes (see e.g. [1]), so override the configuration with the buildroot determined settings.
[1] http://lists.busybox.net/pipermail/buildroot/2019-January/241862.
htmlReported-by David Picard <[email protected]>Signed-off-by Peter Seiderer <[email protected]>---
Notes:
- suggested by Arnout Vandecappelle [2][2] http://lists.busybox.net/pipermail/buildroot/2019-January/242030.
html--- package/qt5/qt5base/qt5base.mk | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)package/qt5/qt5base/qt5base.mk +20
-0@@ -33,6 +33,37 @@ else QT5BASE_DEPENDENCIES += pcre2 endif +ifeq ($(BR2_X86_CPU_HAS_SSE2),) +QT5BASE_CONFIGURE_OPTS += -no-sse2 +else +ifeq ($(BR2_X86_CPU_HAS_SSE3),) +QT5BASE_CONFIGURE_OPTS += -no-sse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSSE3),) +QT5BASE_CONFIGURE_OPTS += -no-ssse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSE4),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.1 +else +ifeq ($(BR2_X86_CPU_HAS_SSE42),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.2 +else +ifeq ($(BR2_X86_CPU_HAS_AVX),) +QT5BASE_CONFIGURE_OPTS += -no-avx +else +ifeq ($(BR2_X86_CPU_HAS_AVX2),) +QT5BASE_CONFIGURE_OPTS += -no-avx2
package/qt5/qt5base/qt5base.mk else · line 65
Quoted 10 lines
package/qt5/qt5base/qt5base.mk +10
-0+else +# no BR2_X86_CPU_HAS_AVX512 for qt configure option +# '-no-avx512' (available for latest) +endif +endif +endif +endif +endif +endif +endif
Does -no-sse2 implies -no-sse3, -no-ssse3, ... and so on and so forth ? This is not very clear from the docs I found.
Quoted 5 lines
package/qt5/qt5base/qt5base.mk +1
-0+ QT5BASE_CONFIGURE_OPTS += $(call qstrip,$(BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS))ifeq ($(BR2_PACKAGE_LIBDRM),y)
Otherwise looks reasonable.
Have a nice Monday !
Titouan
PATCH 1/1 package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
Hello Titouan,
Quoted 56 lines · Titouan Christophe
Hi Peter,
Quoted 53 lines · Peter Seiderer
The Qt configure auto detection (and anounced runtime detection feature) failes (see e.g. [1]), so override the configuration with the buildroot determined settings.
[1] http://lists.busybox.net/pipermail/buildroot/2019-January/241862.
htmlReported-by David Picard <[email protected]>Signed-off-by Peter Seiderer <[email protected]>---
Notes:
- suggested by Arnout Vandecappelle [2][2] http://lists.busybox.net/pipermail/buildroot/2019-January/242030.
html--- package/qt5/qt5base/qt5base.mk | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)package/qt5/qt5base/qt5base.mk +25
-0@@ -33,6 +33,37 @@ else QT5BASE_DEPENDENCIES += pcre2 endif +ifeq ($(BR2_X86_CPU_HAS_SSE2),) +QT5BASE_CONFIGURE_OPTS += -no-sse2 +else +ifeq ($(BR2_X86_CPU_HAS_SSE3),) +QT5BASE_CONFIGURE_OPTS += -no-sse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSSE3),) +QT5BASE_CONFIGURE_OPTS += -no-ssse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSE4),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.1 +else +ifeq ($(BR2_X86_CPU_HAS_SSE42),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.2 +else +ifeq ($(BR2_X86_CPU_HAS_AVX),) +QT5BASE_CONFIGURE_OPTS += -no-avx +else +ifeq ($(BR2_X86_CPU_HAS_AVX2),) +QT5BASE_CONFIGURE_OPTS += -no-avx2 +else +# no BR2_X86_CPU_HAS_AVX512 for qt configure option +# '-no-avx512' (available for latest) +endif +endif
Quoted 8 lines
package/qt5/qt5base/qt5base.mk else · line 63
Quoted 5 lines
package/qt5/qt5base/qt5base.mk +5
-0+endif +endif +endif +endif +endifDoes -no-sse2 implies -no-sse3, -no-ssse3, ... and so on and so forth ? This is not very clear from the docs I found.
Yes, see qt configure.json line 908ff ([1])...
Quoted 11 lines
Quoted 6 lines
package/qt5/qt5base/qt5base.mk +1
-0+ QT5BASE_CONFIGURE_OPTS += $(call qstrip,$(BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS))ifeq ($(BR2_PACKAGE_LIBDRM),y)
Otherwise looks reasonable.
Have a nice Monday !
Thanks for review...
Regards,
Peter
[1] http://code.qt.io/cgit/qt/qtbase.git/tree/configure.json#n908
Quoted 2 lines
Titouan
PATCH 1/1 package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
In reply to Peter SeidererHello Peter,
Quoted 20 lines · On Fri, 1 Feb 2019 21:24:52 +0100 Peter Seiderer <[email protected]> wrote:
package/qt5/qt5base/qt5base.mk +20
-0+ifeq ($(BR2_X86_CPU_HAS_SSE2),) +QT5BASE_CONFIGURE_OPTS += -no-sse2 +else +ifeq ($(BR2_X86_CPU_HAS_SSE3),) +QT5BASE_CONFIGURE_OPTS += -no-sse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSSE3),) +QT5BASE_CONFIGURE_OPTS += -no-ssse3 +else +ifeq ($(BR2_X86_CPU_HAS_SSE4),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.1 +else +ifeq ($(BR2_X86_CPU_HAS_SSE42),) +QT5BASE_CONFIGURE_OPTS += -no-sse4.2 +else +ifeq ($(BR2_X86_CPU_HAS_AVX),) +QT5BASE_CONFIGURE_OPTS += -no-avx +else +ifeq ($(BR2_X86_CPU_HAS_AVX2),) +QT5BASE_CONFIGURE_OPTS += -no-avx2
package/qt5/qt5base/qt5base.mk else · line 65
Quoted 10 lines
package/qt5/qt5base/qt5base.mk +10
-0+else +# no BR2_X86_CPU_HAS_AVX512 for qt configure option +# '-no-avx512' (available for latest) +endif +endif +endif +endif +endif +endif +endif
Instead of:
ifeq ...
else
ifeq ...
else
ifeq ...
endif
endif
endif
which requires a lot of endifs, you can do:
ifeq ...
else ifeq ...
else ifeq ...
else ifeq ...
endif
which is a bit nicer.
However, like Titouan, I'd like to get a confirmation that those "else" conditions are what you want. For example, when you don't have SSE2, you also don't have SSE3. But in such a situation, you're just passing -no-sse2. Is this expected ? If so, a quick explanation in the commit log about this would be nice. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com