Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp873864ybg; Fri, 18 Oct 2019 08:37:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpQI/KQvqqW8ayPOoMHd7/pxYE83GAnHEqi3KuVPulIgJWqb/qn3HX509hwVJHzjJqxfol X-Received: by 2002:a17:906:1b0c:: with SMTP id o12mr9179664ejg.312.1571413064036; Fri, 18 Oct 2019 08:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413064; cv=none; d=google.com; s=arc-20160816; b=YDIx9cyfRz2lkC/JlteQGLzJW1OohcfyGB8Om4bi2B6JaZhMrpXqv9Jpn2z/F7Lznn SuV4fYO0agROMDtZvMeqypd7RcgxiCwqTxRHANMHiJcdf14PtYEFnlg5f8cF81z4e+Vr yz4bWDNBoAyYalko6TDpsO9WolFc7txUcW1Xdo/w5de7AesuxnWsa1ndZB0l3OkUl5bx 10GM8UytbxlIlitLQoNBN8oYWx4Di78rFVDU+c7C9uCtBLPM9LrJpUmK6iQgO5a03Kix bGvjVZEMZRilvebmwlU1twW0LaWOv22w5UKk/wjR1ySqPeqYGZr5TiFckgWO//v7dzRP IBhQ== 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=tJj/8gTb0azFd8tw2RJj0BHuohxNHzdp7/CapiyKg2hlLZFEicr/XvOJBp70cgU+nS Iq46bzpiV7FuDkttMytLgiSeIr622RfKtTrcKLgWodcDjaCzM32hWoegAXxpDfhcxXsX 8NaI+mdkFosEUZwAPx86yb4MmgrndrXIQ+6daa4YyH6aRyufQfCIYpZQC6ptq5LiOXaT voEvltnqMAi47dP639WL1QiquvCfzzebI+eLopr92cqo1iZHk1P6pYq5sNihR+FKxkhS qAYQbLaFukFxG2EL4W5q8MUuEey6Wfad6w1F2OviL1Mf1oZ0BOhAyutOSn+dL67pYwI4 t5Gw== 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 w11si3602020eji.160.2019.10.18.08.37.20; Fri, 18 Oct 2019 08:37:44 -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 S2409218AbfJQK7h (ORCPT + 99 others); Thu, 17 Oct 2019 06:59:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38768 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409211AbfJQK7c (ORCPT ); Thu, 17 Oct 2019 06:59:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AD9818C8924; Thu, 17 Oct 2019 10:59:32 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35EC85D71C; Thu, 17 Oct 2019 10:59:30 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Andi Kleen , Stephane Eranian , Jin Yao , Alexey Budankov Subject: [PATCH 04/10] libperf: Link static tests with libapi.a Date: Thu, 17 Oct 2019 12:59:12 +0200 Message-Id: <20191017105918.20873-5-jolsa@kernel.org> In-Reply-To: <20191017105918.20873-1-jolsa@kernel.org> References: <20191017105918.20873-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Thu, 17 Oct 2019 10:59:32 +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