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: <20250926154137.GF7985@e132581.arm.com>
Date: Fri, 26 Sep 2025 16:41:37 +0100
From: Leo Yan <leo.yan@....com>
To: Ian Rogers <irogers@...gle.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Quentin Monnet <qmo@...nel.org>,
	Andrii Nakryiko <andrii@...nel.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>,
	Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Martin KaFai Lau <martin.lau@...ux.dev>,
	Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
	Yonghong Song <yonghong.song@...ux.dev>,
	John Fastabend <john.fastabend@...il.com>,
	KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
	Hao Luo <haoluo@...gle.com>, James Clark <james.clark@...aro.org>,
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
	llvm@...ts.linux.dev, bpf@...r.kernel.org
Subject: Re: [PATCH 8/8] perf docs: Document building with Clang

Hi Ian,

On Thu, Sep 25, 2025 at 12:43:55PM -0700, Ian Rogers wrote:

[...]

> > +5) Build with clang
> > +===================
> > +By default, the makefile uses GCC as compiler. With specifying environment
> > +variables HOSTCC, CC and CXX, it allows to build perf with clang.
> > +
> > +Using clang for native build:
> > +
> > +  $ HOSTCC=clang CC=clang CXX=clang++ make -C tools/perf
> > +
> > +Using clang for cross compilation:
> > +
> > +  $ HOSTCC=clang CC=clang CXX=clang++ \
> > +    make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C tools/perf \
> > +    NO_LIBELF=1 NO_LIBTRACEEVENT=1 NO_JEVENTS=1
> 
> The three NO_-s here are going to cripple the build quite a lot, I
> wonder if we can list package dependencies to install and failing that
> use the NO_-s.

In the next version, I will drop NO_ options to avoid confusing.

Missing libraries can occur in both native build and cross build, so
this is not a specific issue for cross build. OTOH, the build logs
already provide clear reminders, here no need to bother readers for
these NO_ options.

> > +
> > +In the example above, due to lack libelf, python and libtraceevent for
> > +cross comiplation, disable the features accordingly.
> 
> nit: s/comiplation/compilation/
> 
> > diff --git a/tools/perf/Documentation/android.txt b/tools/perf/Documentation/android.txt
> > index 24a59998fc91e814ad96f658d3481d88d798b60c..e65204cf2921f6bd8a79875784c5b3d5487ce05d 100644
> > --- a/tools/perf/Documentation/android.txt
> > +++ b/tools/perf/Documentation/android.txt
> > @@ -1,78 +1,12 @@
> >  How to compile perf for Android
> > -=========================================
> > +===============================
> >
> > -I. Set the Android NDK environment
> > -------------------------------------------------
> > +There have two ways to build perf and run it on Android.
> 
> nit: s/There have/There are/

Will do.  Thanks a lot for review!

Leo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