From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SulXX-0005fQ-7n for qemu-devel@nongnu.org; Fri, 27 Jul 2012 10:29:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SulXO-00020L-Du for qemu-devel@nongnu.org; Fri, 27 Jul 2012 10:29:15 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:52569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SulXO-000208-7N for qemu-devel@nongnu.org; Fri, 27 Jul 2012 10:29:06 -0400 Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jul 2012 08:29:00 -0600 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 8593319D8042 for ; Fri, 27 Jul 2012 14:27:41 +0000 (WET) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6RERNal256958 for ; Fri, 27 Jul 2012 08:27:34 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6RERGkU017244 for ; Fri, 27 Jul 2012 08:27:19 -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 09:27:10 -0500 Message-ID: <87hastmg8x.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 ? Weak symbols are supposed to be supported by mingw32. I have no idea about MacOS X. I have no way to develop or test for MacOS X using free software so I honestly don't care about it. Regards, Anthony Liguori > > (Also, no version of the macro in the not-GCC branch of the #if.) > > -- PMM