From patchwork Wed Jul 19 01:18:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Carrillo-Cisneros X-Patchwork-Id: 108248 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp202774obm; Tue, 18 Jul 2017 18:19:14 -0700 (PDT) X-Received: by 10.98.10.68 with SMTP id s65mr417739pfi.55.1500427154610; Tue, 18 Jul 2017 18:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500427154; cv=none; d=google.com; s=arc-20160816; b=jQvXf5qgF6uG1JfjoDrxhI95UHX2GGccKto+E8JvTkn7D5WWgZ63jxCigH1FgJoijF fO9pRbSL8J3ABV39z0RrD4qRi3NalAvnVbSMfzeFr1EsDZOpk4MOlTnTV3iFv3vVfHvu xQ/A/L+3Jm03EdMt0QXmardgZ09bO9cGcBh9ICG/2pkXz3DsMLiY7EMSAhlqW13PQ9im 0MI5A4v7P8LVlCRc6tfJRG1Mmfcv391808o8UPVPcB/py/kEVaokyEmChgiSuyuDETU6 QSBkJiMA/VYOl2fMQIhbOZi0n6FIV+7VJ7w4IwxOnM+kSVzSSoMrp23jqUf2a28qaZ8X rtqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=SaWwEHXqFVCWNl+xHds+CNEaMO5Whr5sYPD8YOORCMw=; b=B5vCsTIlfA2SSrxjBJ7jr+PiW9wN6A50Yw3HaEM3uLLNlUNxo8o5KUIwgk9Jqu6VxV K/Q3ZhRdYN5K8y8MEvS3TDOqL8V+6d9xMnchl0KEnV2Hl+ZNcie1m/lqqksX/Ck8ZiJJ N+5FfnAfRnlufFP2zvG9XjzhfsGGKAeuyI81FYNuw5cHzvprIuucuOllBOkTPqAxg8b4 stOdBeiCKjyhbADwQVJe5VaaLPDgXs4MH2JxwdhqOe4LPVlraQFqPhN6MPcxPWlywxiB MnYfrPwirafX2cnMKeQMqXM+EgAh9gFY9LNPW67RwQ5bcVPXnLYvKx3Ke85Cp1kD45sO Cf9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.b=Zkg8OZsC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c66si2957933pfc.226.2017.07.18.18.19.14; Tue, 18 Jul 2017 18:19:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.b=Zkg8OZsC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbdGSBTL (ORCPT + 25 others); Tue, 18 Jul 2017 21:19:11 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:34335 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752599AbdGSBTG (ORCPT ); Tue, 18 Jul 2017 21:19:06 -0400 Received: by mail-pf0-f172.google.com with SMTP id q85so19354055pfq.1 for ; Tue, 18 Jul 2017 18:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SaWwEHXqFVCWNl+xHds+CNEaMO5Whr5sYPD8YOORCMw=; b=Zkg8OZsCO9ToZFcWE4LT5tD5aU1/7nGK0iU1YTgBosf/sRUXcAGF/A4ktM2jjMeOKY kvsBhx+smlNxlyjILh/CAG2zIY1EUMyNV9iB0kU1ufFN2xjDWoMDXIRvS84+cFjdOpXY R1w+nGGKsZggMqZoX9+xhsppfuBei+TUqqoIXFYuZMzkfwEqZS2W2Eo6ViDNSje3EFEw HerfWkhERMF8HR6nroEt1OqvW4bDkUl+o7K5dlK9TrQxnThTFWFLF4yTDXm7YkknUh5h GpbRp9etEXAG/+UZrfTI9VB/F3G/sqy42sFs9KJsYCabdccFhxUf2SdIV7t1UcRfalEn DdRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SaWwEHXqFVCWNl+xHds+CNEaMO5Whr5sYPD8YOORCMw=; b=t0Ww1oqp0ATFY71BSvCtHuxqqvZxIXyuibchHQLehEwO5Bsrlhkvrs/U5KRW7tAFX0 kAkCAU7nyyGydNKJsrrZVc8XhVvaR5olx6JxeSdBsK2ZHU8XqXwlElbv1F84SS1uA8r6 dZDLvL2BIIEOvyS9941zcaKv3zC3H0KEkH/pjmwrd5YgaH7Jfz1PL2Ic1wlndGAfCzF4 W6m08YWgDvjnCkl+w8nUfnSIYEdJawz54bDdAGul/o2TmjFsoF1Z6iWiWCjzA2jfPr6G eMcaP7jk/vjZmfP5P0o0p62dW4/cweitVbZqF4Ql2XMuPe6rQaDDjDSWWoTacmooG+Nt iieg== X-Gm-Message-State: AIVw110d2zdggRM7dXi+kyeVtyOt8Ms9ogmxgLML42Ic4Uv5ubH+tGlZ Nt857TsbHWvuygVzQFYfuQ== X-Received: by 10.84.136.36 with SMTP id 33mr410549plk.123.1500427145272; Tue, 18 Jul 2017 18:19:05 -0700 (PDT) Received: from ddcc.svl.corp.google.com ([100.123.230.190]) by smtp.gmail.com with ESMTPSA id c22sm495751pfh.21.2017.07.18.18.19.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Jul 2017 18:19:04 -0700 (PDT) From: David Carrillo-Cisneros To: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Jiri Olsa Cc: Kees Kook , Sudeep Holla , Alexander Shishkin , Wang Nan , Elena Reshetova , Stephane Eranian , Paul Turner , Peter Zijlstra , Ingo Molnar , Sudeep Holla Subject: [PATCH 4/4] tools: perf: Fix linker error when libelf config is disabled Date: Tue, 18 Jul 2017 18:18:39 -0700 Message-Id: <20170719011839.99399-5-davidcc@google.com> X-Mailer: git-send-email 2.14.0.rc0.284.gd933b75aa4-goog In-Reply-To: <20170719011839.99399-1-davidcc@google.com> References: <20170719011839.99399-1-davidcc@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sudeep Holla When libelf is disabled in the configuration, we get the following linker error: LINK libperf-jvmti.so ld: cannot find -lelf Makefile.perf:515: recipe for target 'libperf-jvmti.so' failed Jiri pointed out that both librt and libelf are not really required. So this patch fixes the linker error by getting rid of unwanted libraries in the linker stage. Fixes: 209045adc2bb ("perf tools: add JVMTI agent library") Acked-by: Jiri Olsa Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Stephane Eranian Signed-off-by: Sudeep Holla Acked-by: David Carrillo-Cisneros --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.13.2.932.g7449e964c-goog diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 100a6c1670c8..d66f90e6be5c 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -518,7 +518,7 @@ $(LIBJVMTI_IN): FORCE $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=jvmti obj=jvmti $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN) - $(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt + $(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< endif $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h)