configure: Add -mno-gpopt option for mips and mipsel targets
Without it compiler generates GPREL16 references which do not work with our memory layout. Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
f0710d2d8f
commit
648f2d16c0
11
configure.ac
11
configure.ac
@ -802,6 +802,17 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
|
||||
if test "x$grub_cv_cc_mflush_func" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether -mno-gpopt works], [grub_cv_cc_mno_gpopt], [
|
||||
CFLAGS="$TARGET_CFLAGS -mno-gpopt -Werror"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_mno_gpopt=yes],
|
||||
[grub_cv_cc_mno_gpopt=no])
|
||||
])
|
||||
|
||||
if test "x$grub_cv_cc_mno_gpopt" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mno-gpopt"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user