From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta9eg-0001s2-9E for qemu-devel@nongnu.org; Sun, 18 Nov 2012 13:31:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ta9ed-00008e-4j for qemu-devel@nongnu.org; Sun, 18 Nov 2012 13:31:42 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:39188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta9ec-00008a-UN for qemu-devel@nongnu.org; Sun, 18 Nov 2012 13:31:39 -0500 Message-ID: <50A92987.2000606@weilnetz.de> Date: Sun, 18 Nov 2012 19:31:35 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1353087327-16404-1-git-send-email-pbonzini@redhat.com> <50A90889.1090603@redhat.com> In-Reply-To: <50A90889.1090603@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] build: replace weak symbols with a static library List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: blauwirbel@gmail.com, Peter Maydell , aliguori@us.ibm.com, qemu-devel@nongnu.org Am 18.11.2012 17:10, schrieb Paolo Bonzini: > Il 16/11/2012 19:18, Peter Maydell ha scritto: > >> On 16 November 2012 17:35, Paolo Bonzini wrote: >> >>> Weak symbols were a nice idea, but they turned out not to be a good one. >>> Toolchain support is just too sparse, in particular llvm-gcc is totally >>> broken. >>> >>> This patch uses a surprisingly low-tech approach: a static library. >>> Symbols in a static library are always overridden by symbols in an >>> object file. Furthermore, if you place each function in a separate >>> source file, object files for unused functions will not be taken in. >>> This means that each function can use all the dependencies that it needs >>> (especially QAPI stuff such as error_setg). >>> >>> Thus, all stubs are placed in separate object files and put together in >>> a static library. The library then is linked to all programs. >>> >>> Signed-off-by: Paolo Bonzini >>> >> This builds and runs OK on Linux and MacOS X. >> (nb: only system and usermode executables tested, not the standalone >> utility executables like qemu-ga). >> >> Tested-by: Peter Maydell >> Reviewed-by: Peter Maydell >> > I did some Windows testing, too. Blue, can you apply? > > Paolo > It also works for me (tested on Debian Linux and w32). Tested-by: Stefan Weil