Add __attribute__ ((sysv_abi)) only if it's really needed.
Some compilers don't support it.
This commit is contained in:
parent
1962ed95cc
commit
eba2afeda1
4 changed files with 24 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-12-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Add __attribute__ ((sysv_abi)) only if it's really needed.
|
||||
|
||||
Some compilers don't support it.
|
||||
|
||||
2013-12-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/lib/syslinux_parse.c: Declare timeout unsigned.
|
||||
|
|
|
@ -104,6 +104,14 @@ grub_memcpy (void *dest, const void *src, grub_size_t n)
|
|||
#define GRUB_BUILTIN_ATTR
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) && !defined (GRUB_UTIL)
|
||||
#if defined (__MINGW32__) || defined (__CYGWIN__) || defined (__MINGW64__)
|
||||
#define GRUB_ASM_ATTR __attribute__ ((sysv_abi))
|
||||
#else
|
||||
#define GRUB_ASM_ATTR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Prototypes for aliases. */
|
||||
#ifndef GRUB_UTIL
|
||||
int GRUB_BUILTIN_ATTR EXPORT_FUNC(memcmp) (const void *s1, const void *s2, grub_size_t n);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
typedef unsigned long grub_jmp_buf[8];
|
||||
|
||||
int grub_setjmp (grub_jmp_buf env) RETURNS_TWICE __attribute__ ((sysv_abi));
|
||||
void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn,sysv_abi));
|
||||
int grub_setjmp (grub_jmp_buf env) RETURNS_TWICE GRUB_ASM_ATTR;
|
||||
void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn)) GRUB_ASM_ATTR;
|
||||
|
||||
#endif /* ! GRUB_SETJMP_CPU_HEADER */
|
||||
|
|
|
@ -19,16 +19,18 @@
|
|||
#ifndef GRUB_XEN_CPU_HYPERCALL_HEADER
|
||||
#define GRUB_XEN_CPU_HYPERCALL_HEADER 1
|
||||
|
||||
int EXPORT_FUNC (grub_xen_sched_op) (int cmd, void *arg) __attribute__ ((sysv_abi));
|
||||
int grub_xen_update_va_mapping (void *addr, uint64_t pte, uint64_t flags) __attribute__ ((sysv_abi));
|
||||
int EXPORT_FUNC (grub_xen_event_channel_op) (int op, void *arg) __attribute__ ((sysv_abi));
|
||||
#include <grub/misc.h>
|
||||
|
||||
int EXPORT_FUNC (grub_xen_sched_op) (int cmd, void *arg) GRUB_ASM_ATTR;
|
||||
int grub_xen_update_va_mapping (void *addr, uint64_t pte, uint64_t flags) GRUB_ASM_ATTR;
|
||||
int EXPORT_FUNC (grub_xen_event_channel_op) (int op, void *arg) GRUB_ASM_ATTR;
|
||||
|
||||
int grub_xen_mmuext_op (mmuext_op_t * ops,
|
||||
unsigned int count,
|
||||
unsigned int *pdone, unsigned int foreigndom) __attribute__ ((sysv_abi));
|
||||
unsigned int *pdone, unsigned int foreigndom) GRUB_ASM_ATTR;
|
||||
int EXPORT_FUNC (grub_xen_mmu_update) (const struct mmu_update * reqs,
|
||||
unsigned count, unsigned *done_out,
|
||||
unsigned foreigndom) __attribute__ ((sysv_abi));
|
||||
int EXPORT_FUNC (grub_xen_grant_table_op) (int, void *, int) __attribute__ ((sysv_abi));
|
||||
unsigned foreigndom) GRUB_ASM_ATTR;
|
||||
int EXPORT_FUNC (grub_xen_grant_table_op) (int, void *, int) GRUB_ASM_ATTR;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue