Received: from eggs.gnu.org ([208.118.235.92]:46297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sv0TK-0004P6-PC for qemu-devel@nongnu.org; Sat, 28 Jul 2012 02:25:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sv0TJ-00078G-Dw for qemu-devel@nongnu.org; Sat, 28 Jul 2012 02:25:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sv0TJ-00078C-5z for qemu-devel@nongnu.org; Sat, 28 Jul 2012 02:25:53 -0400 From: Markus Armbruster 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> <87mx2lfcf0.fsf@codemonkey.ws> <877gtpexm1.fsf@codemonkey.ws> <87vch8x1y6.fsf@codemonkey.ws> Date: Sat, 28 Jul 2012 08:25:47 +0200 In-Reply-To: <87vch8x1y6.fsf@codemonkey.ws> (Anthony Liguori's message of "Fri, 27 Jul 2012 17:40:33 -0500") Message-ID: <87zk6ks8pg.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Anthony Liguori Cc: Blue Swirl , Peter Maydell , Eric Blake , Alexander Graf , qemu-devel@nongnu.org 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. >> Because it's more compliant to standards. > > That is not a benefit. There is no practical advantage to sticking to > only C99. Agree. "Compliance to X" is means, not ends. Specifically, compliance to C99 is not a benefit by itself. Portability to desirable targets is one. Right now, the code is portable enough for our current needs. If you find a target you wish to support where it doesn't work, patches are welcome. > If we stuck to C99 only, QEMU would look very different. We wouldn't > have type_init() so we wouldn't have the module system we use today. > It literally took me months to get those patches merged because Paul > made exactly the same argument you're making now. > > And it's really been one of the better cleanups in QEMU that we've ever > done (using modules to define devices). Developing is hard enough without tying ourselves into knots to avoid useful tools just because they haven't been blessed by the right standards committee. Some pragmatism is in order. >> There's also very little benefit from using the nonessential >> extensions. Blanket statement, needs evidence. > Using weak symbols eliminates #ifdefs and makes the code base a lot > cleaner. It makes it easier to introduce architecture specific hooks in > a clean way. > > Considering how messy a lot of our target-specific code is, I think > there could be quite a significant benefit down the road. I don't have an informed opinion on this particular case. All I can say here is patches are evidence.