From 4b80abafd8d69df1e8ddbe04b20fc5c5f4fa8590 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Tue, 29 Jun 2021 11:04:35 -0500 Subject: [PATCH] trivial: don't use noclone attribute for cet checker on clang Clang doesn't support this --- plugins/cpu/meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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