diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-08-13 19:01:40 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-08-13 19:01:40 +0000 |
| commit | de7fa9c41ec64be7f82b1241e35a550461771db0 (patch) | |
| tree | 27604b0f4790a73447095359a54d1b6a7238277f /dev-python/numpy/files/numpy-2.3.2-no-detect.patch | |
| parent | 35b3f4e55de0c283a0a9607e5cfc46f08cb5eb16 (diff) | |
| download | baldeagleos-repo-de7fa9c41ec64be7f82b1241e35a550461771db0.tar.gz baldeagleos-repo-de7fa9c41ec64be7f82b1241e35a550461771db0.tar.xz baldeagleos-repo-de7fa9c41ec64be7f82b1241e35a550461771db0.zip | |
Adding metadata
Diffstat (limited to 'dev-python/numpy/files/numpy-2.3.2-no-detect.patch')
| -rw-r--r-- | dev-python/numpy/files/numpy-2.3.2-no-detect.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/numpy/files/numpy-2.3.2-no-detect.patch b/dev-python/numpy/files/numpy-2.3.2-no-detect.patch new file mode 100644 index 000000000000..91ed2aa8f1e5 --- /dev/null +++ b/dev-python/numpy/files/numpy-2.3.2-no-detect.patch @@ -0,0 +1,72 @@ +From 5591f1109b45a482bdaea3d3e44a80212a188edd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@quansight.com> +Date: Mon, 28 Jul 2025 21:33:18 +0200 +Subject: [PATCH 1/2] BLD: provide explicit control over cpu-baseline detection +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add a new `cpu-baseline-detect` feature flag that can be used to more +precisely control the use of CPU baseline detection. This can be used +by packages to more precisely control used SIMD code independently +of compiler flags specified. The option follows typical feature +semantics -- with `auto` preserving the current behavior of enabling +when relevant compiler flags are found, `enabled` forcing it on +based on the implicit compiler defaults, and `disabled` forcing it off. + +Signed-off-by: Michał Górny <mgorny@quansight.com> +--- + meson.options | 2 ++ + meson_cpu/meson.build | 22 ++++++++++++---------- + 2 files changed, 14 insertions(+), 10 deletions(-) + +diff --git a/meson.options b/meson.options +index b09992fe9b91..f17f9901664a 100644 +--- a/meson.options ++++ b/meson.options +@@ -28,6 +28,8 @@ option('disable-optimization', type: 'boolean', value: false, + description: 'Disable CPU optimized code (dispatch,simd,unroll...)') + option('cpu-baseline', type: 'string', value: 'min', + description: 'Minimal set of required CPU features') ++option('cpu-baseline-detect', type: 'feature', value: 'auto', ++ description: 'Detect CPU baseline from the compiler flags') + option('cpu-dispatch', type: 'string', value: 'max -xop -fma4', + description: 'Dispatched set of additional CPU features') + option('test-simd', type: 'array', +diff --git a/meson_cpu/meson.build b/meson_cpu/meson.build +index e5b6d0fbe7be..1c4c6eecb308 100644 +--- a/meson_cpu/meson.build ++++ b/meson_cpu/meson.build +@@ -46,20 +46,22 @@ if get_option('disable-optimization') + CPU_CONF_BASELINE = 'none' + CPU_CONF_DISPATCH = 'none' + else +- baseline_detect = false ++ baseline_detect = get_option('cpu-baseline-detect').enabled() + c_args = get_option('c_args') +- foreach arg : c_args +- foreach carch : ['-march', '-mcpu', '-xhost', '/QxHost'] +- if arg.contains(carch) +- message('Appending option "detect" to "cpu-baseline" due to detecting global architecture c_arg "' + arg + '"') +- baseline_detect = true ++ if get_option('cpu-baseline-detect').auto() ++ foreach arg : c_args ++ foreach carch : ['-march', '-mcpu', '-xhost', '/QxHost'] ++ if arg.contains(carch) ++ message('Appending option "detect" to "cpu-baseline" due to detecting global architecture c_arg "' + arg + '"') ++ baseline_detect = true ++ break ++ endif ++ endforeach ++ if baseline_detect + break + endif + endforeach +- if baseline_detect +- break +- endif +- endforeach ++ endif + # The required minimal set of required CPU features. + CPU_CONF_BASELINE = get_option('cpu-baseline') + if baseline_detect |
