grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Check -falign-jumps=1 -falign-functions=1 beside


From: Paul Menzel
Subject: Re: [PATCH] configure: Check -falign-jumps=1 -falign-functions=1 beside -falign-loops=1
Date: Tue, 24 Aug 2021 07:12:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Dear Fangrui,


Am 16.08.21 um 21:06 schrieb Fangrui Song via Grub-devel:
Clang 14.0.0 has implemented -falign-loops=1 but -falign-jumps=1 is
still unsupported. The check should test all flags which may be added

“alignment” flags?

into CFLAGS.

Signed-off-by: Fangrui Song <maskray@google.com>
---
  configure.ac | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index bee28dbeb..b2fd0c3e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -799,14 +799,14 @@ 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"
+    CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1 
-Werror"

I guess the `AC_CACHE_CHECK` description needs to be updated too?

Please mention in the commit message, why a separate check for each switch is not useful.

      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
          [grub_cv_cc_falign_loop=yes],
        [grub_cv_cc_falign_loop=no])
    ])
AC_CACHE_CHECK([whether -malign-loops works], [grub_cv_cc_malign_loop], [
-    CFLAGS="$TARGET_CFLAGS -malign-loops=1 -Werror"
+    CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1 
-Werror"
      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
          [grub_cv_cc_malign_loop=yes],
        [grub_cv_cc_malign_loop=no])


When you sent the v2, please include the maintainers listed in `MAINTAINERS` in the recipient list.


Kind regards,

Paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]