]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
configure: Disable arm movw/movt relocations for GCC
authorLeif Lindholm <leif.lindholm@linaro.org>
Tue, 4 Jun 2019 11:39:16 +0000 (12:39 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 11 Jul 2019 15:49:54 +0000 (17:49 +0200)
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 <agraf@csgraf.de>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
configure.ac

index 629627cba7d175074b182cf56a7ab7482f114e16..23c555c26974345fbdc6fb116065f2ef70471859 100644 (file)
@@ -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