From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id F094312E48
	for <linux-perf-users@vger.kernel.org>; Thu, 19 Sep 2024 01:35:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1726709736; cv=none; b=C4iGXTwhilFErTfcqJamT1iY5hoa4VDCb33Ps3jeEHjZTIBGGbzTkR9evhDYqLo0sMS0UIeJVkHCEv+xdnLhRjm359lBmzW+3+Z7RRGHRTaNqx0phshXSBFcNacb+ByO3fYOLeDfBAeO2ThW3BM8+izQj1tKqbgWk8DDQVXjNdo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1726709736; c=relaxed/simple;
	bh=+BfpS3KEqyEFGD4EVRK0cm8e+bH48T32ouVTTydTMQY=;
	h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=eK3wKFxXGVZQldfEuWntk3BVl1AvPNS/Gfdxrb8WI+MW/rtfQtgmSc1uwT3BxaFYfXA8i/ODFNxrcXR4tYs6+yjRKPvHoIY31Y4Q4rkrAyr17Vn2wjxeknTYpVL5pxBODOnn6bm4zI/p/soWpG/5nnkxHqheD7kUP4lm7P4Bilg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=FX06LFe5; arc=none smtp.client-ip=209.85.210.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="FX06LFe5"
Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-71957eb256bso286780b3a.3
        for <linux-perf-users@vger.kernel.org>; Wed, 18 Sep 2024 18:35:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=bytedance.com; s=google; t=1726709734; x=1727314534; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to;
        bh=r1e3S9pWTm/lEVJSPmr9Y58STRzRcLqR0sL+KSgVD4Q=;
        b=FX06LFe57QP1po872zLLPVt84oVA1axhqFaN0ukg53GnVvdDGZMLhZSt0CseIZKnMR
         4sq2QjClBqXGadJl4l7tcrWCZg7iLByQxlEcY4bI73lhPukOzl7+SQQBzQLZdin77Q9K
         1hm53XDsj+qrxVpRTaBXYbqQvvIJQKR0FORuUjyubaB1O3gGJ3nP4qgdoC3AHEGsB+Et
         Bz4R6Or+PLshab2aNvuXchRw6Ecsug1aDhFk9Mkq4DUZ5+Zrm4c8tKr5kJsi+gcC4THZ
         WkV1YEyK9RXXlnhBPSqNebWog/g8Hq6AE9TtXviW692zg+c1ZUoCSkWbITe0CRsnXVDY
         1w7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1726709734; x=1727314534;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=r1e3S9pWTm/lEVJSPmr9Y58STRzRcLqR0sL+KSgVD4Q=;
        b=Ku5gH0E+Qgv9n8ASdJ2Xux9IAFSc8ZdbV8PzzQdA4Qz2rcRKG+wsvRw9M2RB41R2yx
         vsxEuSuq09QRymS+3RKUhMDTn7kYDxo3+JiCvaqtiit9NT7qoy5v8iWTKqk37wXHVNj1
         O34CQevPTx05mg20LJCD5roaENLh/Ki59bemyARae2nRIsgTwYQ31jauReq2VFYdiTpF
         5RiEwlrP9JdREUC6SUmc2K0CeldPXA1El7USSxxbiNHTg14ndVapKssV8qdWTQukGeGP
         RXdhCOY+dZVHQ0x9LQrdzEby1BXDNDPahvxEcZZmZsS9LwlB5L2WVJSfxBuPEt33zLfk
         bSLw==
X-Forwarded-Encrypted: i=1; AJvYcCUuX/Rbj97urJQIytjn3+R5ZLCPg4W8YkRlug+7KQ/dvYy3Ec6Qv7SUj0HkdmdbKhGJRo7KVhjeDbxiGBES9edB@vger.kernel.org
X-Gm-Message-State: AOJu0YyknRhpEPNduq73k6kzO9pQTh0m/sMz2EwPFie4VvunXNaW11e2
	T3yfqpDZtklFi0qTrsOPOQNAEiz6EFvYyMNe/NS1eMODb2Elkp3Lti2L2X1PG0k=
X-Google-Smtp-Source: AGHT+IHQSQLaTaoG8epxHCgtggUQaJH8zELCvKB6tmSjd6xX6jo/pz1O8xhjQg3WkdHnuLbwgbf0Eg==
X-Received: by 2002:a05:6a21:164a:b0:1cf:3461:2970 with SMTP id adf61e73a8af0-1d112eaaf50mr32036486637.41.1726709734103;
        Wed, 18 Sep 2024 18:35:34 -0700 (PDT)
Received: from ubuntu20.04 ([203.208.189.11])
        by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944bc9ed9sm7282482b3a.209.2024.09.18.18.35.28
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 18 Sep 2024 18:35:33 -0700 (PDT)
From: Yang Jihong <yangjihong@bytedance.com>
To: peterz@infradead.org,
	mingo@redhat.com,
	acme@kernel.org,
	namhyung@kernel.org,
	mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com,
	jolsa@kernel.org,
	irogers@google.com,
	adrian.hunter@intel.com,
	kan.liang@linux.intel.com,
	james.clark@arm.com,
	linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	leo.yan@arm.com
