Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1476264lqj; Tue, 4 Jun 2024 02:44:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVdt6RtDVS65VQMWZs+xgXK6Z1lKPANzAi6UUWVWnedR/jwsSU3CKsNHmFdP0yXWdFco95qAxHZvx1q/gX5TgLEjMApWEj1XGL1b3fsZA== X-Google-Smtp-Source: AGHT+IGHtiLjiY5jMvaJn0RH9nueCmqAsPuobx+ZNEDVe0063i/7curG61hikWmRG+G+47pqy3GO X-Received: by 2002:a05:6a20:9148:b0:1af:9369:9a3 with SMTP id adf61e73a8af0-1b26f2c2cd6mr14406264637.44.1717494295203; Tue, 04 Jun 2024 02:44:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717494295; cv=pass; d=google.com; s=arc-20160816; b=a+E2lpwh3765TgFEVBpHV0q91bXpf6h4GdBbA4yT9zlADNXIfM+4MG3dVV8Q71AsvT kiuvjbXxy2iM0rETwxJk2VjjBXxROmhJMAI/Vn8uN1HROtpZCnIB1oiPeh34/ZNi0vo7 +GjP6RFA5AqJwxDyizH0H1SHgNZEOzNx3m34X7zkO4p9uDEQVrK3j44qm2S/Iy0B74Qy 7AsIC7jzX7DxAZ8ndXhZRC4KNendNZiQsRgCgbDouAD0y5F9FM7sLOUtoCBIWSRXyoYf LbDw5A1VXk9+VTlLk0Omfp2EPjX3QZT7qW/onJLdKd3uFb6QWPN6DdooJFT3bTnvuosw lYlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=/vUUc7AKQSefVanqPrVFmukr7jNlqueLbSa7YB6m/so=; fh=KSiWrCR7xjqa6nMnB8EyauKJbY8zFKZ3kSm6JhLxeok=; b=ABqEzMkJPi+/yjkeTCqIZi/djPZe6KWODY7BF+zmjttPQMoT4TEybvAMqlyp13lH+W dJCaaaHoL30W8AbZtV1bOCDUW+rWneUSAVPKvROau9gkOOx4ZvS+Mh5l8T5NlK3Gat2/ uHxldWtvhZCE4EX4Mg0zEEHeOkv+J0hptmgonVMMMmN/PnHq6tXB5zH6PumuJmWVmXBj 36e9BBlcbSdA7B1/khmSMsDQVuf6huB1EkCjE+KutBfTd3DxeoKLgy+Slvb6ilfnG4JS 6Xi8bTJxGCzXamj9fq0Hi3jX1EcpwhdzKSmC+2n4LiUeICnnK4Hb3vYuz0892MJDUncK D6BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-200357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a77b61ffsi1118713a91.107.2024.06.04.02.44.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:44:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-200357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6EBC4288A5E for ; Tue, 4 Jun 2024 09:33:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3CE8143C76; Tue, 4 Jun 2024 09:32:45 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C97EA1448F6; Tue, 4 Jun 2024 09:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493565; cv=none; b=azZYyvZ3o1Rtiyce09EWlVsg4A2NZNJmNyP2xYGwV0Kb5+h7Vs3x7+b5PVRe2s4fAqxXL9czFLci9GAiALmgUyQgdWvMiqfrkqBF/xxZi9a9r7nA9q0WasoZwJFHDuExlVRNgiUkPQ/8Zbuomgrg2jSPZFyu/6hvNuJLewaPf/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493565; c=relaxed/simple; bh=3bxksl8Ny84wUjMLk6cosHjxG9kquj8690iMjEdPc24=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=stZGSnt3ExBf2YdMUNSGVtABSMNiQXNaFs9vW1v7UB9v1UlhBaZ6uy1TviP2T0/rjyJPgXS0RvXEiSlW8yp6GFqk220SvkD9H+FbggP0wdWdWk2Ehr4yk0tgl2s16yPOGBE5Kwl4jqfHThT1fT88Di8OaPTIFphNS3ic/lowxPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 994161474; Tue, 4 Jun 2024 02:33:07 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8C6DE3F762; Tue, 4 Jun 2024 02:32:41 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , James Clark , Ian Rogers , "Liang, Kan" , Nick Terrell , Thomas Richter , Changbin Du , Fangrui Song , "Mateusz Kowalczyk" , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Leo Yan Subject: [PATCH v1 2/6] perf: build: Append libtraceevent path in PKG_CONFIG_LIBDIR Date: Tue, 4 Jun 2024 10:32:19 +0100 Message-Id: <20240604093223.1934236-3-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604093223.1934236-1-leo.yan@arm.com> References: <20240604093223.1934236-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When a user specifies the path for libtraceevent, it means a self-built package is being used instead of the distro package. This commit appends the specified path in the variable 'PKG_CONFIG_LIBDIR', so that later pkg-config can retrieve version info from the self-built folder. Signed-off-by: Leo Yan --- tools/perf/Makefile.config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 7f1e016a9253..f545e0c3c176 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -1181,7 +1181,10 @@ ifneq ($(NO_LIBTRACEEVENT),1) CFLAGS += -DHAVE_LIBTRACEEVENT $(LIBTRACEEVENT_CFLAGS) LDFLAGS += $(LIBTRACEEVENT_LDFLAGS) EXTLIBS += ${TRACEEVENTLIBS} - LIBTRACEEVENT_VERSION := $(shell PKG_CONFIG_PATH=$(LIBTRACEEVENT_DIR) $(PKG_CONFIG) --modversion libtraceevent) + ifdef LIBTRACEEVENT_DIR + PKG_CONFIG_LIBDIR := $(LIBTRACEEVENT_DIR):$(PKG_CONFIG_LIBDIR) + endif + LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent) LIBTRACEEVENT_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEEVENT_VERSION))) LIBTRACEEVENT_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEEVENT_VERSION))) LIBTRACEEVENT_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEEVENT_VERSION))) -- 2.34.1