Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3,1/1] package/liquid-dsp: fix x86 builds
@ 2024-01-08 21:14 Fabrice Fontaine
  2024-01-08 22:10 ` Yann E. MORIN
  2024-01-13 13:27 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-01-08 21:14 UTC (permalink / raw)
  To: buildroot; +Cc: Guillaume William Brs, Fabrice Fontaine

HAVE_{MMX,SSE2,...} are not defined if ax_cv_have_{i}_cpu_ext is not set
resulting in the following build failure raised since bump to version
1.5.0 in commit c2aaa0fbe2fdf6e599c68169aa7b2e55237190c7 and
https://github.com/jgaeddert/liquid-dsp/commit/02c4e8b99b11d9f1615b8840f243b08a85b86563:

src/dotprod/src/dotprod_cccf.sse.c: In function 'dotprod_cccf_execute_sse':
src/dotprod/src/dotprod_cccf.sse.c:258:5: error: unknown type name '__m128'; did you mean '__int128'?
  258 |     __m128 v;   // input vector
      |     ^~~~~~
      |     __int128

or

src/dotprod/src/dotprod_cccf.mmx.c: In function 'dotprod_cccf_execute_mmx':
src/dotprod/src/dotprod_cccf.mmx.c:262:5: error: unknown type name '__m128'; did you mean '__int128'?
  262 |     __m128 v;   // input vector
      |     ^~~~~~
      |     __int128

While at it, add AVX2 support

Fixes:
 - http://autobuild.buildroot.org/results/738ce9d3dc74ec165391f21256c955e5524f1632
 - http://autobuild.buildroot.org/results/a2d150c724ab6787aeabaf31f65116f802e8584e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v2 -> v3 (after review of Yann E. Morin):
 - Keep current list format

Changes v1 -> v2:
 - Keep old options (mmx, etc.) as they seem to be still used somewhere
   in the code

 package/liquid-dsp/liquid-dsp.mk | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk
index eb4cda67a5..ce4cd5a7a7 100644
--- a/package/liquid-dsp/liquid-dsp.mk
+++ b/package/liquid-dsp/liquid-dsp.mk
@@ -13,13 +13,23 @@ LIQUID_DSP_AUTORECONF = YES
 
 LIQUID_DSP_CONF_ENV = \
 	ax_cv_have_mmx_ext=$(if $(BR2_X86_CPU_HAS_MMX),yes,no) \
+	ax_cv_have_mmx_cpu_ext=$(if $(BR2_X86_CPU_HAS_MMX),yes,no) \
 	ax_cv_have_sse_ext=$(if $(BR2_X86_CPU_HAS_SSE),yes,no) \
+	ax_cv_have_sse_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE),yes,no) \
 	ax_cv_have_sse2_ext=$(if $(BR2_X86_CPU_HAS_SSE2),yes,no) \
+	ax_cv_have_sse2_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE2),yes,no) \
 	ax_cv_have_sse3_ext=$(if $(BR2_X86_CPU_HAS_SSE3),yes,no) \
+	ax_cv_have_sse3_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE3),yes,no) \
 	ax_cv_have_ssse3_ext=$(if $(BR2_X86_CPU_HAS_SSSE3),yes,no) \
+	ax_cv_have_ssse3_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSSE3),yes,no) \
 	ax_cv_have_sse41_ext=$(if $(BR2_X86_CPU_HAS_SSE4),yes,no) \
+	ax_cv_have_sse41_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE4),yes,no) \
 	ax_cv_have_sse42_ext=$(if $(BR2_X86_CPU_HAS_SSE42),yes,no) \
-	ax_cv_have_avx_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no)
+	ax_cv_have_sse42_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE42),yes,no) \
+	ax_cv_have_avx_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no) \
+	ax_cv_have_avx_cpu_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no) \
+	ax_cv_have_avx2_ext=$(if $(BR2_X86_CPU_HAS_AVX2),yes,no) \
+	ax_cv_have_avx2_cpu_ext=$(if $(BR2_X86_CPU_HAS_AVX2),yes,no)
 
 LIQUID_DSP_CFLAGS = $(TARGET_CFLAGS)
 LIQUID_DSP_LDFLAGS = $(TARGET_LDFLAGS)
-- 
2.43.0

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

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

* Re: [Buildroot] [PATCH v3,1/1] package/liquid-dsp: fix x86 builds
  2024-01-08 21:14 [Buildroot] [PATCH v3,1/1] package/liquid-dsp: fix x86 builds Fabrice Fontaine
@ 2024-01-08 22:10 ` Yann E. MORIN
  2024-01-13 13:27 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2024-01-08 22:10 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Guillaume William Brs, buildroot

Fabrice, All,

On 2024-01-08 22:14 +0100, Fabrice Fontaine spake thusly:
> HAVE_{MMX,SSE2,...} are not defined if ax_cv_have_{i}_cpu_ext is not set

From a quick glance at upstream, it seems that there are two set of
variables:
  - ax_cv_have_{i}_ext
  - ax_cv_have_{i}_cpu_ext

The first is about whether said extension is available in the OS
(whatever that means), while the second is about whether the CPU
actually support that externsion.

As I understand it, we should only be concerned with the latter, but the
liquid-dsp configure.ac confuses the two and still checks the former.