Cc: yangjihong@bytedance.com
Subject: [PATCH RESEND v3 0/3] perf: build: Minor fixes for build failures
Date: Thu, 19 Sep 2024 09:35:10 +0800
Message-Id: <20240919013513.118527-1-yangjihong@bytedance.com>
X-Mailer: git-send-email 2.25.1
Precedence: bulk
X-Mailing-List: linux-perf-users@vger.kernel.org
List-Id: <linux-perf-users.vger.kernel.org>
List-Subscribe: <mailto:linux-perf-users+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-perf-users+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Changes since v3:
 - Add reviewed-by tag from Leo. (see Link[1])
 - Resend the patchset with no code changes.

Link[1]: https://lore.kernel.org/all/b5688d4a-9389-4998-8031-3f002302311e@arm.com/

Changes since v2:
 - patch1: change LIBDW_VERSION to follow up the style of
   LIBTRACEEVENT_VERSION. (by Leo's suggestion)
 - patch2: Use a new line for the -ldl dependency and with comment,
   synchronize tools/perf/Makefile.config. (by Leo's suggestion)
 - patch3: include header files in alphabetical order,
   add reviewed-by tag from Leo. (by Leo's suggestion)

Changes since v1:
 - patch3: Remove UTF-8 characters from build failure logs

Yang Jihong (3):
  perf: build: Fix static compilation error when libdw is not installed
  perf: build: Fix build feature-dwarf_getlocations fail for old libdw
  perf dwarf-aux: Fix build fail when HAVE_DWARF_GETLOCATIONS_SUPPORT
    undefined

 tools/build/feature/Makefile | 5 ++++-
 tools/perf/Makefile.config   | 7 +++++--
 tools/perf/util/dwarf-aux.h  | 1 +
 3 files changed, 10 insertions(+), 3 deletions(-)

-- 
2.25.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5985820B04
	for <linux-perf-users@vger.kernel.org>; Thu, 19 Sep 2024 01:35:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1726709742; cv=none; b=WGh3/3LcfUQ6dybSZ9xUPyjy/ycYyEzeZhGhP6ZiRRXSqYYnOB3cTqvUjshkzLhzhCd5Z7Cs2qusfauNykDbRHFHQah7lJBfJ2RuVHlqXbMpvINwmnF25n/8UTBCSNwQQpv+4yPiKPetkSnkpunWw7+cUirbHVoRdtksxe5jAtQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1726709742; c=relaxed/simple;
	bh=F8b1g0Z92Ug19zyp6jdn3B4tPcHN849288VrkCnUjIA=;
	h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
	 MIME-Version; b=Pa9OqdwO0aYVgoMJ/gKrQEib4wHMliE+TVv12A6JSY7eyRQI+YnLmqcPmkiKWOipdVAXPhNgbElRZsyaTk2iNVrfpIJAcfs3XfX7l3GkEDbWMKY9z5S2hv92BmUO2yXJLW1sNOXpuPK3+20FyfLWTaWSGbQqb4klUnAENiwt0UQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=S2lA03LY; arc=none smtp.client-ip=209.85.210.171
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="S2lA03LY"
Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-718e285544fso215388b3a.1
        for <linux-perf-users@vger.kernel.org>; Wed, 18 Sep 2024 18:35:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=bytedance.com; s=google; t=1726709740; x=1727314540; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=6PRoelqNRnL/2mNFBQIluG5bm8U+edM43UW4Amub3LA=;
        b=S2lA03LYEWc4BDSAzAnAmd7kYqJ3LPl81V4f9eQLl3bSVJgD5PGPy+zF5UQX4MOK8I
         RJx3z44fN0LC338zpq6MA4YzEZIT4QW/tWa/cG0iIZvHuBj4zW/OwtMjwvkMYZpH7poh
         SI5huoJgL0+UYBBW1HKSnbXnuo9BqugoApR9FGcs4TfcqDv6pX8+7+Bldr4l44eIHyEx
         63bYjEcdN77AuEvIbNu7AO4q4GVU8fd72YJ/09mWOTuZj6BPpMW6DNLWmukmDeoCi65s
         +c2upaj6spkCTad522CIqbESygcELibXEZC6vp4S0qGfglo9RcVSqPxrVv98Pm+jz0Pr
         JNGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1726709740; x=1727314540;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=6PRoelqNRnL/2mNFBQIluG5bm8U+edM43UW4Amub3LA=;
        b=njfQHNrVGc7RXcF7OVycqezwKBDFH4Ctqnkq/mszgMLOhxJMyT4GrRo3jVKqZPIaR6
         jKE5n3W6FYVLBZxttnw7wSijFRKI9U+Jo0N7IdiXAWkNv+gK5vnBKJS5lWZVzktqBzed
         JRszho55nvZIzCugZ862HqdtKs9FCh5YbY1zaD2d5ykYZ99tj39q6vV1SFVEWs1Siblb
         mC+mUnORqpcGin8eiyFbkt20JLRoOPSsVUNSxOse0BVj6Z8VzVXAqxN0f5sqMNI9iO6J
         7We7u5+FXnKTj6qr5athN4kmK+NBgZiZhO+3zvok94es99RNftKRCo1VKFGpZTcmUThL
         UkBg==
X-Forwarded-Encrypted: i=1; AJvYcCV3FJfwdkLr87dOGj+OvrOOLGfQS5Eo8UeBP4pJ05sB4bSVjGM0vYc2WhTKJygn8B+1DKeSJ01O/zAECjL6N2Sd@vger.kernel.org
X-Gm-Message-State: AOJu0Yy+cI6k5nIeDVH/Ka/0gfXY7eaoRqnbBFO8YYXzbDKjz5lh8zpI
	FLFTXMNkdHcO5JWeC/AZf0Iemj4KzzqY71O+iHGIrhWCIQSjSAPhAJRBmNiko5o=
X-Google-Smtp-Source: AGHT+IHbp4ok7dwua8+rGMyIXaJ4OmQHsgI/Zg3VmaOM5LiSUWeDv79Fh3Tgx0+xDLeSw5mSA3VQvQ==
X-Received: by 2002:a05:6a00:1799:b0:714:1bd8:35f7 with SMTP id d2e1a72fcca58-71936a60297mr27646676b3a.15.1726709740529;
        Wed, 18 Sep 2024 18:35:40 -0700 (PDT)
Received: from ubuntu20.04 ([203.208.189.11])
        by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944bc9ed9sm7282482b3a.209.2024.09.18.18.35.34
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 18 Sep 2024 18:35:39 -0700 (PDT)
From: Yang Jihong <yangjihong@bytedance.com>
To: peterz@infradead.org,
	mingo@redhat.com,
	acme@kernel.org,
	namhyung@kernel.org,
	mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com,
	jolsa@kernel.org,
	irogers@google.com,
	adrian.hunter@intel.com,
	kan.liang@linux.intel.com,
	james.clark@arm.com,
	linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	leo.yan@arm.com
Cc: yangjihong@bytedance.com
Subject: [PATCH RESEND v3 1/3] perf: build: Fix static compilation error when libdw is not installed
Date: Thu, 19 Sep 2024 09:35:11 +0800
Message-Id: <20240919013513.118527-2-yangjihong@bytedance.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20240919013513.118527-1-yangjihong@bytedance.com>
References: <20240919013513.118527-1-yangjihong@bytedance.com>
Precedence: bulk
X-Mailing-List: linux-perf-users@vger.kernel.org
List-Id: <linux-perf-users.vger.kernel.org>
List-Subscribe: <mailto:linux-perf-users+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-perf-users+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

If libdw is not installed in build environment, the output of
'pkg-config --modversion libdw' is empty, causing LIBDW_VERSION_2
to be empty and the shell test will have the following error:

  /bin/sh: 1: test: -lt: unexpected operator

Before:

  $ pkg-config --modversion libdw
  Package libdw was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libdw.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libdw' found
  $ make LDFLAGS=-static -j16
    BUILD:   Doing 'make -j20' parallel build
  <SNIP>
  Package libdw was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libdw.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libdw' found
  /bin/sh: 1: test: -lt: unexpected operator

After:

  1. libdw is not installed:

  $ pkg-config --modversion libdw
  Package libdw was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libdw.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libdw' found
  $ make LDFLAGS=-static -j16
    BUILD:   Doing 'make -j20' parallel build
  <SNIP>
  Package libdw was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libdw.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libdw' found
  Makefile.config:473: No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR

  2. libdw version is lower than 0.177

  $ pkg-config --modversion libdw
  0.176
  $ make LDFLAGS=-static -j16
    BUILD:   Doing 'make -j20' parallel build
  <SNIP>

  Auto-detecting system features:
  ...                                   dwarf: [ on  ]
  <SNIP>
    INSTALL libsubcmd_headers
    INSTALL libapi_headers
    INSTALL libperf_headers
    INSTALL libsymbol_headers
    INSTALL libbpf_headers
    LINK    perf

  3. libdw version is higher than 0.177

  $ pkg-config --modversion libdw
  0.186
  $ make LDFLAGS=-static -j16
    BUILD:   Doing 'make -j20' parallel build
  <SNIP>

  Auto-detecting system features:
  ...                                   dwarf: [ on  ]
  <SNIP>
    CC      util/bpf-utils.o
    CC      util/pfm.o
    LD      util/perf-util-in.o
    LD      perf-util-in.o
    AR      libperf-util.a
    LINK    perf

Fixes: 536661da6ea1 ("perf: build: Only link libebl.a for old libdw")
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Yang Jihong <yangjihong@bytedance.com>
---
 tools/build/feature/Makefile | 2 +-
 tools/perf/Makefile.config   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 5938cf799dc6..6f1c961f0ede 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -172,7 +172,7 @@ DWARFLIBS := -ldw
 ifeq ($(findstring -static,${LDFLAGS}),-static)
   DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd
 
-  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw)
+  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw).0.0
   LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))
   LIBDW_VERSION_2 := $(word 2, $(subst ., ,$(LIBDW_VERSION)))
 
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 4dcf7a0fd235..0049fd41cf57 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -149,7 +149,7 @@ DWARFLIBS := -ldw
 ifeq ($(findstring -static,${LDFLAGS}),-static)
   DWARFLIBS += -lelf -ldl -lz -llzma -lbz2 -lzstd
 
