clang emits calls to abort () under some unknown conditions.

Export abort () when compiling with clang.
This commit is contained in:
Vladimir Serbinenko 2013-11-22 12:42:58 +01:00
parent 095bb1bfa5
commit 4a0aaad022
3 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
clang emits calls to abort () under some unknown conditions.
Export abort () when compiling with clang.
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
* docs/grub-dev.texi: Document stack and heap sizes. * docs/grub-dev.texi: Document stack and heap sizes.

View file

@ -1220,6 +1220,15 @@ grub_abort (void)
grub_exit (); grub_exit ();
} }
#if defined (__clang__) && !defined (GRUB_UTIL)
/* clang emits references to abort(). */
void __attribute__ ((noreturn))
abort (void)
{
grub_abort ();
}
#endif
void void
grub_fatal (const char *fmt, ...) grub_fatal (const char *fmt, ...)
{ {

View file

@ -421,6 +421,10 @@ void EXPORT_FUNC(grub_reboot) (void) __attribute__ ((noreturn));
void grub_reboot (void) __attribute__ ((noreturn)); void grub_reboot (void) __attribute__ ((noreturn));
#endif #endif
#if defined (__clang__) && !defined (GRUB_UTIL)
void __attribute__ ((noreturn)) EXPORT_FUNC (abort) (void);
#endif
#ifdef GRUB_MACHINE_PCBIOS #ifdef GRUB_MACHINE_PCBIOS
/* Halt the system, using APM if possible. If NO_APM is true, don't /* Halt the system, using APM if possible. If NO_APM is true, don't
* use APM even if it is available. */ * use APM even if it is available. */