Add missing compile and link options for sparc64-emu.

This commit is contained in:
Vladimir Serbinenko 2013-12-10 00:05:28 +01:00
parent 7a148da6dd
commit eaf01c25fe
3 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2013-12-09 Vladimir Serbinenko <phcoder@gmail.com>
Add missing compile and link options for sparc64-emu.
2013-12-09 Vladimir Serbinenko <phcoder@gmail.com> 2013-12-09 Vladimir Serbinenko <phcoder@gmail.com>
Implement sparc64 trampolines (needed for sparc64-emu). Implement sparc64 trampolines (needed for sparc64-emu).

View File

@ -10,6 +10,10 @@ if COND_sparc64_ieee1275
CFLAGS_PLATFORM += -mno-app-regs CFLAGS_PLATFORM += -mno-app-regs
LDFLAGS_PLATFORM = -Wl,-melf64_sparc -mno-relax LDFLAGS_PLATFORM = -Wl,-melf64_sparc -mno-relax
endif endif
if COND_sparc64_emu
CFLAGS_PLATFORM += -mno-app-regs
LDFLAGS_PLATFORM = -Wl,--no-relax
endif
if COND_arm if COND_arm
CFLAGS_PLATFORM += -mthumb-interwork CFLAGS_PLATFORM += -mthumb-interwork
CCASFLAGS_PLATFORM = -mthumb-interwork CCASFLAGS_PLATFORM = -mthumb-interwork

View File

@ -176,6 +176,10 @@ if test x$platform != xemu ; then
esac esac
fi fi
if test x"$target_cpu-$platform" = xsparc64-emu ; then
target_m64=1 ;
fi
case "$target_os" in case "$target_os" in
windows* | mingw32*) target_os=cygwin ;; windows* | mingw32*) target_os=cygwin ;;
esac esac
@ -345,6 +349,11 @@ AC_SYS_LARGEFILE
# Identify characteristics of the host architecture. # Identify characteristics of the host architecture.
unset ac_cv_c_bigendian unset ac_cv_c_bigendian
if test x"$target_cpu-$platform" = xsparc64-emu ; then
CFLAGS="$CFLAGS -m64"
HOST_CFLAGS="$HOST_CFLAGS -m64"
fi
AC_C_BIGENDIAN AC_C_BIGENDIAN
AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long)
@ -820,7 +829,7 @@ AC_SUBST(TARGET_LDFLAGS_OLDMAGIC)
LDFLAGS="$TARGET_LDFLAGS" LDFLAGS="$TARGET_LDFLAGS"
if test "$target_cpu" = x86_64; then if test "$target_cpu" = x86_64 || test "$target_cpu-$platform" = sparc64-emu ; then
# Use large model to support 4G memory # Use large model to support 4G memory
AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [ AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
CFLAGS="$TARGET_CFLAGS -m64 -mcmodel=large" CFLAGS="$TARGET_CFLAGS -m64 -mcmodel=large"
@ -830,6 +839,8 @@ if test "$target_cpu" = x86_64; then
]) ])
if test "x$grub_cv_cc_mcmodel" = xyes; then if test "x$grub_cv_cc_mcmodel" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large" TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
elif test "$target_cpu-$platform" = sparc64-emu; then
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
fi fi
fi fi
@ -1585,6 +1596,7 @@ AM_CONDITIONAL([COND_mips_loongson], [test x$target_cpu = xmipsel -a x$platform
AM_CONDITIONAL([COND_mips_qemu_mips], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips]) AM_CONDITIONAL([COND_mips_qemu_mips], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips])
AM_CONDITIONAL([COND_mips_arc], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xarc]) AM_CONDITIONAL([COND_mips_arc], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xarc])
AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275]) AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275])
AM_CONDITIONAL([COND_sparc64_emu], [test x$target_cpu = xsparc64 -a x$platform = xemu])
AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275]) AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275])
AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel]) AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel])
AM_CONDITIONAL([COND_mipsel], [test x$target_cpu = xmipsel]) AM_CONDITIONAL([COND_mipsel], [test x$target_cpu = xmipsel])