-  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw)
+  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw).0.0
   LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))
   LIBDW_VERSION_2 := $(word 2, $(subst ., ,$(LIBDW_VERSION)))
 
-- 
2.25.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8CF11CF8B
	for <linux-perf-users@vger.kernel.org>; Thu, 19 Sep 2024 01:35:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1726709749; cv=none; b=E2zeQhJS9OjcKn9WDhNrYr5/zv9WE+wUkXLMHon2yM2nozFnX+4bgPf7by0RHLM5BudzRniVPdpCSdpkvvjI1WfKsSjAd68v08kEZvsksqhFzHCZ8f1rJizftIz11VG/6GpZngTvTIcYgGIVosXd3iAt+317IEBcbHYT7KurV2Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1726709749; c=relaxed/simple;
	bh=PjKZwYz/qw8iWT80kCLlkaaJkclWhXR9GCyS8HXcdZM=;
	h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
	 MIME-Version; b=Jkm8aiF6mSLc1lrVGQltDjPNErGH4NVqztWmKm8h0bIdlM7PYrlnxYM4SMX7Sq8Z5jLdK6nO1c9Um0byPIN+Dy88Re7B1dPyXERUSDqs+teeuBU4+jIJJTA4zrz31gICF1KKCKH/vtjoUU9bmqD+d2aWWFAiqiGDVFYTXN/kjGM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Dhd/3g2+; arc=none smtp.client-ip=209.85.210.179
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Dhd/3g2+"
Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-7193010d386so233005b3a.1
        for <linux-perf-users@vger.kernel.org>; Wed, 18 Sep 2024 18:35:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=bytedance.com; s=google; t=1726709747; x=1727314547; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=dRPR2z4bSKPgcYHClioZjkMZaKzgMP6y1ywJmn+vlyw=;
        b=Dhd/3g2+MgHW0brRUMZTY7JsZYZ/ZKkXEsf/E+3VLeSl939BGgNbgkFMhvf0MbrZzK
         EgPAeSnVkwPjD7uYD1KPXIDOzc50x2oiGzXOe6wbB+vDaOy62n7iN7xp8u9KMZ2L7ls4
         EeQBzzYIgsRgJEKMVjW6uFLsrozVBmGq0o63oNNUYhsBG32IcmE3QTctynbyMfz0c8Ti
         WlBVNkE5v6zhhPgwYWz/a29R6VrgLZ+5pZnASOehmKoLJ8ZRoW68g5eltKUehDn22rLy
         k384w30W1Icxj45p9mSARoQ5FLvLTUArd0GmKj5vFoABzwPk6Yuoz0o2XhNZJ1xkkz4j
         /nXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1726709747; x=1727314547;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=dRPR2z4bSKPgcYHClioZjkMZaKzgMP6y1ywJmn+vlyw=;
        b=sCcoVytAqP5j8EHw+jzwP/myu32t5LJ5aDltqWmUotynMeBG6/uIM70eiHp8uljZLD
         tBqnqwM3+xGp9V1VJvugE2sNscn7Zgqu8a8FrBEQeCU282QaX/79g9OaV0nfo7BGdb2z
         tbbYevMeQbjeLpXZ8v3Js7RI9DWrFKDRWVV4cMSy9tXRo0EnBbi1D4BAh7FJ8GOms2bQ
         ABvgm+blAcJl9CGBw3MjmczzzyYHeYj1twOA8CePnPArEewp2Ww7Ers70JavCFmEiN7X
         Hm+YqNz+vyfkboJuwdQoW41l42g1blEZs4rQ1mtS/6cmdEW9+Y+BSSMsDIdD1GeunlIs
         ygeA==
