lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZuBZ2Qq176_w94Zv@x1>
Date: Tue, 10 Sep 2024 11:38:17 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: James Clark <james.clark@...aro.org>
Cc: linux-perf-users@...r.kernel.org, sesse@...gle.com,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	"Liang, Kan" <kan.liang@...ux.intel.com>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>,
	"Masami Hiramatsu (Google)" <mhiramat@...nel.org>,
	Changbin Du <changbin.du@...wei.com>,
	Guilherme Amadio <amadio@...too.org>, Leo Yan <leo.yan@....com>,
	Manu Bretelle <chantr4@...il.com>, Quentin Monnet <qmo@...nel.org>,
	linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
	llvm@...ts.linux.dev
Subject: Re: [PATCH 1/2] perf build: Autodetect minimum required llvm-dev
 version

On Tue, Sep 10, 2024 at 03:04:00PM +0100, James Clark wrote:
> The new LLVM addr2line feature requires a minimum version of 13 to
> compile. Add a feature check for the version so that NO_LLVM=1 doesn't
> need to be explicitly added. Leave the existing llvm feature check
> intact because it's used by tools other than Perf.
> 
> This fixes the following compilation error when the llvm-dev version
> doesn't match:
> 
>   util/llvm-c-helpers.cpp: In function 'char* llvm_name_for_code(dso*, const char*, u64)':
>   util/llvm-c-helpers.cpp:178:21: error: 'std::remove_reference_t<llvm::DILineInfo>' {aka 'struct llvm::DILineInfo'} has no member named 'StartAddress'
>     178 |   addr, res_or_err->StartAddress ? *res_or_err->StartAddress : 0);
> 
> Fixes: c3f8644c21df ("perf report: Support LLVM for addr2line()")
> Signed-off-by: James Clark <james.clark@...aro.org>
> ---
>  tools/build/Makefile.feature           |  2 +-
>  tools/build/feature/Makefile           |  9 +++++++++
>  tools/build/feature/test-llvm-perf.cpp | 14 ++++++++++++++
>  tools/perf/Makefile.config             |  6 +++---
>  4 files changed, 27 insertions(+), 4 deletions(-)
>  create mode 100644 tools/build/feature/test-llvm-perf.cpp
> 
> diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> index 0717e96d6a0e..427a9389e26c 100644
> --- a/tools/build/Makefile.feature
> +++ b/tools/build/Makefile.feature
> @@ -136,7 +136,7 @@ FEATURE_DISPLAY ?=              \
>           libunwind              \
>           libdw-dwarf-unwind     \
>           libcapstone            \
> -         llvm                   \
> +         llvm-perf              \
>           zlib                   \
>           lzma                   \
>           get_cpuid              \

There was one leftover on the other patch, I added it here:

⬢[acme@...lbox perf-tools-next]$ git diff
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 427a9389e26cd203..ffd117135094cc68 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -100,7 +100,6 @@ FEATURE_TESTS_EXTRA :=                  \
          libunwind-debug-frame-aarch64  \
          cxx                            \
          llvm                           \
-         llvm-version                   \
          clang                          \
          libbpf                         \
          libbpf-btf__load_from_kernel_by_id \
⬢[acme@...lbox perf-tools-next]$

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