From: Will Deacon Subject: [RFC PATCH 03/16] kvm tools: avoid linking dynamically against libbfd Date: Mon, 12 Nov 2012 11:57:17 +0000 Message-ID: <1352721450-11340-4-git-send-email-will.deacon@arm.com> References: <1352721450-11340-1-git-send-email-will.deacon@arm.com> Cc: penberg@kernel.org, marc.zyngier@arm.com, c.dall@virtualopensystems.com, matt.evans@arm.com, peter.maydell@linaro.org, Will Deacon To: kvm@vger.kernel.org Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:55184 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752948Ab2KLL5n (ORCPT ); Mon, 12 Nov 2012 06:57:43 -0500 In-Reply-To: <1352721450-11340-1-git-send-email-will.deacon@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: Linking dynamically against libbfd results in a non-portable application binary and is generally frowned upon by distributions: Debian forbids it explicitly and on Gentoo, it results in a failure at run-time: ./lkvm: error while loading shared libraries: libbfd-2.22.so: cannot open shared object file: No such file or directory Avoid these problems by linking statically instead. Signed-off-by: Will Deacon --- tools/kvm/Makefile | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index 23a7c40..44a55c2 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -171,11 +171,6 @@ endif # both and only build those that link! FLAGS_BFD := $(CFLAGS) -lbfd -ifeq ($(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD)),y) - CFLAGS_DYNOPT += -DCONFIG_HAS_BFD - OBJS_DYNOPT += symbol.o - LIBS_DYNOPT += -lbfd -endif ifeq ($(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD) -static),y) CFLAGS_STATOPT += -DCONFIG_HAS_BFD OBJS_STATOPT += symbol.o -- 1.7.4.1