diff --git a/ChangeLog b/ChangeLog index 61f1bc20e..d766bcd50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-04-11 Vladimir Serbinenko + + 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 * configure.ac: Respect grub_cv_asm_uscore when defining dummy symbols. diff --git a/configure.ac b/configure.ac index 66e06bc86..3116d6584 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/include/grub/misc.h b/include/grub/misc.h index 61174c38d..9bfc6974e 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -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 diff --git a/kern/misc.c b/kern/misc.c index 9d8fc70da..ccc01d43f 100644 --- a/kern/misc.c +++ b/kern/misc.c @@ -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