X-Forwarded-Encrypted: i=1; AJvYcCXT45JYTZ2WTk3VlnF80/cw4tQxvI83psfdcusbPUD99/g0+mPewuEq7vBUuzT+7zt2fu+n1nIbq2tHn9rwBpGc@vger.kernel.org
X-Gm-Message-State: AOJu0YwpQIM6QSPLQ1CdwBeXDXSoTfxjjh+db0Mtp+ZaikC6BTEkotKL
	sckdZP1rOGjfgm1ZoW6MdZwqCJne8kdAUjCbnG8qVX+umRVyUYhBTbq7mZO2Dz4=
X-Google-Smtp-Source: AGHT+IHJmMjgMpHs8cK/HKaUs5kUDu2r20vARZpe1WeIcoN+SfDr0aRr0YIJACU2NRUalrc6n6Fr5Q==
X-Received: by 2002:a05:6a00:2d17:b0:717:9483:5887 with SMTP id d2e1a72fcca58-71936a4b6a0mr29329476b3a.8.1726709746807;
        Wed, 18 Sep 2024 18:35:46 -0700 (PDT)
Received: from ubuntu20.04 ([203.208.189.11])
        by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944bc9ed9sm7282482b3a.209.2024.09.18.18.35.40
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 18 Sep 2024 18:35:46 -0700 (PDT)
From: Yang Jihong <yangjihong@bytedance.com>
To: peterz@infradead.org,
	mingo@redhat.com,
	acme@kernel.org,
	namhyung@kernel.org,
	mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com,
	jolsa@kernel.org,
	irogers@google.com,
	adrian.hunter@intel.com,
	kan.liang@linux.intel.com,
	james.clark@arm.com,
	linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	leo.yan@arm.com
