From: Leo Yan <leo.yan@arm.com>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Liang, Kan" <kan.liang@linux.intel.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
James Clark <james.clark@linaro.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] perf docs: Mark the Android document as obsolete
Date: Tue, 16 Jul 2024 11:06:25 +0100 [thread overview]
Message-ID: <a17e6701-4195-4132-8518-fe4b10403f7e@arm.com> (raw)
In-Reply-To: <CAP-5=fU=LguHNi861L4gmgZWXrrgZtG1w5cdw7hXDxnfWyJyMQ@mail.gmail.com>
On 7/15/24 22:21, Ian Rogers wrote:
[...]
> Hmm.. I can repro but I don't see where the string comes from and my
> build is definitely using clang:
> ```
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C tools/perf
> O=/tmp/perf NO_LIBELF=1 NO_LIBTRACEEVENT=1 NO_LIBPYTHON=1 CC=clang
> CXX=clang++ V=1
> ...
> clang --target=aarch64-linux-gnu -fintegrated-as -Wbad-function-cast
> -Wdeclaration-after-statement -Wformat-security -Wformat-y2k
> -Winit-self -Wmissing-declarations -Wmissing-prototypes
> -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls
> -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef
> -Wwrite-strings -Wformat -Wno-type-limits -Wshadow -Wthread-safety
> -DHAVE_SYSCALL_TABLE_SUPPORT -I/tmp/perf/arch/arm64/include/generated
> -DHAVE_ARCH_REGS_QUERY_REGISTER_OFFSET -Werror -DNDEBUG=1 -O3
> -fno-omit-frame-pointer -Wall -Wextra -std=gnu11 -fstack-protector-all
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I~/src/tools/perf/util/include
> -I~/src/tools/perf/arch/arm64/include -I~/src/tools/include/
> -I~/src/tools/arch/arm64/include/uapi -I~/src/tools/include/uapi
> -I~/src/tools/arch/arm64/include/ -I~/src/tools/arch/arm64/
> -I/tmp/perf//util -I/tmp/perf/ -I~/src/tools/perf/util
> -I~/src/tools/perf -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP
> -DHAVE_PTHREAD_BARRIER -DHAVE_EVENTFD_SUPPORT
> -DHAVE_GET_CURRENT_DIR_NAME -DHAVE_GETTID -DHAVE_FILE_HANDLE
> -DHAVE_AIO_SUPPORT -DHAVE_SCANDIRAT_SUPPORT
> -DHAVE_SCHED_GETCPU_SUPPORT -DHAVE_SETNS_SUPPORT -DNO_LIBPERL
> -DHAVE_TIMERFD_SUPPORT -DNO_LIBPYTHON -DHAVE_BACKTRACE_SUPPORT
> -DHAVE_KVM_STAT_SUPPORT -DHAVE_AUXTRACE_SUPPORT
> -I/tmp/perf/libapi/include -I/tmp/perf/libsubcmd/include
> -I/tmp/perf/libsymbol/include -I/tmp/perf/libperf/include -I/tmp/perf/
> -Wl,-z,noexecstack \
> /tmp/perf/perf-in.o -Wl,--whole-archive
> /tmp/perf/libapi/libapi.a /tmp/perf/libperf/libperf.a
> /tmp/perf/libsubcmd/libsubcmd.a /tmp/perf/libsymbol/libsymbol.a
> /tmp/perf/libperf-bench.a /tmp/perf/libperf-test.a
> /tmp/perf/libperf-ui.a /tmp/perf/libperf-util.a
> /tmp/perf/libpmu-events.a -Wl,--no-whole-archive -Wl,--start-group
> -lpthread -lrt -lm -ldl -Wl,--end-group -o /tmp/perf/perf
> $ strings /tmp/perf/perf|grep GCC
> GCC: (Debian 13.2.0-13) 13.2.0
> $ find /tmp/perf -name '*.[oa]' -exec sh -c "strings {} | grep GCC" \; -print
> GCC: (Debian 13.2.0-13) 13.2.0
> /tmp/perf/fixdep.o
> GCC: (Debian 13.2.0-13) 13.2.0
> /tmp/perf/fixdep-in.o
> ```
> fixdep is being compiled with HOSTCC which isn't clang. Some more digging:
> ```
> $ aarch64-linux-gnu-readelf -p .comment /tmp/perf/perf
>
> String dump of section '.comment':
> [ 0] GCC: (Debian 13.2.0-13) 13.2.0
> [ 1f] Debian clang version 16.0.6 (20+build1)
> ```
> So I suspect that the GCC is coming from crt0.o and that the binary
> was built with clang.
Thanks for correcting. Now I even can build successfully with the Clang
from Android NDK with an additional flag 'NO_DEMANGLE=1'. Though we still
need to disable several modules for passing the building, but we are on the
right way.
Would you like to continue a formal fixing or you want me to follow up?
Thanks,
Leo
next prev parent reply other threads:[~2024-07-16 10:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 14:33 [PATCH v2] perf docs: Mark the Android document as obsolete Leo Yan
2024-07-15 15:29 ` James Clark
2024-07-15 17:17 ` Ian Rogers
2024-07-15 19:31 ` Leo Yan
2024-07-15 19:44 ` Ian Rogers
2024-07-15 20:06 ` Ian Rogers
2024-07-15 20:36 ` Leo Yan
2024-07-15 21:21 ` Ian Rogers
2024-07-16 10:06 ` Leo Yan [this message]
2024-07-16 13:30 ` Ian Rogers
2024-07-16 13:49 ` Leo Yan
2024-07-16 15:05 ` Ian Rogers
2024-07-16 15:41 ` Leo Yan
2024-07-15 20:10 ` Leo Yan
2024-07-16 9:10 ` James Clark
2024-07-16 10:40 ` Leo Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a17e6701-4195-4132-8518-fe4b10403f7e@arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=justinstitt@google.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=morbo@google.com \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox