diff --git a/plugins/cpu/meson.build b/plugins/cpu/meson.build index 3954904e2..72b5a05cb 100644 --- a/plugins/cpu/meson.build +++ b/plugins/cpu/meson.build @@ -27,10 +27,16 @@ shared_module('fu_plugin_cpu', ], ) +code = ''' +#if !__has_attribute (__noclone__) +#error symver attribute not supported +#endif +static void __attribute__((noinline,noclone)) f(void) {} +''' + # verify the compiler knows what to do if cc.has_argument('-fcf-protection') - build_fwupdcethelper = cc.compiles( - 'static void __attribute__((noinline,noclone)) f(void) {}', + build_fwupdcethelper = cc.compiles(code, name : '__attribute__((noinline,noclone))', ) else