]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
clang emits calls to abort () under some unknown conditions.
authorVladimir Serbinenko <phcoder@gmail.com>
Fri, 22 Nov 2013 11:42:58 +0000 (12:42 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Fri, 22 Nov 2013 11:42:58 +0000 (12:42 +0100)
Export abort () when compiling with clang.

ChangeLog
grub-core/kern/misc.c
include/grub/misc.h

index 181f4663293a547663b2080b5bbf4184a6780709..37a4cec039240a0b2cea80c7f9c6d5980db50dfa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * docs/grub-dev.texi: Document stack and heap sizes.
index f61ff00c144980f3fd12f0d5201e0d279ddbc887..695777ccc97291b81c4716c9459a85db2102946d 100644 (file)
@@ -1220,6 +1220,15 @@ grub_abort (void)
   grub_exit ();
 }
 
+#if defined (__clang__) && !defined (GRUB_UTIL)
+/* clang emits references to abort().  */
+void __attribute__ ((noreturn))
+abort (void)
+{
+  grub_abort ();
+}
+#endif
+
 void
 grub_fatal (const char *fmt, ...)
 {
index 3d7147797e95f7a324b423ff5b2e6de3d855a87b..d80da33491ab42607d1f7800fadd30e1f1412ef4 100644 (file)
@@ -421,6 +421,10 @@ void EXPORT_FUNC(grub_reboot) (void) __attribute__ ((noreturn));
 void grub_reboot (void) __attribute__ ((noreturn));
 #endif
 
+#if defined (__clang__) && !defined (GRUB_UTIL)
+void __attribute__ ((noreturn)) EXPORT_FUNC (abort) (void);
+#endif
+
 #ifdef GRUB_MACHINE_PCBIOS
 /* Halt the system, using APM if possible. If NO_APM is true, don't
  * use APM even if it is available.  */