Don't add -mflush-func if it's not supported by compiler.
This commit is contained in:
parent
1bba40f578
commit
f93ddcfd1c
3 changed files with 19 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-11-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Don't add -mflush-func if it's not supported by compiler.
|
||||
|
||||
2013-11-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Move common BIOS/coreboot memory map declarations to
|
||||
|
|
|
@ -10,9 +10,6 @@ if COND_mips_loongson
|
|||
CFLAGS_PLATFORM += -mexplicit-relocs
|
||||
CPPFLAGS_PLATFORM = -DUSE_ASCII_FALLBACK
|
||||
endif
|
||||
if COND_mips
|
||||
CFLAGS_PLATFORM += -mflush-func=grub_red_herring
|
||||
endif
|
||||
if COND_sparc64_ieee1275
|
||||
CFLAGS_PLATFORM += -mno-app-regs
|
||||
LDFLAGS_PLATFORM = -Wl,-melf64_sparc -mno-relax
|
||||
|
|
15
configure.ac
15
configure.ac
|
@ -520,6 +520,21 @@ if test "x$grub_cv_cc_target_clang" = xno && test "x$target_cpu" = xi386 && test
|
|||
TARGET_CFLAGS="$TARGET_CFLAGS -mrtd -mregparm=3"
|
||||
fi
|
||||
|
||||
# on mips redirect cache flushing function to non-existant one.
|
||||
if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
|
||||
AC_CACHE_CHECK([whether -mflush-func=grub_red_herring works], [grub_cv_cc_mflush_func], [
|
||||
CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_mflush_func=yes],
|
||||
[grub_cv_cc_mflush_func=no])
|
||||
])
|
||||
|
||||
if test "x$grub_cv_cc_mflush_func" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Force no alignment to save space on i386.
|
||||
if test "x$target_cpu" = xi386; then
|
||||
AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
|
||||
|
|
Loading…
Reference in a new issue