All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: "Fāng-ruì Sòng" <maskray@google.com>
Cc: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>,
	Alex Burmashev <alexander.burmashev@oracle.com>,
	Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Subject: Re: [PATCH 2/2] configure: Check -falign-jumps=1 -falign-functions=1 beside -falign-loops=1
Date: Tue, 24 Aug 2021 08:25:15 +0200	[thread overview]
Message-ID: <7f83107f-fcf7-9225-26b4-0180badb18b1@molgen.mpg.de> (raw)
In-Reply-To: <20210824061838.3569412-3-maskray@google.com>

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 <maskray@google.com>
> ---
>   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 <pmenzel@molgen.mpg.de>


Kind regards,

Paul


  reply	other threads:[~2021-08-24  6:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24  6:18 [PATCH 0/2] configure: Remove -malign-* and fix Clang 14 breakage Fangrui Song
2021-08-24  6:18 ` [PATCH 1/2] configure: Remove obsoleted -malign-{jumps, loops, functions} Fangrui Song
2021-08-24  6:24   ` Paul Menzel
2021-08-25 13:19     ` Daniel Kiper
2021-08-24  6:18 ` [PATCH 2/2] configure: Check -falign-jumps=1 -falign-functions=1 beside -falign-loops=1 Fangrui Song
2021-08-24  6:25   ` Paul Menzel [this message]
2021-08-25 13:24   ` Daniel Kiper
2021-08-25 16:34     ` Fangrui Song
2021-08-26 14:13       ` Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f83107f-fcf7-9225-26b4-0180badb18b1@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=alexander.burmashev@oracle.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=maskray@google.com \
    --cc=phcoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.