mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 23:59:22 +00:00
Allow compilation without thumb-interwork as long as no thumb is
involved or only thumb2 is used.
This commit is contained in:
1 parent
063f2a04d1
commit
a29f317af1
4 files changed
+29
-2
No files matched your search
@@ -871,6 +871,29 @@ if test "x$target_cpu" = xarm; then
|
||||
if test "x$grub_cv_cc_mlong_calls" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mlong-calls"
|
||||
fi
|
||||
AC_CACHE_CHECK([whether option -mthumb-interwork works], grub_cv_cc_mthumb_interwork, [
|
||||
CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_mthumb_interwork=yes],
|
||||
[grub_cv_cc_mthumb_interwork=no])
|
||||
])
|
||||
if test "x$grub_cv_cc_mthumb_interwork" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
|
||||
elif test "x$grub_cv_cc_target_clang" = xno ; then
|
||||
AC_MSG_ERROR([your compiler doesn't support -mthumb-interwork])
|
||||
else
|
||||
CFLAGS="$TARGET_CFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
#if defined (__thumb__) && !defined (__thumb2__)
|
||||
#error thumb without interworking
|
||||
#endif
|
||||
]])],
|
||||
[no_interwork_ok=yes],
|
||||
[no_interwork_ok=no])
|
||||
if test x$no_interwork_ok = xno ; then
|
||||
AC_MSG_ERROR([attempt to compile to thumb with no thumb interwork])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user