From 63a45330cbf42d81d9f14525685fc7f715c6b8ac Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 22 Nov 2013 12:48:32 +0100 Subject: [PATCH] * configure.ac: Add -no-integrated-as on mips(el) to TARGET_CCASFLAGS when compiling with clang. --- ChangeLog | 5 +++++ configure.ac | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 37a4cec03..8b21400fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-22 Vladimir Serbinenko + + * configure.ac: Add -no-integrated-as on mips(el) to TARGET_CCASFLAGS + when compiling with clang. + 2013-11-22 Vladimir Serbinenko clang emits calls to abort () under some unknown conditions. diff --git a/configure.ac b/configure.ac index 9f8fb8a35..1df1e7ef4 100644 --- a/configure.ac +++ b/configure.ac @@ -486,7 +486,11 @@ AC_CACHE_CHECK([if compiling with clang], [grub_cv_cc_target_clang] # on x86 clang doesn't support .code16 # on arm clang doesn't support .arch directive -if test "x$grub_cv_cc_target_clang" = xyes && ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 || test "x$target_cpu" = xarm ); then +# on mips clang doesn't support privilegied instructions, doubleword store/load +# and crashes with hand-written assembly +if test "x$grub_cv_cc_target_clang" = xyes && ( test "x$target_cpu" = xi386 \ + || test "x$target_cpu" = xx86_64 || test "x$target_cpu" = xarm \ + || test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ); then TARGET_CCASFLAGS="$TARGET_CCASFLAGS -no-integrated-as" fi