From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Guillaume William Brs <guillaume.bressaix@gmail.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/liquid-dsp: fix x86 builds
Date: Mon, 8 Jan 2024 22:05:54 +0100 [thread overview]
Message-ID: <ZZxjsqX7RoYImDyL@landeda> (raw)
In-Reply-To: <20240108173249.12872-1-fontaine.fabrice@gmail.com>
Fabrice, All,
On 2024-01-08 18:32 +0100, Fabrice Fontaine spake thusly:
> 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 and drop options which had no effect
> (MMX, SSE, SSE42 and SSSE3)
>
> Fixes:
> - http://autobuild.buildroot.org/results/738ce9d3dc74ec165391f21256c955e5524f1632
> - http://autobuild.buildroot.org/results/a2d150c724ab6787aeabaf31f65116f802e8584e
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/liquid-dsp/liquid-dsp.mk | 40 ++++++++++++++++++++++++--------
> 1 file changed, 30 insertions(+), 10 deletions(-)
>
> diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk
> index eb4cda67a5..0e7653cb3f 100644
> --- a/package/liquid-dsp/liquid-dsp.mk
> +++ b/package/liquid-dsp/liquid-dsp.mk
> @@ -11,19 +11,39 @@ LIQUID_DSP_LICENSE_FILES = LICENSE
> LIQUID_DSP_INSTALL_STAGING = YES
> LIQUID_DSP_AUTORECONF = YES
>
> -LIQUID_DSP_CONF_ENV = \
> - ax_cv_have_mmx_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_sse2_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_ssse3_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_sse42_ext=$(if $(BR2_X86_CPU_HAS_SSE42),yes,no) \
> - ax_cv_have_avx_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no)
Why don't you just update this list in the same format? We do have that
kind of formatting elsewhere (eg. opencv3 and opencv4) and it is less
verbose than the alternative...
Regards,
Yann E. MORIN.
> LIQUID_DSP_CFLAGS = $(TARGET_CFLAGS)
> LIQUID_DSP_LDFLAGS = $(TARGET_LDFLAGS)
>
> +ifeq ($(BR2_X86_CPU_HAS_AVX),y)
> +LIQUID_DSP_CONF_ENV += ax_cv_have_avx_ext=yes ax_cv_have_avx_cpu_ext=yes
> +else
> +LIQUID_DSP_CONF_ENV += ax_cv_have_avx_ext=no ax_cv_have_avx_cpu_ext=no
> +endif
> +
> +ifeq ($(BR2_X86_CPU_HAS_AVX2),y)
> +LIQUID_DSP_CONF_ENV += ax_cv_have_avx2_ext=yes ax_cv_have_avx2_cpu_ext=yes
> +else
> +LIQUID_DSP_CONF_ENV += ax_cv_have_avx2_ext=no ax_cv_have_avx2_cpu_ext=no
> +endif
> +
> +ifeq ($(BR2_X86_CPU_HAS_SSE2),y)
> +LIQUID_DSP_CONF_ENV += ax_cv_have_sse2_ext=yes ax_cv_have_sse2_cpu_ext=yes
> +else
> +LIQUID_DSP_CONF_ENV += ax_cv_have_sse2_ext=no ax_cv_have_sse2_cpu_ext=no
> +endif
> +
> +ifeq ($(BR2_X86_CPU_HAS_SSE3),y)
> +LIQUID_DSP_CONF_ENV += ax_cv_have_sse3_ext=yes ax_cv_have_sse3_cpu_ext=yes
> +else
> +LIQUID_DSP_CONF_ENV += ax_cv_have_sse3_ext=no ax_cv_have_sse3_cpu_ext=no
> +endif
> +
> +ifeq ($(BR2_X86_CPU_HAS_SSE4),y)
> +LIQUID_DSP_CONF_ENV += ax_cv_have_sse41_ext=yes ax_cv_have_sse41_cpu_ext=yes
> +else
> +LIQUID_DSP_CONF_ENV += ax_cv_have_sse41_ext=no ax_cv_have_sse41_cpu_ext=no
> +endif
> +
> # Speed over accuracy trade off
> ifeq ($(BR2_PACKAGE_LIQUID_DSP_FAST),y)
> LIQUID_DSP_CFLAGS += -ffast-math
> --
> 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
prev parent reply other threads:[~2024-01-08 21:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 17:32 [Buildroot] [PATCH 1/1] package/liquid-dsp: fix x86 builds Fabrice Fontaine
2024-01-08 21:05 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZZxjsqX7RoYImDyL@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=guillaume.bressaix@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.