(__sym_compat): New define.
(__sym_default): Likewise.
---
newlib/libc/include/sys/cdefs.h | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
index 1cae5ec..62c7aae 100644
--- a/newlib/libc/include/sys/cdefs.h
+++ b/newlib/libc/include/sys/cdefs.h
@@ -223,9 +223,11 @@
#define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var))
#endif
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__INTEL_COMPILER)
+#ifndef __INTEL_COMPILER
#define __strong_reference(sym,aliassym) \
- extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
+ extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
+#endif
#ifdef __ELF__
#ifdef __STDC__
#define __weak_reference(sym,alias) \
@@ -235,6 +237,10 @@
__asm__(".section .gnu.warning." #sym); \
__asm__(".asciz \"" msg "\""); \
__asm__(".previous")
+#define __sym_compat(sym,impl,verid) \
+ __asm__(".symver " #impl ", " #sym "@" #verid)
+#define __sym_default(sym,impl,verid) \
+ __asm__(".symver " #impl ", " #sym "@@" #verid)
#else
#define __weak_reference(sym,alias) \
__asm__(".weak alias"); \
@@ -243,6 +249,10 @@
__asm__(".section .gnu.warning.sym"); \
__asm__(".asciz \"msg\""); \
__asm__(".previous")
+#define __sym_compat(sym,impl,verid) \
+ __asm__(".symver impl, sym@verid")
+#define __sym_default(impl,sym,verid) \
+ __asm__(".symver impl, sym@@verid")
#endif /* __STDC__ */
#else /* !__ELF__ */
#ifdef __STDC__
@@ -261,6 +271,6 @@
__asm__(".stabs \"_/**/sym\",1,0,0,0")
#endif /* __STDC__ */
#endif /* __ELF__ */
-#endif /* __GNUC__ */
+#endif /* __GNUC__ || __INTEL_COMPILER */
#endif /* !_SYS_CDEFS_H_ */