Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 1 | From eb486898dac8cbc29b2cc39f911b657c3417ae34 Mon Sep 17 00:00:00 2001 |
| 2 | From: Fangrui Song via Grub-devel <grub-devel@gnu.org> |
| 3 | Date: Thu, 26 Aug 2021 09:02:31 -0700 |
| 4 | Subject: [PATCH 1/2] configure: Remove obsoleted -malign-{jumps, loops, |
| 5 | functions} |
| 6 | MIME-Version: 1.0 |
| 7 | Content-Type: text/plain; charset=UTF-8 |
| 8 | Content-Transfer-Encoding: 8bit |
| 9 | |
| 10 | The GCC warns "cc1: warning: ‘-malign-loops’ is obsolete, use ‘-falign-loops’". |
| 11 | The Clang silently ignores -malign-{jumps,loops,functions}. |
| 12 | |
| 13 | The preferred -falign-* forms have been supported since GCC 3.2. So, just |
| 14 | remove -malign-{jumps,loops,functions}. |
| 15 | |
| 16 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=eb486898dac8cbc29b2cc39f911b657c3417ae34] |
| 17 | Signed-off-by: Fangrui Song <maskray@google.com> |
| 18 | Acked-by: Paul Menzel <pmenzel@molgen.mpg.de> |
| 19 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> |
| 20 | --- |
| 21 | configure.ac | 9 --------- |
| 22 | 1 file changed, 9 deletions(-) |
| 23 | |
| 24 | diff --git a/configure.ac b/configure.ac |
| 25 | index bee28dbeb..9a12151bd 100644 |
| 26 | --- a/configure.ac |
| 27 | +++ b/configure.ac |
| 28 | @@ -805,17 +805,8 @@ if test "x$target_cpu" = xi386; then |
| 29 | [grub_cv_cc_falign_loop=no]) |
| 30 | ]) |
| 31 | |
| 32 | - AC_CACHE_CHECK([whether -malign-loops works], [grub_cv_cc_malign_loop], [ |
| 33 | - CFLAGS="$TARGET_CFLAGS -malign-loops=1 -Werror" |
| 34 | - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
| 35 | - [grub_cv_cc_malign_loop=yes], |
| 36 | - [grub_cv_cc_malign_loop=no]) |
| 37 | - ]) |
| 38 | - |
| 39 | if test "x$grub_cv_cc_falign_loop" = xyes; then |
| 40 | TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" |
| 41 | - elif test "x$grub_cv_cc_malign_loop" = xyes; then |
| 42 | - TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" |
| 43 | fi |
| 44 | fi |
| 45 | |
| 46 | -- |
| 47 | 2.37.3 |
| 48 | |