Cc: yangjihong@bytedance.com
Subject: [PATCH RESEND v3 2/3] perf: build: Fix build feature-dwarf_getlocations fail for old libdw
Date: Thu, 19 Sep 2024 09:35:12 +0800
Message-Id: <20240919013513.118527-3-yangjihong@bytedance.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20240919013513.118527-1-yangjihong@bytedance.com>
References: <20240919013513.118527-1-yangjihong@bytedance.com>
Precedence: bulk
X-Mailing-List: linux-perf-users@vger.kernel.org
List-Id: <linux-perf-users.vger.kernel.org>
List-Subscribe: <mailto:linux-perf-users+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-perf-users+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

For libdw versions below 0.177, need to link libdl.a in addition to
libbebl.a during static compilation, otherwise feature-dwarf_getlocations
compilation will fail.

Before:

  $ make LDFLAGS=-static
    BUILD:   Doing 'make -j20' parallel build
  <SNIP>
  Makefile.config:483: Old libdw.h, finding variables at given 'perf probe' point will not work, install elfutils-devel/libdw-dev >= 0.157
  <SNIP>

  $ cat ../build/feature/test-dwarf_getlocations.make.output
  /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libebl.a(eblclosebackend.o): in function `ebl_closebackend':
  (.text+0x20): undefined reference to `dlclose'
  collect2: error: ld returned 1 exit status

After:

  $ make LDFLAGS=-static
  <SNIP>
    Auto-detecting system features:
  ...                                   dwarf: [ on  ]
  <SNIP>

    $ ./perf probe
   Usage: perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]
      or: perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]
      or: perf probe [<options>] --del '[GROUP:]EVENT' ...
      or: perf probe --list [GROUP:]EVENT ...
  <SNIP>

Fixes: 536661da6ea1 ("perf: build: Only link libebl.a for old libdw")
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Yang Jihong <yangjihong@bytedance.com>
---
 tools/build/feature/Makefile | 3 +++
 tools/perf/Makefile.config   | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 6f1c961f0ede..1658596188bf 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -181,6 +181,9 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
   ifeq ($(shell test $(LIBDW_VERSION_2) -lt 177; echo $$?),0)
     DWARFLIBS += -lebl
   endif
+
+  # Must put -ldl after -lebl for dependency
+  DWARFLIBS += -ldl
 endif
 
 $(OUTPUT)test-dwarf.bin:
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 0049fd41cf57..4ddb27a48eed 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -147,7 +147,7 @@ ifdef LIBDW_DIR
 endif
 DWARFLIBS := -ldw
 ifeq ($(findstring -static,${LDFLAGS}),-static)
-  DWARFLIBS += -lelf -ldl -lz -llzma -lbz2 -lzstd
+  DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd
 
   LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw).0.0
   LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))
@@ -158,6 +158,9 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
   ifeq ($(shell test $(LIBDW_VERSION_2) -lt 177; echo $$?),0)
     DWARFLIBS += -lebl
   endif
+
+  # Must put -ldl after -lebl for dependency
+  DWARFLIBS += -ldl
 endif
 FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
 FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS)
