diff --git a/srcpkgs/python3-numpy/patches/38edef779f9cfa353a0f3ceb598895810ce405e6.patch b/srcpkgs/python3-numpy/patches/38edef779f9cfa353a0f3ceb598895810ce405e6.patch new file mode 100644 index 00000000000..2a14521ad76 --- /dev/null +++ b/srcpkgs/python3-numpy/patches/38edef779f9cfa353a0f3ceb598895810ce405e6.patch @@ -0,0 +1,35 @@ +From 38edef779f9cfa353a0f3ceb598895810ce405e6 Mon Sep 17 00:00:00 2001 +From: Sayed Adel +Date: Mon, 18 Sep 2023 10:12:35 +0400 +Subject: [PATCH] BLD, BUG: Fix build failure for host flags e.g. + `-march=native` on unsupported architectures + +--- + meson_cpu/meson.build | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/meson_cpu/meson.build b/meson_cpu/meson.build +index 97b33c461b9..ed2313bc6a6 100644 +--- a/meson_cpu/meson.build ++++ b/meson_cpu/meson.build +@@ -98,7 +98,7 @@ if host_machine.endian() == 'little' and cpu_family == 'ppc64' + min_features = [VSX2] + endif + +-# Used by build option 'max' ++# Used by build option 'max/native/detect' + max_features_dict = { + 'x86': X86_FEATURES, + 'x86_64': X86_FEATURES, +@@ -111,6 +111,11 @@ max_features = [] + foreach fet_name, fet_obj : max_features_dict + max_features += [fet_obj] + endforeach ++if max_features.length() == 0 ++ message('Disabling CPU feature detection due to unsupported architecture: "' + cpu_family + '"') ++ CPU_CONF_BASELINE = 'none' ++ CPU_CONF_DISPATCH = 'none' ++endif + + parse_options = { + 'cpu-baseline': CPU_CONF_BASELINE,