From patchwork Wed Jul 19 01:20:40 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: 108249 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp204151obm; Tue, 18 Jul 2017 18:20:57 -0700 (PDT) X-Received: by 10.84.129.103 with SMTP id 94mr419247plb.63.1500427256900; Tue, 18 Jul 2017 18:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500427256; cv=none; d=google.com; s=arc-20160816; b=rzZM2Mds46z1krKjwOlj5LiZ9PJ/Je3x0YL19XNd6K4tUhjAA6K1jQ4Dl37F+WrnPI y6PNDjdBpijOb3oDjp/y2vjF1g0R/LpcJzdKKavIUyk3QNv05GBZ+EOy8MrLDUQ9SwIj 5JuytIdUl7DMd2K4RpaypoeSC3QYWeufK6BseeP+SEUYghArAqazVgtmHS7rBzEmrIky ukk8w+9UvcRbEWSV8VcMD7HuHNlGqzX9gFnHHidAfKKqSwWjsYTvSqTN9uHbQpwxPS0q jbxQBjSEMkvymrwg9z96yTMvYjsxuj7oZOL7toYJ4Jvpq65c27kA3IcQp9F44JzHt40R dC2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=SaWwEHXqFVCWNl+xHds+CNEaMO5Whr5sYPD8YOORCMw=; b=xPOruA8ORDCBsSiB65gMzecDFldSRvwNzwg1/h4JcU7M2pzaW3pDHtvzF0/uamTt2X SyfZl8RlLE9vClajkwFbhhYXxGlK+S+ts2aa1dE/NHkeHyBw9Z9RgY/Y6HyZZpK6/Gyy QTCLtKrWFHFKsF8EBiq4quSaJbhQUQGvWb9V4SCu9fGZXvhGvoh4vHhStBm3XD/iRi0b lAuwRO9HBRHsC8OcUXF4r3Lt0Y0D0vgTRkchjT2YwV5Qbp/g/wXDoSTsTA29kwhgjsB3 Dv+j44nQr4wxUH5OYv6trabilO3XlWRG21nSCdvAQzKTbVRNZSUXFcyxnjLHJzXotcqd uSGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.b=nm+W7YNo; 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 a10si2902834pfe.264.2017.07.18.18.20.56; Tue, 18 Jul 2017 18:20:56 -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=nm+W7YNo; 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 S1752779AbdGSBUy (ORCPT + 25 others); Tue, 18 Jul 2017 21:20:54 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:35219 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752498AbdGSBUw (ORCPT ); Tue, 18 Jul 2017 21:20:52 -0400 Received: by mail-pf0-f169.google.com with SMTP id e199so19275433pfh.2 for ; Tue, 18 Jul 2017 18:20:52 -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; bh=SaWwEHXqFVCWNl+xHds+CNEaMO5Whr5sYPD8YOORCMw=; b=nm+W7YNogbS1Fe7cwU7vr+who0euU90tSzssKjitlHxvXIR9i/2MSvd1ucIcLXbDGO FxV1pN210N5WY8YJyDwj5FJZUcE/ev1dGDdwzgZNmbn1J5PBDH0fbsktaymHX3dyKCmf ASeZFHodJrAe/1QY0gWAuH0kZ5wPRdCTjdqYKcXZCI4qp0nEp9ZuaIosB1HuzE0TwCNK Vz+x2ZAgTJukFSfyCflTINOJ5DrwUC9lpX1xlJBAutXokHgrHfVAfWY3a1LnChNQZ56e aFJPqyS/vxDdsMjr6eeZBGxKCG1BndDqeDyBiRQXnvo2QbHAaKrBZIt1DeTqBVHxSwNq DthA== 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; bh=SaWwEHXqFVCWNl+xHds+CNEaMO5Whr5sYPD8YOORCMw=; b=Q6T0dYiNgTG6egvRBEesXZlScoiqcJ2SXAe9HqLNiC4QXzG0/K6q+vISguLu666wSE ijxMbglgbVtYeY3RrKrtDR+CbdoE996BHNRlqsdVImLjVh4N/U19tuhtws53hlQqHMwk ty2dc0QI2GvwPIIwAMgifCPUST0sbQEeQX+PMWPajXWVazCbNZCSyP8mcPLIuRyyxZuB bsHMnduvItW2Fxr1TVY5r699kcxL4BmNLwz9XhlXye/8ymX22eRhnKjMFs1pk7C3FkCm ekwJ9/YYST+uhDXsFWTC+w1IwYcQiREYEsQvN2GCs/w0yV+P9TNu76dLcbQyuvRU9h2X 096A== X-Gm-Message-State: AIVw1130HtZcVk06a9mbRFgBQuRFI39lIQgU9+K6X3vMgUelsb49Ds8v hgrpTHOKy6CxL3tT3zaLKg== X-Received: by 10.84.130.108 with SMTP id 99mr491352plc.76.1500427251800; Tue, 18 Jul 2017 18:20:51 -0700 (PDT) Received: from ddcc.svl.corp.google.com ([100.123.230.190]) by smtp.gmail.com with ESMTPSA id y6sm6712702pgq.41.2017.07.18.18.20.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Jul 2017 18:20:51 -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:20:40 -0700 Message-Id: <20170719012040.99522-1-davidcc@google.com> X-Mailer: git-send-email 2.14.0.rc0.284.gd933b75aa4-goog 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)