|
|
5593c8 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
5593c8 |
From: Peter Jones <pjones@redhat.com>
|
|
|
5593c8 |
Date: Thu, 2 Aug 2018 10:56:38 -0400
|
|
|
5593c8 |
Subject: [PATCH] Disable non-wordsize allocations on arm
|
|
|
5593c8 |
|
|
|
5593c8 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
5593c8 |
---
|
|
|
5593c8 |
configure.ac | 20 ++++++++++++++++++++
|
|
|
5593c8 |
1 file changed, 20 insertions(+)
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/configure.ac b/configure.ac
|
|
|
d3c3ab |
index 3405348178a..152e7dba652 100644
|
|
|
5593c8 |
--- a/configure.ac
|
|
|
5593c8 |
+++ b/configure.ac
|
|
|
5593c8 |
@@ -1288,6 +1288,26 @@ if test "x$target_cpu" = xarm; then
|
|
|
5593c8 |
done
|
|
|
5593c8 |
])
|
|
|
5593c8 |
|
|
|
5593c8 |
+ AC_CACHE_CHECK([for options to disable movt and movw relocations],
|
|
|
5593c8 |
+ grub_cv_target_cc_mword_relocations,
|
|
|
5593c8 |
+ [grub_cv_target_cc_mword_relocations=no
|
|
|
5593c8 |
+ for cand in "-mword-relocations" ; do
|
|
|
5593c8 |
+ if test x"$grub_cv_target_cc_mword_relocations" != xno ; then
|
|
|
5593c8 |
+ break
|
|
|
5593c8 |
+ fi
|
|
|
5593c8 |
+ CFLAGS="$TARGET_CFLAGS $cand -Werror"
|
|
|
5593c8 |
+ CPPFLAGS="$TARGET_CPPFLAGS"
|
|
|
5593c8 |
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
|
|
5593c8 |
+ [grub_cv_target_cc_mword_relocations="$cand"],
|
|
|
5593c8 |
+ [])
|
|
|
5593c8 |
+ done
|
|
|
5593c8 |
+ ])
|
|
|
5593c8 |
+ if test x"$grub_cv_target_cc_mword_relocations" = xno ; then
|
|
|
5593c8 |
+ AC_MSG_ERROR(["your compiler doesn't support disabling movw/movt relocations"])
|
|
|
5593c8 |
+ else
|
|
|
5593c8 |
+ TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mword_relocations"
|
|
|
5593c8 |
+ fi
|
|
|
5593c8 |
+
|
|
|
5593c8 |
if test x"$grub_cv_target_cc_mno_movt" != xno ; then
|
|
|
5593c8 |
# A trick so that clang doesn't see it on link stage
|
|
|
5593c8 |
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_movt"
|