From: Gwenhael Goavec-Merou Date: Fri, 30 Oct 2020 14:29:45 +0000 (+0100) Subject: package/uhd: fix build with ARM without NEON X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b07de37540ee34e4e5fa8586ecc40da1586cd940;p=buildroot.git package/uhd: fix build with ARM without NEON UHD has two issues with ARM: 1/ NEON_SIMD_ENABLE is always enabled when architecture is ARM. But NEON isn't necessarily support in the CPU 2/ when NEON is supported -mfpu=neon must be passed to the compiler (not automatically done by UHD) Fixes: - http://autobuild.buildroot.net/results/2519bd075b8c021b440677297b32f16b1c3cc3dd/ - http://autobuild.buildroot.net/results/99d9979be4f37c42390c87b1afd4cd33bac07f5e/ - http://autobuild.buildroot.net/results/cabc7a87ee869d6bac7d092c1a4fcfcdac22a96e/ Signed-off-by: Gwenhael Goavec-Merou Signed-off-by: Yann E. MORIN --- diff --git a/package/uhd/uhd.mk b/package/uhd/uhd.mk index ec0ec03e9f..adb7579019 100644 --- a/package/uhd/uhd.mk +++ b/package/uhd/uhd.mk @@ -38,6 +38,17 @@ UHD_CONF_OPTS = \ -DENABLE_UTILS=OFF \ -DENABLE_X300=OFF +# As soon as architecture is ARM, uhd will try to use NEON. +# But not all ARM cores have NEON support. +# When CPU support NEON -mfpu=neon must be added to CXX_FLAGS +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +UHD_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -mfpu=neon" +UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=ON +else +UHD_CONF_OPTS += -Dhave_mfpu_neon=0 +UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=OFF +endif + ifeq ($(BR2_PACKAGE_ORC),y) UHD_DEPENDENCIES += orc endif