package/liquid-dsp: fix x86 builds
PATCH v2 1/1 package/liquid-dsp: fix x86 builds
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
| ^~~~~~
| __int128or
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
| ^~~~~~
| __int128While at it, add AVX2 support
Fixes:
- http://autobuild.buildroot.org/results/738ce9d3dc74ec165391f21256c955e5524f1632
- http://autobuild.buildroot.org/results/a2d150c724ab6787aeabaf31f65116f802e8584e
---
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 | 64 +++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 10 deletions(-)
package/liquid-dsp/liquid-dsp.mk +54 -10
@@ -11,19 +11,63 @@ 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) - 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_MMX),y) +LIQUID_DSP_CONF_ENV += ax_cv_have_mmx_ext=yes ax_cv_have_mmx_cpu_ext=yes +else +LIQUID_DSP_CONF_ENV += ax_cv_have_mmx_ext=no ax_cv_have_mmx_cpu_ext=no +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +LIQUID_DSP_CONF_ENV += ax_cv_have_sse_ext=yes ax_cv_have_sse_cpu_ext=yes +else +LIQUID_DSP_CONF_ENV += ax_cv_have_sse_ext=no ax_cv_have_sse_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_SSSE3),y) +LIQUID_DSP_CONF_ENV += ax_cv_have_ssse3_ext=yes ax_cv_have_ssse3_cpu_ext=yes +else +LIQUID_DSP_CONF_ENV += ax_cv_have_ssse3_ext=no ax_cv_have_ssse3_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 + +ifeq ($(BR2_X86_CPU_HAS_SSE42),y) +LIQUID_DSP_CONF_ENV += ax_cv_have_sse42_ext=yes ax_cv_have_sse42_cpu_ext=yes +else +LIQUID_DSP_CONF_ENV += ax_cv_have_sse42_ext=no ax_cv_have_sse42_cpu_ext=no +endif + # Speed over accuracy trade off ifeq ($(BR2_PACKAGE_LIQUID_DSP_FAST),y) LIQUID_DSP_CFLAGS += -ffast-math
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot