Fix cygwin compilation.

* configure.ac: Define NEED_REGISTER_FRAME_INFO.
	* include/grub/misc.h (__register_frame_info)
	[NEED_REGISTER_FRAME_INFO && !UTIL]: New export.
	(__deregister_frame_info) [NEED_REGISTER_FRAME_INFO && !UTIL]: Likewise.
	* kern/misc.c (__register_frame_info)
	[NEED_REGISTER_FRAME_INFO && !UTIL]: New empty function.
	(__deregister_frame_info) [NEED_REGISTER_FRAME_INFO && !UTIL]: Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-11 21:24:21 +02:00
parent 01fcf061ea
commit 4b0cd8f813
4 changed files with 31 additions and 1 deletions

View file

@ -1,3 +1,15 @@
2010-04-11 Vladimir Serbinenko <phcoder@gmail.com>
Fix cygwin compilation.
* configure.ac: Define NEED_REGISTER_FRAME_INFO.
* include/grub/misc.h (__register_frame_info)
[NEED_REGISTER_FRAME_INFO && !UTIL]: New export.
(__deregister_frame_info) [NEED_REGISTER_FRAME_INFO && !UTIL]: Likewise.
* kern/misc.c (__register_frame_info)
[NEED_REGISTER_FRAME_INFO && !UTIL]: New empty function.
(__deregister_frame_info) [NEED_REGISTER_FRAME_INFO && !UTIL]: Likewise.
2010-04-11 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Respect grub_cv_asm_uscore when defining dummy symbols.

View file

@ -376,7 +376,11 @@ AC_SUBST(TARGET_IMG_CFLAGS)
# For platforms where ELF is not the default link format.
AC_MSG_CHECKING([for command to convert module to ELF format])
case "${host_os}" in
cygwin) TARGET_OBJ2ELF='grub-pe2elf' ;;
cygwin) TARGET_OBJ2ELF='grub-pe2elf';
# FIXME: put proper test here
AC_DEFINE([NEED_REGISTER_FRAME_INFO], 1,
[Define to 1 if GCC generates calls to __register_frame_info()])
;;
*) ;;
esac
AC_SUBST(TARGET_OBJ2ELF)

View file

@ -265,6 +265,11 @@ grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
void EXPORT_FUNC(__enable_execute_stack) (void *addr);
#endif
#if defined (NEED_REGISTER_FRAME_INFO) && !defined(GRUB_UTIL)
void EXPORT_FUNC (__register_frame_info) (void);
void EXPORT_FUNC (__deregister_frame_info) (void);
#endif
/* Inline functions. */
static inline unsigned int

View file

@ -1066,3 +1066,12 @@ void __enable_execute_stack (void *addr __attribute__ ((unused)))
}
#endif
#if defined (NEED_REGISTER_FRAME_INFO) && !defined(GRUB_UTIL)
void __register_frame_info (void)
{
}
void __deregister_frame_info (void)
{
}
#endif