-- 
2.25.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id B57321DFF8
	for <linux-perf-users@vger.kernel.org>; Thu, 19 Sep 2024 01:35:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1726709755; cv=none; b=UhWjyBDB+hhEzG70TUhLkOl5jXGWAT6kmTlsibjfk7paW/G7nKuiS+y+s9D6r/G5+kxPGboa3B8sVWujF5lcPwA5g2gpYvf72Nk5eEqyQw6nZia5bilAdiObKeMV4+BzneKQN43+1rVca9Akk8Km9pBdAstY/+8eqzJExjAWUwg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1726709755; c=relaxed/simple;
	bh=quPAw/YDVglqeBc/pZOlGo1b4LH4gcDFKP2lbdn6t4Q=;
	h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
	 MIME-Version; b=XZ2DkbhsR5D1AhkovM6HDIcW8afK+ElUzqv0QMxrvR+ZoOmeJPnUzr8PHwKEW93JOC8yHMlAfmf61F2H+7q7jpIbzpLaI5vZQgqOz/00n4jcPHFk/lApvZo1eWeP4t9AdkD57O+/bVG5IVSGAz4nBdlRbOBbje3iJdACDS1kr1k=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Q78xypdg; arc=none smtp.client-ip=209.85.210.169
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Q78xypdg"
Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-71798661a52so259850b3a.0
        for <linux-perf-users@vger.kernel.org>; Wed, 18 Sep 2024 18:35:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=bytedance.com; s=google; t=1726709753; x=1727314553; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=npTyP93XedPkwqp1pklFR6c6ybhIMeDgxugJALQqnq8=;
        b=Q78xypdg+Rf2PqrM634/YVRwe6ss8TYa2ZTVXRA5TXGWZcldDfL2kisP5DYSDU8opT
         dwkEX/dX22mC3q/affO/eNEnGEeiMptGe/diSXkS7fU50Ob/bkpfUW8OiROFioPDL7v+
         M9VJip1S9PCM9+NtCKoaupP9aBH4jXH0yWhUGQROj463bmY5ol6TIYxU4B5xRzaRQ2pO
         AvpyrcFbkbOCGl8dgf0Y0ztr3bR/NrdTJSltYCq6Wt+MVAuS0gyM2QMKkYaVlsPqjHDn
         zWIu3CkLNrShkak3Tprk+AvaJ0VrFoWTjd53puUi0lL1td9XgWOftBEDnuE+s3W729of
         mAnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1726709753; x=1727314553;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=npTyP93XedPkwqp1pklFR6c6ybhIMeDgxugJALQqnq8=;
        b=PUVt9Pt5pN/X5ScN9/UjIswffGSA73VDF6SUUrgctosyTAT5TmPl3VpcCi7sFAYJba
         wjJyH7ZzjfHNKg1zmjxuriGsv+AdzPUzvy0+KhrQ0V+YwcA3IGRkBoMNycmMYj41IGye
         m8qWtukZqWrJbkbsRDZwbjRuMoGNMnvm8EunhJY1R/a00LuouIRuq+Z1AcaQOtMt52aD
         mR+no2lFd58NLVHAkfJVW2vEmeHezfraKfb8h1ogYZYzALAy2jthFXmI0Fy+QCU/TGpj
         UakKV8BpU27WChMhhKZKoRov+JWNtKlF2jWqCF6/0Xveae1HZ85zchsXLO5Wijsw6fC2
         Mo6g==
X-Forwarded-Encrypted: i=1; AJvYcCWB58+Jkswr4vcr5qrjUu38OlQOHgw/0IN9k9HuqYg9Ouj6k4NazLd1rEiAy8rKHP0BqtkfB+LfA7DZL7vr2gbG@vger.kernel.org
X-Gm-Message-State: AOJu0YxIhdBxNpqik3gJI71S+q2vr/V07t9Lkux8FVl0PdPuJ6ficLw7
	C8wlEi38BTnD3CJXDlNaiSzoLxIHujGQ37VHJA/N/koZJn/jM4f85lx8GXH8vCo=
X-Google-Smtp-Source: AGHT+IHxbKgK7PAsYYuZNq3ZCOnnJEros1Mxbwcwe7M8IhLy178PSrgisJMSb75ooD3rqXnIF3RmwA==
X-Received: by 2002:a05:6a00:98c:b0:70d:36ad:3f67 with SMTP id d2e1a72fcca58-7198e2dcef6mr2079730b3a.11.1726709753039;
        Wed, 18 Sep 2024 18:35:53 -0700 (PDT)
Received: from ubuntu20.04 ([203.208.189.11])
        by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944bc9ed9sm7282482b3a.209.2024.09.18.18.35.47
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 18 Sep 2024 18:35:52 -0700 (PDT)
From: Yang Jihong <yangjihong@bytedance.com>
To: peterz@infradead.org,
	mingo@redhat.com,
	acme@kernel.org,
	namhyung@kernel.org,
	mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com,
	jolsa@kernel.org,
	irogers@google.com,
	adrian.hunter@intel.com,
	kan.liang@linux.intel.com,
	james.clark@arm.com,
	linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	leo.yan@arm.com
Cc: yangjihong@bytedance.com
Subject: [PATCH RESEND v3 3/3] perf dwarf-aux: Fix build fail when HAVE_DWARF_GETLOCATIONS_SUPPORT undefined
Date: Thu, 19 Sep 2024 09:35:13 +0800
Message-Id: <20240919013513.118527-4-yangjihong@bytedance.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20240919013513.118527-1-yangjihong@bytedance.com>
References: <20240919013513.118527-1-yangjihong@bytedance.com>
Precedence: bulk
X-Mailing-List: linux-perf-users@vger.kernel.org
List-Id: <linux-perf-users.vger.kernel.org>
List-Subscribe: <mailto:linux-perf-users+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-perf-users+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

commit 3796eba7c137 move #else block of #ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT
code from dwarf-aux.c to dwarf-aux.h, in which die_get_var_range() used ENOTSUP
macro, but dwarf-aux.h was not self-contained and did not include file errno.h.

As a result, the build failed when HAVE_DWARF_GETLOCATIONS_SUPPORT macro was not
defined, and the error log is as follows:

  In file included from util/disasm.h:8,
                   from util/annotate.h:16,
                   from builtin-top.c:23:
  util/dwarf-aux.h: In function 'die_get_var_range':
  util/dwarf-aux.h:184:10: error: 'ENOTSUP' undeclared (first use in this function)
    184 |  return -ENOTSUP;
        |          ^~~~~~~
  util/dwarf-aux.h:184:10: note: each undeclared identifier is reported only once for each function it appears

