From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SumXo-0001IB-BS for qemu-devel@nongnu.org; Fri, 27 Jul 2012 11:33:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SumXj-0002eK-7T for qemu-devel@nongnu.org; Fri, 27 Jul 2012 11:33:36 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:55851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SumXj-0002e4-0q for qemu-devel@nongnu.org; Fri, 27 Jul 2012 11:33:31 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jul 2012 09:33:30 -0600 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 1607119D8051 for ; Fri, 27 Jul 2012 15:33:23 +0000 (WET) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6RFX77n117166 for ; Fri, 27 Jul 2012 09:33:09 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6RFX1Ei027643 for ; Fri, 27 Jul 2012 09:33:02 -0600 From: Anthony Liguori In-Reply-To: References: <1343396239-19272-1-git-send-email-aliguori@us.ibm.com> <1343396239-19272-5-git-send-email-aliguori@us.ibm.com> Date: Fri, 27 Jul 2012 10:32:54 -0500 Message-ID: <87k3xpfcd5.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: libvir-list@redhat.com, Markus Armbruster , Eric Blake , qemu-devel@nongnu.org, Alexander Graf 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 >> +#define GCC_WEAK __attribute__((weak)) >> #else >> #define GCC_ATTR /**/ >> #define GCC_FMT_ATTR(n, m) > > 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 ? > > (Also, no version of the macro in the not-GCC branch of the #if.) (We don't support any compiler other than GCC). Not really sure why it is even in a branch. Regards, Anthony Liguori > > -- PMM