From patchwork Thu Jan 28 10:15:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 8148341 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1E5A29FE81 for ; Thu, 28 Jan 2016 10:15:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6071020364 for ; Thu, 28 Jan 2016 10:15:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E42620328 for ; Thu, 28 Jan 2016 10:15:43 +0000 (UTC) Received: from localhost ([::1]:55057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOjc6-0007fv-Nu for patchwork-qemu-devel@patchwork.kernel.org; Thu, 28 Jan 2016 05:15:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOjbs-0007b7-DB for qemu-devel@nongnu.org; Thu, 28 Jan 2016 05:15:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOjbp-0001WO-77 for qemu-devel@nongnu.org; Thu, 28 Jan 2016 05:15:28 -0500 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:32832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOjbp-0001W0-0N for qemu-devel@nongnu.org; Thu, 28 Jan 2016 05:15:25 -0500 Received: by mail-wm0-x229.google.com with SMTP id l66so18386993wml.0 for ; Thu, 28 Jan 2016 02:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=pGMGVl+ImWOUIsJ76o6OwTb2d2gHmG/zvr72nvTMibE=; b=Upq08GW6H06IhYNt05IUO2Ye5NgJnNDb5ckWIt/6TiLdbJtmsEs9kiN1zs6+X5+nsw Wdm7wj1w5F/byCN9DBsoLIK/oD7A+uPma2JLyaXK4oaw+6nnFLFXGFCFFtmWDWdia3Oj lOPpI39aW9CadUZF4/JZGEDiLaECvdUzDMimw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=pGMGVl+ImWOUIsJ76o6OwTb2d2gHmG/zvr72nvTMibE=; b=jzIRK/H4R2EAFTKGog6taQS3vmo8SF6OGnecHcJfT6bZ6TJuGuivJpuCRmvFG7wWrM 9jkA7AWPfSoiop+sAtY53gqq8QcHcHUq6spdT2UpexNzAiM9AbTrBphxpLgGv5yq3diW 4ZI0pY6BBTfOlNsFcSKBWYmBSD3+vO7uFZcRjwiuVp1clWcb0sVL5bNxKLMnLmMeTHBV dv8jRjaB/DhAeIW/fICCiv19V4Hh9LeUcsK/OPm+ew2pYsiqOqXXsgwewrMzOCWj+gxg /KZTl6VKiMRL5xzxwbFQE7op2thD9lTYFkedYEB+dByNgsVh9qNY1rFo3XUsmbrPfmQl P2ug== X-Gm-Message-State: AG10YOSKMDJ5NG1SPViseM+A3YdKHAfQAYleccoSqrXhmH6y5fnKZAmksRFtYYHM+XztoZdO X-Received: by 10.28.131.70 with SMTP id f67mr2276764wmd.66.1453976124497; Thu, 28 Jan 2016 02:15:24 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 193sm2109982wmg.16.2016.01.28.02.15.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2016 02:15:23 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 809BD3E0593; Thu, 28 Jan 2016 10:15:22 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 28 Jan 2016 10:15:15 +0000 Message-Id: <1453976119-24372-2-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453976119-24372-1-git-send-email-alex.bennee@linaro.org> References: <1453976119-24372-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::229 Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, stefanha@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Subject: [Qemu-devel] [PATCH v1 1/5] configure: introduce --extra-libs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If for example you want to use the thread sanitizer you want to ensure all binaries are linked with the library: ./configure ${TARGETS} --cc=gcc-5 --cxx=g++-5 \ --extra-cflags="-fsanitize=thread" --extra-libs="-ltsan" This is more explicit than just specifying --extra-ldflags which does not get applied at the end of the linker string. Signed-off-by: Alex Bennée --- v1 - rebase - also ensure it is applied to test builds --- configure | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 44ac9ab..bd29ba7 100755 --- a/configure +++ b/configure @@ -113,7 +113,7 @@ compile_object() { compile_prog() { local_cflags="$1" local_ldflags="$2" - do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags + do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags $EXTRA_LIBS } do_libtool() { @@ -366,6 +366,8 @@ for opt do --extra-ldflags=*) LDFLAGS="$LDFLAGS $optarg" EXTRA_LDFLAGS="$optarg" ;; + --extra-libs=*) EXTRA_LIBS="$optarg" + ;; --enable-debug-info) debug_info="yes" ;; --disable-debug-info) debug_info="no" @@ -786,6 +788,8 @@ for opt do ;; --extra-ldflags=*) ;; + --extra-libs=*) + ;; --enable-debug-info) ;; --disable-debug-info) @@ -1282,6 +1286,7 @@ Advanced options (experts only): --objcc=OBJCC use Objective-C compiler OBJCC [$objcc] --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS + --extra-libs=LIBS append extra libraries when linking --make=MAKE use specified make [$make] --install=INSTALL use specified install [$install] --python=PYTHON use specified python [$python] @@ -4715,6 +4720,11 @@ fi QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS" libs_softmmu="$pixman_libs $libs_softmmu" +# extra-libs +LIBS="$LIBS $EXTRA_LIBS" +libs_softmmu="$libs_softmmu $EXTRA_LIBS" +libs_qga="$libs_qga $EXTRA_LIBS" + echo "Install prefix $prefix" echo "BIOS directory `eval echo $qemu_datadir`" echo "binary directory `eval echo $bindir`" @@ -4885,6 +4895,7 @@ fi echo "qemu_helperdir=$libexecdir" >> $config_host_mak echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak +echo "extra_libs=$EXTRA_LIBS" >> $config_host_mak echo "qemu_localedir=$qemu_localedir" >> $config_host_mak echo "libs_softmmu=$libs_softmmu" >> $config_host_mak