Fix __weak_reference for clang [closes #9]

This commit is contained in:
Keno Fischer 2012-07-03 13:50:00 +02:00
parent 56811b0809
commit 4b078ee343
1 changed files with 9 additions and 3 deletions

View File

@ -50,9 +50,15 @@
__asm__(".previous")
#endif /* __STDC__ */
#elif defined(__clang__) /* CLANG */
#define __weak_reference(sym,alias) \
__asm__(".weak_reference alias");\
__asm__(".set alias, sym")
#ifdef __STDC__
#define __weak_reference(sym,alias) \
__asm__(".weak_reference " #alias); \
__asm__(".set " #alias ", " #sym)
#else
#define __weak_reference(sym,alias) \
__asm__(".weak_reference alias");\
__asm__(".set alias, sym")
#endif
#else /* !__ELF__ */
#ifdef __STDC__
#define __weak_reference(sym,alias) \