Two issues prevent the frv-elf port from building after the C99 changes. First
the trampoline code emitted into libgcc has calls to exit, but no prototype.
Adding a trivial prototype for exit() into the macro fixes that little goof.
Second, frvbegin.c has a call to atexit, so a quick prototype is added into
frvbegin.c to fix that problem.
That's enough to get the compiler building again.
gcc/
* config/frv/frv.h (TRANSFER_FROM_TRAMPOLINE): Add prototype for exit.
libgcc/
* config/frv/frvbegin.c (atexit): Add prototype.
#if ! __FRV_FDPIC__
#define TRANSFER_FROM_TRAMPOLINE \
extern int Twrite (int, const void *, unsigned); \
+extern void exit (int); \
\
void \
__trampoline_setup (short * addr, int size, int fnaddr, int sc) \
#else
#define TRANSFER_FROM_TRAMPOLINE \
extern int Twrite (int, const void *, unsigned); \
+extern void exit (int); \
\
void \
__trampoline_setup (addr, size, fnaddr, sc) \
}
}
+int atexit (void (*)(void));
/* Run the global constructors. */
void
__do_global_ctors (void)