Skip to content

tools build: Fix arm64 unistd.h dependency

Leo Yan linux-perf-users lkml 4 versions – In review

Get series with b4
b4 am [email protected] change-id 20251203-perf_fix_syscall_header-e280fa931d44

Versions newest first

  1. v4 Latest3 patches 1 replyIn review
  2. v33 patches 6 repliesSuperseded
  3. v23 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches5 repliesSuperseded

Changes in v4 from the cover letter

- Updated commit log in patch 01 to avoid confusion (James).
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tools headers: Go back to include asm-generic/unistd.h for arm64tools/arch/arm64/include/uapi/asm/unistd.h+23 -10 replies
2/3Revert "perf tools: Fix arm64 build by generating unistd_64.h"tools/lib/perf/Makefile tools/perf/Makefile.config+2 -130 replies
3/3tools headers: Don't check arm64's unistd.htools/perf/check-headers.sh+0 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJames Clark
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] tools build: Fix arm64 unistd.h dependency

The perf build includes arm64's unistd.h, but its dependent header unistd_64.h is missing.

As suggested by Arnd in [1]:

"I would suggest using the same method across all architectures:
either we figure out how to use the generated headers on all of them (including x86, which uses yet another method), or we just stick with the old asm-generic/unistd.h copy and use that on arm64 as well."

A dynamic approach (e.g., make headers_install) may be explored later to generate headers for tools, but that will need consensus from the tools maintainers. In the meantime, this series provides a quick fix by using the asm-generic/unistd.h copy for arm64.

[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m69a051aae5e53a65f9b10e1d13f67b3e92f4bbc7

---
Changes in v4:
- Updated commit log in patch 01 to avoid confusion (James).
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Changed to include asm-generic/unistd.h copy (Arnd).
- Removed check due to divergence between the kernel and tools.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Added a consistency check (Ian).
- Rebased on the latest perf-tools-next.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Leo Yan (3):
tools headers: Go back to include asm-generic/unistd.h for arm64 Revert "perf tools: Fix arm64 build by generating unistd_64.h" tools headers: Don't check arm64's unistd.h

 tools/arch/arm64/include/uapi/asm/unistd.h | 24 +++++++++++++++++++++++-
 tools/lib/perf/Makefile                    | 14 ++------------
 tools/perf/Makefile.config                 |  1 -
 tools/perf/check-headers.sh                |  1 -
 4 files changed, 25 insertions(+), 15 deletions(-)

---
base-commit: cbd41c6d4c26c161a2b0e70ad411d3885ff13507
change-id: 20251203-perf_fix_syscall_header-e280fa931d44

Best regards,

Signature · 1 line
Leo Yan <[email protected]>