Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1411659ybe; Fri, 13 Sep 2019 16:34:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyagk2IRhJtb4dEOUsBvse3E87rJroXJCTzduJ2INEpNrl0957PpNJLR7rXIqk8A1pGix3+ X-Received: by 2002:a17:906:29c7:: with SMTP id y7mr42086345eje.287.1568417665367; Fri, 13 Sep 2019 16:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568417665; cv=none; d=google.com; s=arc-20160816; b=O20ms96h7QVAaNLVhO3E97U/UkcJknZOyfSbRnG5BvCGNoGMRHlqEG5DfXBNTL/+zT V5twPIrIxerwEsxr+q+OTfb6Q6XE3x8UaTne5xtdYoxrl77/ygN9EDvrx2lhH/JGjdae feiIX35hjbgtqnKMxwoc99b1D1/uRRrwSspqTfz8xGC6bQh7QY+s6ePORUDSHGkl+x3/ ETKmsOREVgUayhWq8FXTc5kQ0A8F+vIVqEJBUEDsMlj4fZ/pvA58nj9btmyEe8ePUsXI 42eW95xpXXyPh0XlHo5ZK0y9Oj6M20Ssz6CQA6RYKKfiuQss2LXNR0pHHYlyZeFs5VYn P+7g== 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=G3moQeh19WcfmEChvQ5Fwbhpz+WK3MsZ490dkYBG2TntRjU/Ajr4JHxsLF3WIMbBLo 97ZyXvVjRvG1WI+6dlcf5ON5i3R0kH1g8DKMa0dBPzXdHwfEHUqjwZ+13H5xfaGsruG+ qn0q9MfeAAJ4uYS13m9uqNthQWsBF2zg/Utk4ZL8L69UGs50U9cnmG2KA6l8I+dKMxam MaeLv/52smJSMr1cKXWwP/ZDk7JBJgRndL02HIF1twfaRmho28HQPtLwAF4go9J+nGKa Kb8mGks+/fepkKoSJY4KJHySgT9xNsgMZXNdA/Tq05qA4DL553nI6o2KnJ6emB8ePakc pO6A== 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 r23si16697448edp.443.2019.09.13.16.34.01; Fri, 13 Sep 2019 16:34:25 -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 S2390804AbfIMN0l (ORCPT + 99 others); Fri, 13 Sep 2019 09:26:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403838AbfIMN0j (ORCPT ); Fri, 13 Sep 2019 09:26:39 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 510F4877A63; Fri, 13 Sep 2019 13:26:39 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA5EF5C1D4; Fri, 13 Sep 2019 13:26:37 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 67/73] libperf: Link static tests with libapi.a Date: Fri, 13 Sep 2019 15:23:49 +0200 Message-Id: <20190913132355.21634-68-jolsa@kernel.org> In-Reply-To: <20190913132355.21634-1-jolsa@kernel.org> References: <20190913132355.21634-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Fri, 13 Sep 2019 13:26:39 +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