Patchwork [45/48] compiler: add macro for GCC weak symbols

login
register
mail settings
Submitter Luiz Capitulino
Date Aug. 13, 2012, 7:49 p.m.
Message ID <1344887349-13041-46-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/177136/
State New
Headers show

Comments

Luiz Capitulino - Aug. 13, 2012, 7:49 p.m.
From: Anthony Liguori <aliguori@us.ibm.com>

This lets us provide a default implementation of a symbol which targets can
override.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 compiler.h | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/compiler.h b/compiler.h
index 736e770..f76921e 100644
--- a/compiler.h
+++ b/compiler.h
@@ -45,6 +45,7 @@ 
 #  define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2)))
 #  define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
 # endif
+#define GCC_WEAK __attribute__((weak))
 #else
 #define GCC_ATTR /**/
 #define GCC_FMT_ATTR(n, m)