Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4260162ybp; Mon, 7 Oct 2019 05:56:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGirtCsWOzKsTjN1OSB2g54ay2r/aTxHLDLWchd9bzU+4J7HqPLEoqT3RDj0TPCzv5EcPK X-Received: by 2002:a17:906:e0c2:: with SMTP id gl2mr23625958ejb.157.1570453001677; Mon, 07 Oct 2019 05:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570453001; cv=none; d=google.com; s=arc-20160816; b=pg7mJ2PZsnMvaFfL6dMj2lcFpAgDDEmlvi29msrsfNLMlI0m1mTNZJahhaw2rA/FD5 fwH7RlhBaFVZb4jkpJiGBAMfn82Dq8mk1UQ+6vLcI4nC6ioxcCF2yx4m63Emc5jLJA0N Z2mwYs7qB+vvab74gmYejuafOKHJOuebcDID7cox4ylyEemRU0fEK5vd+6aqVjKO1pSA nr52Ndp3WL7fow4az9Uh643V1PynQk13wOHnyV5LgV6z1TJ7x5c6JLVNf7t5XTMvN3gh c6RCedO4JvheibhShV1d2uzGuCpyiIwn1OlE1UEFpSpf33iIbyRkpaD7mxGcDuTPV6D6 ozHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jYyhm4Oy9PfDtAzMDJFgdmkLvA6FhLhNLWbRWO8jE6c=; b=yCpwfrPt0AlvQfaYhXD5UzVUFABrpoKcuGLqmeG7NBQq5NwInZ6WLPQqSQJED/3h+z Bl6i6CGqxfo602ewDXazJjdyzi3zFRmXQTRLNETUflFbytIfDQZc/HFlC4ow/dHhsPM9 8W5/c8X5GsHt1FTDPhaliW0a3XaqLuOdCw/ONQU/bcfs/sjqpQXRJOjri4DBRpb0bjWy sIjAjBWtEamGF0huVaBPeNx2i8aUYGes2lK6YKCA1Qbkm+PAF2M3nwDGt38AUy7icxjB cdZIXzJLoo1k7b9dnL4V1kCF04p0XfUD6ZdBLcbQwe2b1JTZysd7gtJd8ltKRzfFkfGL Vw+w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qq14si1064181ejb.437.2019.10.07.05.56.18; Mon, 07 Oct 2019 05:56:41 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727923AbfJGMzY (ORCPT + 99 others); Mon, 7 Oct 2019 08:55:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55436 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727936AbfJGMy5 (ORCPT ); Mon, 7 Oct 2019 08:54:57 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54CED10C0929; Mon, 7 Oct 2019 12:54:57 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3C855D9CC; Mon, 7 Oct 2019 12:54:55 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 30/36] libperf: Link static tests with libapi.a Date: Mon, 7 Oct 2019 14:53:38 +0200 Message-Id: <20191007125344.14268-31-jolsa@kernel.org> In-Reply-To: <20191007125344.14268-1-jolsa@kernel.org> References: <20191007125344.14268-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 07 Oct 2019 12:54:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Both static and dynamic tests needs to link libapi.a, because it's using its functions. Adding also include path for libapi includes. Link: http://lkml.kernel.org/n/tip-ws9g47hh5vnkvdwpn93mtr3f@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/lib/Makefile | 1 + tools/perf/lib/tests/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/lib/Makefile b/tools/perf/lib/Makefile index 0889c9c3ec19..0f233638ef1f 100644 --- a/tools/perf/lib/Makefile +++ b/tools/perf/lib/Makefile @@ -107,6 +107,7 @@ else endif LIBAPI = $(API_PATH)libapi.a +export LIBAPI $(LIBAPI): FORCE $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a diff --git a/tools/perf/lib/tests/Makefile b/tools/perf/lib/tests/Makefile index 1ee4e9ba848b..a43cd08c5c03 100644 --- a/tools/perf/lib/tests/Makefile +++ b/tools/perf/lib/tests/Makefile @@ -16,13 +16,13 @@ all: include $(srctree)/tools/scripts/Makefile.include -INCLUDE = -I$(srctree)/tools/perf/lib/include -I$(srctree)/tools/include +INCLUDE = -I$(srctree)/tools/perf/lib/include -I$(srctree)/tools/include -I$(srctree)/tools/lib $(TESTS_A): FORCE - $(QUIET_LINK)$(CC) $(INCLUDE) $(CFLAGS) -o $@ $(subst -a,.c,$@) ../libperf.a + $(QUIET_LINK)$(CC) $(INCLUDE) $(CFLAGS) -o $@ $(subst -a,.c,$@) ../libperf.a $(LIBAPI) $(TESTS_SO): FORCE - $(QUIET_LINK)$(CC) $(INCLUDE) $(CFLAGS) -L.. -o $@ $(subst -so,.c,$@) -lperf + $(QUIET_LINK)$(CC) $(INCLUDE) $(CFLAGS) -L.. -o $@ $(subst -so,.c,$@) $(LIBAPI) -lperf all: $(TESTS_A) $(TESTS_SO) -- 2.21.0