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: 60701 Delivered-To: patch@linaro.org Received: by 10.55.15.231 with SMTP id 100csp302598qkp; Thu, 28 Jan 2016 02:16:17 -0800 (PST) X-Received: by 10.140.101.119 with SMTP id t110mr2430019qge.68.1453976177197; Thu, 28 Jan 2016 02:16:17 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a123si10857617qha.3.2016.01.28.02.16.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Jan 2016 02:16:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dkim=fail header.i=@linaro.org Received: from localhost ([::1]:55060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOjce-000064-PZ for patch@linaro.org; Thu, 28 Jan 2016 05:16:16 -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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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(-) -- 2.7.0 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