From 2d55ffecbb966d3e42023729d8bbf3c21c59e049 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Tue, 4 Jun 2019 12:39:16 +0100 Subject: [PATCH] configure: Disable arm movw/movt relocations for GCC When building for arm, we already disable movw/movt relocations for clang, since they are incompatible with PE. When building with bare metal GCC toolchains (like the one used in the travis ci scripts), we end up with these relocations again. So add an additional test for the '-mword-relocations' flag used by GCC. Reported-by: Alexander Graf Signed-off-by: Leif Lindholm Reviewed-by: Daniel Kiper --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 629627cba..23c555c26 100644 --- a/configure.ac +++ b/configure.ac @@ -1198,7 +1198,8 @@ if test "x$target_cpu" = xarm; then AC_CACHE_CHECK([for options to disable movt and movw], grub_cv_target_cc_mno_movt, [ grub_cv_target_cc_mno_movt=no for cand in "-mno-movt" \ - "-mllvm -arm-use-movt=0"; do + "-mllvm -arm-use-movt=0" \ + "-mword-relocations"; do if test x"$grub_cv_target_cc_mno_movt" != xno ; then break fi