diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2022-12-21 16:18:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 16:18:48 +0100 |
commit | 1d2551e34ae8f601b6c5f43b30cf3ba25c517724 (patch) | |
tree | 2be677b7b9554712902f1f0d2d6f64a683fe2f12 | |
parent | 0d1bb8e42228776dc8d35bdcfacf2ff3af366ade (diff) | |
parent | c3cc6814ed47623bc9d2303922c99177ed1e2bc1 (diff) | |
download | numpy-1d2551e34ae8f601b6c5f43b30cf3ba25c517724.tar.gz |
Merge pull request #22856 from seberg/issue-22811
BLD: Help raspian arm + clang 13 about `__builtin_mul_overflow`
[ci skip]
-rw-r--r-- | numpy/core/meson.build | 3 | ||||
-rw-r--r-- | numpy/core/setup_common.py | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/numpy/core/meson.build b/numpy/core/meson.build index 3f149c15c..bab33991b 100644 --- a/numpy/core/meson.build +++ b/numpy/core/meson.build @@ -315,7 +315,8 @@ optional_intrinsics = [ ['__builtin_bswap32', '5u', [], []], ['__builtin_bswap64', '5u', [], []], ['__builtin_expect', '5, 0', [], []], - ['__builtin_mul_overflow', '5, 5, (int*)5', [], []], + # Test `long long` for arm+clang 13 (gh-22811, but we use all versions): + ['__builtin_mul_overflow', '(long long)5, 5, (int*)5', [], []], ] if host_machine.cpu_family() in ['x86', 'x86_64'] optional_intrinsics += [ diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index 085c0baf5..d5e75a3ef 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -129,7 +129,7 @@ MANDATORY_FUNCS = [ "floor", "ceil", "sqrt", "log10", "log", "exp", "asin", "acos", "atan", "fmod", 'modf', 'frexp', 'ldexp', "expm1", "log1p", "acosh", "asinh", "atanh", - "rint", "trunc", "exp2", + "rint", "trunc", "exp2", "copysign", "nextafter", "strtoll", "strtoull", "cbrt", "log2", "pow", "hypot", "atan2", "csin", "csinh", "ccos", "ccosh", "ctan", "ctanh", @@ -178,7 +178,9 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'), ("__builtin_bswap32", '5u'), ("__builtin_bswap64", '5u'), ("__builtin_expect", '5, 0'), - ("__builtin_mul_overflow", '5, 5, (int*)5'), + # Test `long long` for arm+clang 13 (gh-22811, + # but we use all versions of __builtin_mul_overflow): + ("__builtin_mul_overflow", '(long long)5, 5, (int*)5'), # MMX only needed for icc, but some clangs don't have it ("_m_from_int64", '0', "emmintrin.h"), ("_mm_load_ps", '(float*)0', "xmmintrin.h"), # SSE |