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 <agraf@csgraf.de>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Leif Lindholm 2019-06-04 12:39:16 +01:00 committed by Daniel Kiper
parent f2b9083f85
commit 2d55ffecbb
1 changed files with 2 additions and 1 deletions

View 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