Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-08-13 Thread Anthony Liguori
Peter Maydell writes: > On 10 August 2012 17:04, Anthony Liguori wrote: >> This lets us provide a default implementation of a symbol which targets can >> override. >> >> Signed-off-by: Anthony Liguori > > I'm sure you'll be thrilled to hear that this doesn't seem to break MacOS > builds :-) Th

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-08-12 Thread Peter Maydell
On 10 August 2012 17:04, Anthony Liguori wrote: > This lets us provide a default implementation of a symbol which targets can > override. > > Signed-off-by: Anthony Liguori I'm sure you'll be thrilled to hear that this doesn't seem to break MacOS builds :-) -- PMM

[Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-08-10 Thread Anthony Liguori
This lets us provide a default implementation of a symbol which targets can override. Signed-off-by: Anthony Liguori --- compiler.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/compiler.h b/compiler.h index 736e770..f76921e 100644 --- a/compiler.h +++ b/compiler.h @@

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-28 Thread Blue Swirl
On Sat, Jul 28, 2012 at 6:50 AM, Peter Maydell wrote: > On 27 July 2012 16:31, Anthony Liguori wrote: >> Peter Maydell writes: >>> My approach to this is to avoid non-standard things >> >> http://en.wikipedia.org/wiki/C99#Implementations >> >> So unless you plan on compiling QEMU with xlc, pgi,

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-28 Thread Blue Swirl
On Sat, Jul 28, 2012 at 6:25 AM, Markus Armbruster wrote: > Anthony Liguori writes: > >> Blue Swirl writes: >> >>> On Fri, Jul 27, 2012 at 8:51 PM, Anthony Liguori >>> wrote: If someone comes along and actively maintains support for another compiler, we can revisit. But otherwise, t

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-28 Thread Blue Swirl
On Fri, Jul 27, 2012 at 10:40 PM, Anthony Liguori wrote: > Blue Swirl writes: > >> On Fri, Jul 27, 2012 at 8:51 PM, Anthony Liguori wrote: >>> If someone comes along and actively maintains support for another >>> compiler, we can revisit. But otherwise, there's no practical reason to >>> avoid

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Peter Maydell
On 27 July 2012 16:31, Anthony Liguori wrote: > Peter Maydell writes: >> My approach to this is to avoid non-standard things > > http://en.wikipedia.org/wiki/C99#Implementations > > So unless you plan on compiling QEMU with xlc, pgi, or icc, I don't > think relying on "standard things" really hel

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Markus Armbruster
Anthony Liguori writes: > Blue Swirl writes: > >> On Fri, Jul 27, 2012 at 8:51 PM, Anthony Liguori wrote: >>> If someone comes along and actively maintains support for another >>> compiler, we can revisit. But otherwise, there's no practical reason to >>> avoid extensions. Exactly. >> Becaus

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Blue Swirl writes: > On Fri, Jul 27, 2012 at 8:51 PM, Anthony Liguori wrote: >> If someone comes along and actively maintains support for another >> compiler, we can revisit. But otherwise, there's no practical reason to >> avoid extensions. > > Because it's more compliant to standards. That i

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Blue Swirl
On Fri, Jul 27, 2012 at 8:51 PM, Anthony Liguori wrote: > Blue Swirl writes: > >> On Fri, Jul 27, 2012 at 3:31 PM, Anthony Liguori wrote: >>> Peter Maydell writes: >>> On 27 July 2012 15:27, Anthony Liguori wrote: > Peter Maydell writes: >> The GCC manual says "Weak symbols are s

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Blue Swirl writes: > On Fri, Jul 27, 2012 at 3:31 PM, Anthony Liguori wrote: >> Peter Maydell writes: >> >>> On 27 July 2012 15:27, Anthony Liguori wrote: Peter Maydell writes: > The GCC manual says "Weak symbols are supported for ELF targets, > and also for a.out targets when us

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Blue Swirl
On Fri, Jul 27, 2012 at 3:31 PM, Anthony Liguori wrote: > Peter Maydell writes: > >> On 27 July 2012 15:27, Anthony Liguori wrote: >>> Peter Maydell writes: The GCC manual says "Weak symbols are supported for ELF targets, and also for a.out targets when using the GNU assembler and lin

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 July 2012 14:37, Anthony Liguori wrote: >> --- 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 >

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 July 2012 15:27, Anthony Liguori wrote: >> Peter Maydell writes: >>> The GCC manual says "Weak symbols are supported for ELF targets, >>> and also for a.out targets when using the GNU assembler and linker". >>> Have you tested this on Windows and MacOSX ? >> >> Wea

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Peter Maydell
On 27 July 2012 15:27, Anthony Liguori wrote: > Peter Maydell writes: >> The GCC manual says "Weak symbols are supported for ELF targets, >> and also for a.out targets when using the GNU assembler and linker". >> Have you tested this on Windows and MacOSX ? > > Weak symbols are supposed to be sup

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 July 2012 14:37, Anthony Liguori wrote: >> --- 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 >

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Peter Maydell
On 27 July 2012 14:37, Anthony Liguori wrote: > --- 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__

[Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
This lets us provide a default implementation of a symbol which targets can override. Signed-off-by: Anthony Liguori --- compiler.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/compiler.h b/compiler.h index 736e770..f76921e 100644 --- a/compiler.h +++ b/compiler.h @@