From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mIPs8-0003kb-OB for mharc-grub-devel@gnu.org; Tue, 24 Aug 2021 02:25:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIPs6-0003iS-MU for grub-devel@gnu.org; Tue, 24 Aug 2021 02:25:18 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:55409 helo=mx1.molgen.mpg.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIPs4-0000Nh-OK for grub-devel@gnu.org; Tue, 24 Aug 2021 02:25:18 -0400 Received: from [192.168.0.7] (ip5f5aeda5.dynamic.kabel-deutschland.de [95.90.237.165]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 5A17361E64784; Tue, 24 Aug 2021 08:25:15 +0200 (CEST) Subject: Re: [PATCH 2/2] configure: Check -falign-jumps=1 -falign-functions=1 beside -falign-loops=1 To: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Cc: grub-devel@gnu.org, Daniel Kiper , Alex Burmashev , Vladimir 'phcoder' Serbinenko References: <20210824061838.3569412-1-maskray@google.com> <20210824061838.3569412-3-maskray@google.com> From: Paul Menzel Message-ID: <7f83107f-fcf7-9225-26b4-0180badb18b1@molgen.mpg.de> Date: Tue, 24 Aug 2021 08:25:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210824061838.3569412-3-maskray@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=141.14.17.11; envelope-from=pmenzel@molgen.mpg.de; helo=mx1.molgen.mpg.de X-Spam_score_int: -61 X-Spam_score: -6.2 X-Spam_bar: ------ X-Spam_report: (-6.2 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-2.023, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 06:25:18 -0000 Dear Fāng-ruì, Am 24.08.21 um 08:18 schrieb Fangrui Song via Grub-devel: > Clang does not support -falign-jumps and only recently gained support > for -falign-loops. Test all the alignment options to avoid passing > unrecognized options to Clang: > > clang-14: error: optimization flag '-falign-jumps=1' is not supported [-Werror,-Wignored-optimization-argument] > > When compiled with older Clang, the alignment options are not added, so > just avoid the complexity for each option. > > Signed-off-by: Fangrui Song > --- > configure.ac | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 9a12151bd..8625e6776 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -798,8 +798,9 @@ fi > > # Force no alignment to save space on i386. > if test "x$target_cpu" = xi386; then > - AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [ > - CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror" > + AC_CACHE_CHECK([whether -falign-jumps=1 -falign-loops=1 -falign-functions=1 works], > + [grub_cv_cc_falign_loop], [ > + CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Werror" > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], > [grub_cv_cc_falign_loop=yes], > [grub_cv_cc_falign_loop=no]) > Acked-by: Paul Menzel Kind regards, Paul