Fixes: 3796eba7c137 ("perf dwarf-aux: Move #else block of #ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT code to the header file")
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Yang Jihong <yangjihong@bytedance.com>
---
 tools/perf/util/dwarf-aux.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
index 336a3a183a78..f0d702b9ad75 100644
--- a/tools/perf/util/dwarf-aux.h
+++ b/tools/perf/util/dwarf-aux.h
@@ -6,6 +6,7 @@
  */
 
 #include <dwarf.h>
+#include <errno.h>
 #include <elfutils/libdw.h>
 #include <elfutils/libdwfl.h>
 #include <elfutils/version.h>
-- 
2.25.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3C5B1B85F5;
	Tue, 24 Sep 2024 18:42:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1727203337; cv=none; b=lgbC1Alml6HZZ9RcFiY1eZWYmwd9jwc6ZSDEwb6ieiRxTuzKwet0Yp/auqJsJApktfSKZrRaf7qphowqda1wFIcIASh1VDqX7tQHRSdXZByW/eM2n7brvcmeIWav0hF+oAhSx6tyCyR+YEfM3V2tRfBI549PLvx1GD4bfgafkqE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1727203337; c=relaxed/simple;
	bh=y3OXYglhlp43kVHeV0em3+MF9/JdFVSnXc51Xo/43Q8=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=ai3PPjqdEfLWeEKa9//lvfMaMMRZU+sKVOg+rRlYmMHQlN4rSj6Q7u6N+CtMaOiHkJYBZ2lyiVZzB//eMCUgdD7Vh0QE6ZMqqKXPhNhTybWMIS/WVIZoI6VgI7xcFAycjKDrGLe8T9qgYonikDTW1/ddlDzEe8k6cEDxrBBDtQk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r99C9Vpk; arc=none smtp.client-ip=10.30.226.201
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r99C9Vpk"
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D4E5C4CEC4;
	Tue, 24 Sep 2024 18:42:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1727203337;
	bh=y3OXYglhlp43kVHeV0em3+MF9/JdFVSnXc51Xo/43Q8=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
	b=r99C9VpktgXTtWPwLrZhAvAzCHn4RS3SxjfdFcBI9QatPVRBKJbYicsEK9YGfk2WL
	 A9guDhWuHfz82VR28cxDeOn3KxTun7TUDguvsNZWmDdxMR0qdUsOImAyhR+JUsMyBu
	 XpE5kISj31J5wL0oWfuuQU61u0hC68KbwV+e7KsNTTL/IaukfIrXrrFp7yIR2QuKpA
	 rjIjie+DRmlOa8MR+yv10mCHn9hwlEGKYQ4d3u/KSUdZK6SIKgiCzX0QF+F/t78v06
	 s5x/mo/pC9dJfNE+ObFncno18qzKiWAVrOx1A+44k+P6Bv/s2AgEp9FoPcCJQ0NDxY
	 5qE8SeXBMu9DA==
Date: Tue, 24 Sep 2024 11:42:15 -0700
From: Namhyung Kim <namhyung@kernel.org>
To: acme@kernel.org, Yang Jihong <yangjihong@bytedance.com>
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, james.clark@arm.com,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	leo.yan@arm.com
Subject: Re: [PATCH RESEND v3 0/3] perf: build: Minor fixes for build failures
Message-ID: <ZvMIBxRzYSI5G7yU@google.com>
References: <20240919013513.118527-1-yangjihong@bytedance.com>
Precedence: bulk
X-Mailing-List: linux-perf-users@vger.kernel.org
List-Id: <linux-perf-users.vger.kernel.org>
List-Subscribe: <mailto:linux-perf-users+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-perf-users+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20240919013513.118527-1-yangjihong@bytedance.com>

On Thu, Sep 19, 2024 at 09:35:10AM +0800, Yang Jihong wrote:
> Changes since v3:
>  - Add reviewed-by tag from Leo. (see Link[1])
>  - Resend the patchset with no code changes.
> 
> Link[1]: https://lore.kernel.org/all/b5688d4a-9389-4998-8031-3f002302311e@arm.com/
> 
> Changes since v2:
>  - patch1: change LIBDW_VERSION to follow up the style of
>    LIBTRACEEVENT_VERSION. (by Leo's suggestion)
>  - patch2: Use a new line for the -ldl dependency and with comment,
>    synchronize tools/perf/Makefile.config. (by Leo's suggestion)
>  - patch3: include header files in alphabetical order,
>    add reviewed-by tag from Leo. (by Leo's suggestion)
> 
> Changes since v1:
>  - patch3: Remove UTF-8 characters from build failure logs
> 
> Yang Jihong (3):
>   perf: build: Fix static compilation error when libdw is not installed
>   perf: build: Fix build feature-dwarf_getlocations fail for old libdw
>   perf dwarf-aux: Fix build fail when HAVE_DWARF_GETLOCATIONS_SUPPORT
>     undefined

Acked-by: Namhyung Kim <namhyung@kernel.org>

Arnaldo, can you please pick this up to perf-tools tree?

Thanks,
Namhyung

> 
>  tools/build/feature/Makefile | 5 ++++-
>  tools/perf/Makefile.config   | 7 +++++--
>  tools/perf/util/dwarf-aux.h  | 1 +
>  3 files changed, 10 insertions(+), 3 deletions(-)
> 
> -- 
> 2.25.1
> 

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38C9C1CC16B;
	Tue,  1 Oct 2024 18:38:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1727807885; cv=none; b=PEHT7f4U246RTQJapCd+fyyfZ9Et4B3PAf0c3DWGY48nDhsJbTVZD8JxNoHwG6MoSXJeRoiXAFPbE3Lm6vQeY2+ep93nEguzp1ptVBnphWTDSdNcAQW/PnLnVKNXD2yFGqPlE7389I27tsdXpBj4u8uI4dowhwXnatQ6xk8pjHE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1727807885; c=relaxed/simple;
	bh=GLAn/ZtWj2XvCyHbIePKftJAaszPcF3l8iV9kilIl0Q=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=YR7c3/WYdEsdgEJu5VUai1TZQmhIYzbcN68FSuTVTJ6irM5plxYjYWvc7LMiUxY9VGz2JUmWOoLFCy03xJ7LBxKJhp2yFWCRCNkHTCX4yjV4mJBO32i2+VWLN+KYk3b0R2UWhPTnmSV0MkwWLj+3qKoTnEUK1LpspSHFWKEMPeQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JpM66NYY; arc=none smtp.client-ip=10.30.226.201
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JpM66NYY"
Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9650C4CEC6;
	Tue,  1 Oct 2024 18:38:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1727807884;
	bh=GLAn/ZtWj2XvCyHbIePKftJAaszPcF3l8iV9kilIl0Q=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
	b=JpM66NYYhStxNDep7lbyEiSQjmxpxd1+CVTLf7aJS47rW1x2euCwnZN9drFR7nwU5
	 ddhI7h85wFghnO7ljFYig9LXbnQUVKvztQLbRyYZi2IsbxxE0ba5lwSkDGHLVyyt+x
	 AHLfxkbARlTwjEsUvSsXP6jIW6+ruLtsJd1SqM8/pOOw5/toov4Coy2TdKvliI9nLe
	 tSgBvwSnip8J3B4DCBiOuCNQhKX6YBZPuv3l6ny9oe5O+DuyYYcQm25cbspZIorWy3
	 hGK9zBQVHsVPuUSOjF5pYw+biMqDbSUIca2hq4uuRZjwhXg9+K+kNmrsMnd2TfWppT
	 lClaaNeaLG4mA==
Date: Tue, 1 Oct 2024 15:38:01 -0300
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Yang Jihong <yangjihong@bytedance.com>
Cc: peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, james.clark@arm.com,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	leo.yan@arm.com
Subject: Re: [PATCH RESEND v3 0/3] perf: build: Minor fixes for build failures
Message-ID: <ZvxBiXAgHuOleOWk@x1>
References: <20240919013513.118527-1-yangjihong@bytedance.com>
Precedence: bulk
X-Mailing-List: linux-perf-users@vger.kernel.org
List-Id: <linux-perf-users.vger.kernel.org>
List-Subscribe: <mailto:linux-perf-users+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-perf-users+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20240919013513.118527-1-yangjihong@bytedance.com>

On Thu, Sep 19, 2024 at 09:35:10AM +0800, Yang Jihong wrote:
> Changes since v3:
>  - Add reviewed-by tag from Leo. (see Link[1])
>  - Resend the patchset with no code changes.

Thanks, applied the first two, the last one I had already picked a patch
from James with what seems a more appropriate Fixes tag.

- Arnaldo
 
> Link[1]: https://lore.kernel.org/all/b5688d4a-9389-4998-8031-3f002302311e@arm.com/
> 
> Changes since v2:
>  - patch1: change LIBDW_VERSION to follow up the style of
>    LIBTRACEEVENT_VERSION. (by Leo's suggestion)
>  - patch2: Use a new line for the -ldl dependency and with comment,
>    synchronize tools/perf/Makefile.config. (by Leo's suggestion)
>  - patch3: include header files in alphabetical order,
>    add reviewed-by tag from Leo. (by Leo's suggestion)
> 
> Changes since v1:
>  - patch3: Remove UTF-8 characters from build failure logs
> 
> Yang Jihong (3):
>   perf: build: Fix static compilation error when libdw is not installed
>   perf: build: Fix build feature-dwarf_getlocations fail for old libdw
>   perf dwarf-aux: Fix build fail when HAVE_DWARF_GETLOCATIONS_SUPPORT
>     undefined
> 
>  tools/build/feature/Makefile | 5 ++++-
>  tools/perf/Makefile.config   | 7 +++++--
>  tools/perf/util/dwarf-aux.h  | 1 +
>  3 files changed, 10 insertions(+), 3 deletions(-)
> 
> -- 
> 2.25.1

