mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
win32: provide separate macros for weak decls and definitions
mingw32 seems to want the declaration to also carry the weak attribute. Strangely, gcc on Linux absolutely does not want the declaration to be marked as weak. This may not be the right fix, but it seems to do the trick. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d1186a33ef
commit
76b64a7aa8
5 changed files with 21 additions and 5 deletions
|
@ -45,7 +45,13 @@
|
|||
# define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2)))
|
||||
# define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
|
||||
# endif
|
||||
#if defined(_WIN32)
|
||||
#define GCC_WEAK __attribute__((weak))
|
||||
#define GCC_WEAK_DECL GCC_WEAK
|
||||
#else
|
||||
#define GCC_WEAK __attribute__((weak))
|
||||
#define GCC_WEAK_DECL
|
||||
#endif
|
||||
#else
|
||||
#define GCC_ATTR /**/
|
||||
#define GCC_FMT_ATTR(n, m)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue