Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1] package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
@ 2019-02-01 20:24 Peter Seiderer
  2019-02-04 16:34 ` Titouan Christophe
  2019-02-04 20:14 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Seiderer @ 2019-02-01 20:24 UTC (permalink / raw)
  To: buildroot

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

Reported-by: David Picard <dplamp@gmx.com>
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
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(+)

diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index d10f233b46..b84efcc2bf 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -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)
-- 
2.20.1

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

* [Buildroot] [PATCH v1] package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
  2019-02-01 20:24 [Buildroot] [PATCH v1] package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration Peter Seiderer
@ 2019-02-04 16:34 ` Titouan Christophe
  2019-02-04 20:18   ` Peter Seiderer
  2019-02-04 20:14 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Titouan Christophe @ 2019-02-04 16:34 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Fri, 2019-02-01 at 21:24 +0100, Peter Seiderer wrote:
> 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
> 
> Reported-by: David Picard <dplamp@gmx.com>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> 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(+)
> 
> diff --git a/package/qt5/qt5base/qt5base.mk
> b/package/qt5/qt5base/qt5base.mk
> index d10f233b46..b84efcc2bf 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -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

Does -no-sse2 implies -no-sse3, -no-ssse3, ... and so on and so forth ?
This is not very clear from the docs I found.

> +
>  QT5BASE_CONFIGURE_OPTS += $(call
> qstrip,$(BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS))
>  
>  ifeq ($(BR2_PACKAGE_LIBDRM),y)


Otherwise looks reasonable.

Have a nice Monday !

Titouan

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

* [Buildroot] [PATCH v1] package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
  2019-02-01 20:24 [Buildroot] [PATCH v1] package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration Peter Seiderer
  2019-02-04 16:34 ` Titouan Christophe
@ 2019-02-04 20:14 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-02-04 20:14 UTC (permalink / raw)
  To: buildroot

Hello Peter,

On Fri,  1 Feb 2019 21:24:52 +0100
Peter Seiderer <ps.report@gmx.net> wrote:

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

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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v1] package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration
  2019-02-04 16:34 ` Titouan Christophe
@ 2019-02-04 20:18   ` Peter Seiderer
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Seiderer @ 2019-02-04 20:18 UTC (permalink / raw)
  To: buildroot

Hello Titouan,

On Mon, 04 Feb 2019 17:34:01 +0100, Titouan Christophe <titouan.christophe@railnova.eu> wrote:

> Hi Peter,
> 
> On Fri, 2019-02-01 at 21:24 +0100, Peter Seiderer wrote:
> > 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
> > 
> > Reported-by: David Picard <dplamp@gmx.com>
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > 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(+)
> > 
> > diff --git a/package/qt5/qt5base/qt5base.mk
> > b/package/qt5/qt5base/qt5base.mk
> > index d10f233b46..b84efcc2bf 100644
> > --- a/package/qt5/qt5base/qt5base.mk
> > +++ b/package/qt5/qt5base/qt5base.mk
> > @@ -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  
> 
> Does -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])...

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

> 
> Titouan

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

end of thread, other threads:[~2019-02-04 20:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-01 20:24 [Buildroot] [PATCH v1] package/qt5/qt5base: handle sse2/sse3/ssse3/sse4.1/sse4.2/avx/avx2 configuration Peter Seiderer
2019-02-04 16:34 ` Titouan Christophe
2019-02-04 20:18   ` Peter Seiderer
2019-02-04 20:14 ` Thomas Petazzoni

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