+2010-11-07 Robert Millan <rmh@gnu.org>
+
+ On mips-yeeloong, build with -march=loongson2f when this flag is
+ available (GCC >= 4.4).
+ * conf/Makefile.common [COND_mips_yeeloong] (CFLAGS_PLATFORM): Remove
+ `-march=mips3'.
+ * configure.ac: For mips-yeeloong, add -march=loongson2f if available,
+ or otherwise add -march=mips3.
+
2010-11-07 BVK Chaitanya <bvk.groups@gmail.com>
Suppress shell expansion on echo '*' and echo "*" like cases.
CFLAGS_PLATFORM += -mrtd -mregparm=3
endif
if COND_mips_yeeloong
- CFLAGS_PLATFORM += -march=mips3 -mexplicit-relocs
+ CFLAGS_PLATFORM += -mexplicit-relocs
CPPFLAGS_PLATFORM = -DUSE_ASCII_FAILBACK
CCASFLAGS_PLATFORM = -march=mips3
endif
TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
fi
+if test "${target_cpu}-${platform}" = mips-yeeloong; then
+ AC_CACHE_CHECK([whether -march=loongson2f works], [grub_cv_cc_march_loongson2f], [
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -march=loongson2f"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_march_loongson2f=yes],
+ [grub_cv_cc_march_loongson2f=no])
+ CFLAGS="$SAVE_CFLAGS"
+ ])
+
+ if test "x$grub_cv_cc_march_loongson2f" = xyes; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -march=loongson2f"
+ else
+ TARGET_CFLAGS="$TARGET_CFLAGS -march=mips3"
+ fi
+fi
+
grub_apple_target_cc
if test x$grub_cv_apple_target_cc = xyes ; then
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DAPPLE_CC=1"