[Buildroot] [git commit] package/libdeflate: fix build with arm soft float

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Dec 27 19:56:11 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=c181878a84e9531f25d8dd1f5cb10b86f8bf9e51
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fix the following build failure with arm soft float raised since bump to
version 1.15 in commit c31087182fa545784d9a0a01f0b32715d78c3955 and
https://github.com/ebiggers/libdeflate/commit/84c76f6f2cf5e5ac4deca0b1c25faebb42469f58:

In file included from /home/autobuild/autobuild/instance-3/output-1/build/libdeflate-1.15/lib/arm/crc32_impl.h:256,
                 from /home/autobuild/autobuild/instance-3/output-1/build/libdeflate-1.15/lib/crc32.c:227:
/home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabi/11.3.0/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI.  Please use -mfloat-abi=softfp or -mfloat-abi=hard"
   31 | #error "NEON intrinsics not available with the soft-float ABI.  Please use -mfloat-abi=softfp or -mfloat-abi=hard"
      |  ^~~~~
In file included from /home/autobuild/autobuild/instance-3/output-1/build/libdeflate-1.15/lib/crc32.c:227:
/home/autobuild/autobuild/instance-3/output-1/build/libdeflate-1.15/lib/arm/crc32_impl.h: In function 'clmul_u32':
/home/autobuild/autobuild/instance-3/output-1/build/libdeflate-1.15/lib/arm/crc32_impl.h:262:9: error: unknown type name 'uint64x2_t'; did you mean 'uint16x2_t'?
  262 |         uint64x2_t res = vreinterpretq_u64_p128(
      |         ^~~~~~~~~~
      |         uint16x2_t

Fixes:
 - http://autobuild.buildroot.org/results/1445dcbf676893133f311a92ac21b29237fb75df

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 ...d-error-due-to-PMULL-enabled-without-NEON.patch | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/package/libdeflate/0002-lib-arm-cpu_features-fix-build-error-due-to-PMULL-enabled-without-NEON.patch b/package/libdeflate/0002-lib-arm-cpu_features-fix-build-error-due-to-PMULL-enabled-without-NEON.patch
new file mode 100644
index 0000000000..b13cbc48af
--- /dev/null
+++ b/package/libdeflate/0002-lib-arm-cpu_features-fix-build-error-due-to-PMULL-enabled-without-NEON.patch
@@ -0,0 +1,35 @@
+From 079a6dd171583c1953017b703ec63c5367a284b4 Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers3 at gmail.com>
+Date: Mon, 26 Dec 2022 11:32:47 -0800
+Subject: [PATCH] lib/arm/cpu_features: fix build error due to PMULL enabled
+ without NEON
+
+When building for soft float arm32, HAVE_PMULL_INTRIN is being set when
+it shouldn't be, causing a build error:
+
+    #error "NEON intrinsics not available with the soft-float ABI..."
+
+Fix this by making HAVE_PMULL_INTRIN depend on HAVE_NEON_INTRIN, as used
+to be the case, in order to get the 'defined(__ARM_FP)' dependency,
+
+Fixes https://github.com/ebiggers/libdeflate/issues/282
+Fixes: 84c76f6f2cf5 ("lib/arm: make crc32 code work with MSVC")
+[Retrieved from:
+https://github.com/ebiggers/libdeflate/commit/079a6dd171583c1953017b703ec63c5367a284b4]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+---
+ lib/arm/cpu_features.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/arm/cpu_features.h b/lib/arm/cpu_features.h
+index 4092eba8..edcf7359 100644
+--- a/lib/arm/cpu_features.h
++++ b/lib/arm/cpu_features.h
+@@ -97,6 +97,7 @@ static inline u32 get_arm_cpu_features(void) { return 0; }
+ #endif
+ #if HAVE_PMULL_NATIVE || \
+ 	(HAVE_DYNAMIC_ARM_CPU_FEATURES && \
++	 HAVE_NEON_INTRIN /* needed to exclude soft float arm32 case */ && \
+ 	 (GCC_PREREQ(6, 1) || __has_builtin(__builtin_neon_vmull_p64) || \
+ 	  defined(_MSC_VER)) && \
+ 	  /*



More information about the buildroot mailing list