[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Disable movw/movt with clang
From: |
Andrei Borzenkov |
Subject: |
Disable movw/movt with clang |
Date: |
Sat, 28 Jan 2017 09:26:33 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
> diff --git a/configure.ac b/configure.ac
> index 4e980c5..ab7fa92 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1152,6 +1152,16 @@ if test "$target_cpu"-"$platform" = x86_64-efi; then
> fi
>
> if test "x$target_cpu" = xarm; then
> + AC_CACHE_CHECK([whether option -mllvm -arm-use-movt=0 works],
> grub_cv_cc_mllvm_arm_use_movt, [
> + CPPFLAGS="$TARGET_CPPFLAGS -mllvm -arm-use-movt=0 -Werror"
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
> + [grub_cv_cc_mllvm_arm_use_movt=yes],
> + [grub_cv_cc_mllvm_arm_use_movt=no])
> + ])
> + if test "x$grub_cv_cc_mllvm_arm_use_movt" = xyes; then
> + # A trick so that clang doesn't see it on link stage
> + TARGET_CPPFLAGS="$TARGET_CPPFLAGS -mllvm -arm-use-movt=0"
> + fi
> AC_CACHE_CHECK([whether option -mlong-calls works],
> grub_cv_cc_mlong_calls, [
> CFLAGS="$TARGET_CFLAGS -mlong-calls -Werror"
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
Is this option supported by all clang versions? What should we do if
this is *not* supported? As far as I understand commit message this
leads to broken code?
Is "-mllvm -arm-use-movt=0" different from "-mno-movt" which appears to
be "official" way to disable it?
- Disable movw/movt with clang,
Andrei Borzenkov <=