From c4b305079d70790ee9d34a25a2f70759ece96f0d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 27 Mar 2025 09:28:21 -0400 Subject: [PATCH] meson: Simplify the power8 optimization logic If it compiles, it works. And there's not a particularly good reason to disable it, so don't let people disable it. Reviewed-by: Alyssa Rosenzweig Acked-by: Dylan Baker Part-of: --- meson.build | 33 ++++++++++++--------------------- meson.options | 3 ++- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/meson.build b/meson.build index 502dd8aaf63..58194e73b1f 100644 --- a/meson.build +++ b/meson.build @@ -721,27 +721,18 @@ if with_gallium_st_d3d10umd error('The d3d10umd state tracker requires gallium softpipe/llvmpipe.') endif endif -_power8 = get_option('power8') -if _power8.allowed() - if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little' - if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.8') - error('Altivec is not supported with gcc version < 4.8.') - endif - if cc.compiles(''' - #include - int main() { - vector unsigned char r; - vector unsigned int v = vec_splat_u32 (1); - r = __builtin_vec_vgbbd ((vector unsigned char) v); - return 0; - }''', - args : '-mpower8-vector', - name : 'POWER8 intrinsics') - pre_args += ['-D_ARCH_PWR8'] - c_cpp_args += '-mpower8-vector' - elif _power8.enabled() - error('POWER8 intrinsic support required but not found.') - endif + +if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little' + if cc.compiles(''' + #include + int main() { + vector unsigned char r; + vector unsigned int v = vec_splat_u32 (1); + r = __builtin_vec_vgbbd ((vector unsigned char) v); + return 0; + }''', + name : 'POWER8 intrinsics') + pre_args += ['-D_ARCH_PWR8'] endif endif diff --git a/meson.options b/meson.options index 84c09bc7d6e..18da31eff50 100644 --- a/meson.options +++ b/meson.options @@ -547,7 +547,8 @@ option( 'power8', type : 'feature', deprecated: {'true': 'enabled', 'false': 'disabled'}, - description : 'Enable power8 optimizations.', + description : 'Does nothing, left here for a while to avoid build breakages.', + deprecated: true, ) option(