So we still need to set both.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> resulting in the following build failure raised since bump to version
> 1.5.0 in commit c2aaa0fbe2fdf6e599c68169aa7b2e55237190c7 and
> https://github.com/jgaeddert/liquid-dsp/commit/02c4e8b99b11d9f1615b8840f243b08a85b86563:
> 
> src/dotprod/src/dotprod_cccf.sse.c: In function 'dotprod_cccf_execute_sse':
> src/dotprod/src/dotprod_cccf.sse.c:258:5: error: unknown type name '__m128'; did you mean '__int128'?
>   258 |     __m128 v;   // input vector
>       |     ^~~~~~
>       |     __int128
> 
> or
> 
> src/dotprod/src/dotprod_cccf.mmx.c: In function 'dotprod_cccf_execute_mmx':
> src/dotprod/src/dotprod_cccf.mmx.c:262:5: error: unknown type name '__m128'; did you mean '__int128'?
>   262 |     __m128 v;   // input vector
>       |     ^~~~~~
>       |     __int128
> 
> While at it, add AVX2 support
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/738ce9d3dc74ec165391f21256c955e5524f1632
>  - http://autobuild.buildroot.org/results/a2d150c724ab6787aeabaf31f65116f802e8584e
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> Changes v2 -> v3 (after review of Yann E. Morin):
>  - Keep current list format
> 
> Changes v1 -> v2:
>  - Keep old options (mmx, etc.) as they seem to be still used somewhere
>    in the code
> 
>  package/liquid-dsp/liquid-dsp.mk | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk
> index eb4cda67a5..ce4cd5a7a7 100644
> --- a/package/liquid-dsp/liquid-dsp.mk
> +++ b/package/liquid-dsp/liquid-dsp.mk
> @@ -13,13 +13,23 @@ LIQUID_DSP_AUTORECONF = YES
>  
>  LIQUID_DSP_CONF_ENV = \
>  	ax_cv_have_mmx_ext=$(if $(BR2_X86_CPU_HAS_MMX),yes,no) \
> +	ax_cv_have_mmx_cpu_ext=$(if $(BR2_X86_CPU_HAS_MMX),yes,no) \
>  	ax_cv_have_sse_ext=$(if $(BR2_X86_CPU_HAS_SSE),yes,no) \
> +	ax_cv_have_sse_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE),yes,no) \
>  	ax_cv_have_sse2_ext=$(if $(BR2_X86_CPU_HAS_SSE2),yes,no) \
> +	ax_cv_have_sse2_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE2),yes,no) \
>  	ax_cv_have_sse3_ext=$(if $(BR2_X86_CPU_HAS_SSE3),yes,no) \
> +	ax_cv_have_sse3_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE3),yes,no) \
>  	ax_cv_have_ssse3_ext=$(if $(BR2_X86_CPU_HAS_SSSE3),yes,no) \
> +	ax_cv_have_ssse3_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSSE3),yes,no) \
>  	ax_cv_have_sse41_ext=$(if $(BR2_X86_CPU_HAS_SSE4),yes,no) \
> +	ax_cv_have_sse41_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE4),yes,no) \
>  	ax_cv_have_sse42_ext=$(if $(BR2_X86_CPU_HAS_SSE42),yes,no) \
> -	ax_cv_have_avx_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no)
> +	ax_cv_have_sse42_cpu_ext=$(if $(BR2_X86_CPU_HAS_SSE42),yes,no) \
> +	ax_cv_have_avx_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no) \
> +	ax_cv_have_avx_cpu_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no) \
> +	ax_cv_have_avx2_ext=$(if $(BR2_X86_CPU_HAS_AVX2),yes,no) \
> +	ax_cv_have_avx2_cpu_ext=$(if $(BR2_X86_CPU_HAS_AVX2),yes,no)
>  
>  LIQUID_DSP_CFLAGS = $(TARGET_CFLAGS)
>  LIQUID_DSP_LDFLAGS = $(TARGET_LDFLAGS)
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3,1/1] package/liquid-dsp: fix x86 builds
  2024-01-08 21:14 [Buildroot] [PATCH v3,1/1] package/liquid-dsp: fix x86 builds Fabrice Fontaine
  2024-01-08 22:10 ` Yann E. MORIN
@ 2024-01-13 13:27 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-01-13 13:27 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Guillaume William Brs, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > HAVE_{MMX,SSE2,...} are not defined if ax_cv_have_{i}_cpu_ext is not set
 > resulting in the following build failure raised since bump to version
 > 1.5.0 in commit c2aaa0fbe2fdf6e599c68169aa7b2e55237190c7 and
 > https://github.com/jgaeddert/liquid-dsp/commit/02c4e8b99b11d9f1615b8840f243b08a85b86563:

 > src/dotprod/src/dotprod_cccf.sse.c: In function 'dotprod_cccf_execute_sse':
 > src/dotprod/src/dotprod_cccf.sse.c:258:5: error: unknown type name '__m128'; did you mean '__int128'?
 >   258 |     __m128 v;   // input vector
 >       |     ^~~~~~
 >       |     __int128

 > or

 > src/dotprod/src/dotprod_cccf.mmx.c: In function 'dotprod_cccf_execute_mmx':
 > src/dotprod/src/dotprod_cccf.mmx.c:262:5: error: unknown type name '__m128'; did you mean '__int128'?
 >   262 |     __m128 v;   // input vector
 >       |     ^~~~~~
 >       |     __int128

 > While at it, add AVX2 support

 > Fixes:
 >  - http://autobuild.buildroot.org/results/738ce9d3dc74ec165391f21256c955e5524f1632
 >  - http://autobuild.buildroot.org/results/a2d150c724ab6787aeabaf31f65116f802e8584e

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 > ---
 > Changes v2 -> v3 (after review of Yann E. Morin):
 >  - Keep current list format

 > Changes v1 -> v2:
 >  - Keep old options (mmx, etc.) as they seem to be still used somewhere
 >    in the code

Committed to 2023.11.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-01-13 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 21:14 [Buildroot] [PATCH v3,1/1] package/liquid-dsp: fix x86 builds Fabrice Fontaine
2024-01-08 22:10 ` Yann E. MORIN
2024-01-13 13:27 ` Peter Korsgaard

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