]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
python3-numpy: Always use libgcc for unwinder on aarch64
authorKhem Raj <raj.khem@gmail.com>
Thu, 7 Aug 2025 04:35:54 +0000 (21:35 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Aug 2025 17:03:13 +0000 (18:03 +0100)
With libgcc (working):

Result: inf
Warnings: ['overflow encountered in cast']

With compiler-rt (failing):

Result: inf (probably still correct)
Warnings: [] (no warnings generated)

The issue is likely that compiler-rt on AArch64 doesn't trigger
the floating-point exceptions that NumPy expects for overflow
detection in type casting operations.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-devtools/python/python3-numpy_2.3.1.bb

index bc718d37c4d483f16947bc8149a96193f9bfc152..ed41d03e6b5bceb28585b5551fc25f888d6ad925 100644 (file)
@@ -23,6 +23,9 @@ S = "${UNPACKDIR}/numpy-${PV}"
 
 PACKAGECONFIG[svml] = "-Ddisable-svml=false,-Ddisable-svml=true"
 
+# the overflow tests fail with compiler-rt on aarch64
+LDFLAGS:append:toolchain-clang:aarch64 = " -rtlib=libgcc -unwindlib=libgcc"
+
 # Remove references to buildpaths from numpy's __config__.py
 do_install:append() {
     sed -i \