From 9501bc80f5c34cd04bdc686cd74324beb452649e Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 7 Jan 2024 14:23:45 +0100 Subject: [PATCH] package/liquid-dsp: fix build without neon Fix the following build failure without neon raised since bump to version 1.4.0 in commit 2f7f8f381394207bfb029ec395f5ced5695a0a2e and https://github.com/jgaeddert/liquid-dsp/commit/c821187dd9af2758c8e3c82e95eaf041b8ac81a0: /home/peko/autobuild/instance-0/output-1/host/bin/arm-none-linux-gnueabi-gcc -std=gnu11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -D_FORTIFY_SOURCE=2 -ffast-math -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -Wall -fPIC -Wno-deprecated -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -Iinclude -c -o src/audio/src/cvsd.o src/audio/src/cvsd.c In file included from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/features.h:388:0, from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/stdlib.h:24, from src/libliquid.c:25: /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/gnu/stubs.h:10:29: fatal error: gnu/stubs-hard.h: No such file or directory # include ^ Indeed, upstream considers that NEON is available on all ARM platforms, and their configure.ac contains that code snippet: 239 arm|armv7*|armv8*) 240 # assume neon instructions are available 241 # TODO: check for Neon availability 242 243 # ARM architecture : use neon extensions Fixes: - http://autobuild.buildroot.org/results/36b3c2220c462e7a20262fd1b9064d9aeb6c9ec4 - http://autobuild.buildroot.org/results/881826b4b6c141e59a0da2d7d1ad55d3709fdb95 Signed-off-by: Fabrice Fontaine [yann.morin.1998@free.fr: - refactor with LIQUID_DSP_SIMDOVERRIDE - add comment about --disable-simdoverride - extend commit log with upstream code snippet ] Signed-off-by: Yann E. MORIN --- package/liquid-dsp/liquid-dsp.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk index ed0edacd94..eb4cda67a5 100644 --- a/package/liquid-dsp/liquid-dsp.mk +++ b/package/liquid-dsp/liquid-dsp.mk @@ -37,7 +37,18 @@ endif # disable altivec, it has build issues ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y) +LIQUID_DSP_SIMDOVERRIDE = y +endif + +# Upstream expects NEON on all ARM CPUs by default +ifeq ($(BR2_arm):$(BR2_ARM_FPU_NEON),y:) +LIQUID_DSP_SIMDOVERRIDE = y +endif + +ifeq ($(LIQUID_DSP_SIMDOVERRIDE),y) LIQUID_DSP_CONF_OPTS += --enable-simdoverride +# Do not add an else-clause to pass --disable-simdoverride, as it is +# non-functional, and behaves as --enable-simdoverride endif LIQUID_DSP_CONF_OPTS += \