Don't add -mlong-calls when compiling with clang.
This commit is contained in:
parent
896f483d49
commit
4182262560
3 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-12-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Don't add -mlong-calls when compiling with clang.
|
||||
|
||||
2013-12-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* configure.ac: Fix a typo.
|
||||
|
|
|
@ -11,7 +11,7 @@ if COND_sparc64_ieee1275
|
|||
LDFLAGS_PLATFORM = -Wl,-melf64_sparc -mno-relax
|
||||
endif
|
||||
if COND_arm
|
||||
CFLAGS_PLATFORM += -mthumb-interwork -mlong-calls
|
||||
CFLAGS_PLATFORM += -mthumb-interwork
|
||||
CCASFLAGS_PLATFORM = -mthumb-interwork
|
||||
LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
|
||||
endif
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -848,6 +848,18 @@ if test "$target_cpu"-"$platform" = x86_64-efi; then
|
|||
TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone"
|
||||
fi
|
||||
|
||||
if test "x$target_cpu" = xarm; then
|
||||
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([[]], [[]])],
|
||||
[grub_cv_cc_mlong_calls=yes],
|
||||
[grub_cv_cc_mlong_calls=no])
|
||||
])
|
||||
if test "x$grub_cv_cc_mlong_calls" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mlong-calls"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Compiler features.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue