Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH 0/3] perf build: Fix cross-arch build failures and GCC 14 warnings
@ 2026-05-13 15:48 Li Guan
  2026-05-13 15:48 ` [PATCH 1/3] perf build: Fix cross-arch build failures by isolating auxtrace objects Li Guan
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Li Guan @ 2026-05-13 15:48 UTC (permalink / raw)
  To: acme, namhyung
  Cc: irogers, adrian.hunter, palmer, pjw, linux-perf-users,
	linux-riscv, linux-kernel, Li Guan

This patch series addresses a set of build and linking failures encountered
when cross-compiling the perf tool for non-x86 architectures (specifically
RISC-V and ARM64), while also ensuring compatibility with stricter GCC 14
compiler checks.

The series resolves three distinct issues:

1. GCC 14 Compatibility: Fixes a -Werror=discarded-qualifiers build failure
   in the RISC-V specific code by explicitly casting strrchr() return
   values to (char *).
2. Hardware Tracing Isolation: Decouples arch-specific auxtrace objects
   (e.g., intel-pt, arm-spe) from the generic build process, preventing
   "No such file or directory" and undefined reference linker errors on
   architectures that lack these features.
3. Instruction Decoding Stubs: Provides global __weak stubs for dump_insn()
   and arch_is_uncond_branch() in builtin-script.c, resolving undefined
   reference linker errors on architectures (like RISC-V and ARM64) that do
   not yet implement hardware-specific instruction decoding.

These changes have been successfully verified via full builds across
x86_64, s390x, aarch64, and riscv64 architectures.

Li Guan (3):
  perf build: Fix cross-arch build failures by isolating auxtrace
    objects
  perf riscv: Fix discarded const qualifier error in _get_field()
  perf script: Provide weak stubs for instruction decoding

 tools/perf/Makefile.config          | 21 +++++++++
 tools/perf/arch/riscv/util/header.c |  4 +-
 tools/perf/builtin-script.c         | 22 +++++++++
 tools/perf/util/Build               | 20 ++++-----
 tools/perf/util/auxtrace.c          | 70 +++++++++++++++++++++++++++++
 tools/perf/util/auxtrace.h          |  6 +++
 6 files changed, 131 insertions(+), 12 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-05-14  8:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 15:48 [PATCH 0/3] perf build: Fix cross-arch build failures and GCC 14 warnings Li Guan
2026-05-13 15:48 ` [PATCH 1/3] perf build: Fix cross-arch build failures by isolating auxtrace objects Li Guan
2026-05-13 16:14   ` Ian Rogers
2026-05-13 16:31     ` guanli
2026-05-13 16:37       ` Ian Rogers
2026-05-14  6:59   ` sashiko-bot
2026-05-13 15:48 ` [PATCH 2/3] perf riscv: Fix discarded const qualifier error in _get_field() Li Guan
2026-05-13 16:18   ` Ian Rogers
2026-05-13 18:07   ` [PATCH v2] perf riscv: Fix discarded const qualifier " Li Guan
2026-05-13 23:11     ` Ian Rogers
2026-05-14  7:38   ` [PATCH 2/3] perf riscv: Fix discarded const qualifier error " sashiko-bot
2026-05-13 15:48 ` [PATCH 3/3] perf script: Provide weak stubs for instruction decoding Li Guan
2026-05-13 16:20   ` Ian Rogers
2026-05-14  8:06   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox