From: Jan Janssen Date: Fri, 13 May 2022 12:25:32 +0000 (+0200) Subject: boot: Build with -flto=auto if available X-Git-Tag: v252-rc1~953 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d4953de131657c43c897e4b3ea65d71f380dc34;p=thirdparty%2Fsystemd.git boot: Build with -flto=auto if available Without this, we may get the following warning with gcc-12: lto-wrapper: warning: using serial compilation of 2 LTRANS jobs --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 299a01b9be7..e17669478f7 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -223,7 +223,7 @@ if get_option('b_ndebug') == 'true' or ( efi_cflags += ['-DNDEBUG'] endif if get_option('b_lto') - efi_cflags += ['-flto'] + efi_cflags += cc.has_argument('-flto=auto') ? ['-flto=auto'] : ['-flto'] endif foreach arg : get_option('c_args')