From: Anthony Liguori Date: Fri, 10 Aug 2012 16:04:12 +0000 (-0500) Subject: compiler: add macro for GCC weak symbols X-Git-Tag: v1.2.0-rc0~28^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ee373a0032b8fa6b630c6df9cd6618a7a02902b;p=thirdparty%2Fqemu.git compiler: add macro for GCC weak symbols This lets us provide a default implementation of a symbol which targets can override. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- diff --git a/compiler.h b/compiler.h index 736e77075ae..f76921e5b05 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)