From patchwork Thu Jan 28 10:15:16 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: 60702 Delivered-To: patch@linaro.org Received: by 10.55.15.231 with SMTP id 100csp303162qkp; Thu, 28 Jan 2016 02:17:37 -0800 (PST) X-Received: by 10.55.71.76 with SMTP id u73mr2488239qka.6.1453976257783; Thu, 28 Jan 2016 02:17:37 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t105si11450300qgd.119.2016.01.28.02.17.37 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Jan 2016 02:17:37 -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]:55071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOjdx-0002tR-BK for patch@linaro.org; Thu, 28 Jan 2016 05:17:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOjbs-0007b8-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-0001Wf-MD for qemu-devel@nongnu.org; Thu, 28 Jan 2016 05:15:28 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:34578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOjbp-0001WL-F2 for qemu-devel@nongnu.org; Thu, 28 Jan 2016 05:15:25 -0500 Received: by mail-wm0-x233.google.com with SMTP id 128so3576951wmz.1 for ; Thu, 28 Jan 2016 02:15:25 -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=PYLKj6L3Pprjk4HcGep3f1xYNJaarlHAyGjiq72Qiz4=; b=UUQxdnV4uofu2wwa/GFJiSe+Bofs0uETupRjKkmCNUXi6WVz3hXLWsNZ3f6gkFM15w 9g8/w2k5s1JccdosqjB+bPQb8dn0Q4ozP1Y3R86tPm7gD5hOLnPhoVuDNizFjIsTFlns BB57G+UWSlopKeCTDzYr5hYgsDRVNZQCgkbrk= 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=PYLKj6L3Pprjk4HcGep3f1xYNJaarlHAyGjiq72Qiz4=; b=CrEZBOZ0fblmjVwBTNbv5LOEKFfBFESAuyOzfX1pKRNU4EosBwexELlgG9yCF4YTs7 h4FVl6fiyr1nTkTI/PNKOO1+flA0jEXop90ygfimgTuFJpVb+msHzUT/7WLIVp9GPZ1Q 78lkccJcx+43p3dkJ29TOSAMC18tsekX3aNO7eqTjyjg1yrpeG/9CgJqZDdAe7izv2Uf IS88z2xmCc9iUcKcHqYTQa3PXkQlPBIcxD3QazgZABvegFazsCO++OczexdB/G/N+623 rZB2yUlRDQzG3pnKri6cQ1GhXHcN+fNAQbC8cX8Q2N/Y8i7D4S2VyMpZrOdQowpdZSsB d0LA== X-Gm-Message-State: AG10YORMbixOTyJeNs4brBGCN2H5taxYW05pAyv9QlcsT1CqMV9q19lglnTNWa4DskzvCxYP X-Received: by 10.28.182.133 with SMTP id g127mr2077168wmf.61.1453976124900; 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 lc3sm10308581wjb.7.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 94EA63E0770; 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:16 +0000 Message-Id: <1453976119-24372-3-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::233 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 2/5] configure: ensure ldflags propagated to config_host 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 have the extra linker flags applied: ./configure ${TARGETS} --cc=gcc-5 --cxx=g++-5 \ --extra-cflags="-fsanitize=thread" --extra-ldflags="-fsanitize=thread" Or possibly: ./configure ${TARGETS} --extra-cflags="-fsanitize=thread -fPIC" \ --extra-ldflags="-fsanitize=thread -pie" Unlike CFLAGS we don't have a QEMU_LDFLAGS which would be appropriate if we only ever needed to affect ${TARGET} binaries. Signed-off-by: Alex Bennée --- v1 - new for v1 - --extra-ldflags alternative to -ltsan - yet another example invocation (gcc 4.9/Gentoo) --- Makefile | 4 ++-- configure | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.7.0 diff --git a/Makefile b/Makefile index d0de2d4..d30532f 100644 --- a/Makefile +++ b/Makefile @@ -329,9 +329,9 @@ qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) endif ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) - $(call LINK, $^) + $(call LINK, $^, $(ldflags)) ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) libqemuutil.a libqemustub.a - $(call LINK, $^) + $(call LINK, $^, $(ldflags)) clean: # avoid old build problems by removing potentially incorrect old files diff --git a/configure b/configure index bd29ba7..148b79a 100755 --- a/configure +++ b/configure @@ -5871,7 +5871,7 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then ldflags="$ldflags $textseg_ldflags" fi -echo "LDFLAGS+=$ldflags" >> $config_target_mak +echo "LDFLAGS+=$ldflags" >> $config_host_mak echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak done # for target in $targets