From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SumXA-0000W8-CW for qemu-devel@nongnu.org; Fri, 27 Jul 2012 11:32:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SumX4-0002E3-Ex for qemu-devel@nongnu.org; Fri, 27 Jul 2012 11:32:56 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:40482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SumX4-0002DN-83 for qemu-devel@nongnu.org; Fri, 27 Jul 2012 11:32:50 -0400 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jul 2012 09:32:45 -0600 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 884B719D803D for ; Fri, 27 Jul 2012 15:32:11 +0000 (WET) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6RFVu2F147804 for ; Fri, 27 Jul 2012 09:31:56 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6RFVtcB003478 for ; Fri, 27 Jul 2012 09:31:55 -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> <87hastmg8x.fsf@codemonkey.ws> Date: Fri, 27 Jul 2012 10:31:47 -0500 Message-ID: <87mx2lfcf0.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 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 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. > > 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 helps. QEMU doesn't support C99, it supports GCC. There's no point in debating about whether we should rely on extensions or not. We already do--extensively. Regards, Anthony Liguori > -- if I > write a patch which is pretty much standard C then it's the > platform's problem if it mishandles it. If I write a patch > that uses a compiler-specific or OS-specific thing then I > have to also provide the relevant alternatives...so I try > to avoid doing that :-) > > -- PMM