Skip to content

doc: note GCC >= 14 requirement for native riscv64 builds#62607

Open
JamieMagee wants to merge 1 commit intonodejs:mainfrom
JamieMagee:riscv64-doc-gcc14
Open

doc: note GCC >= 14 requirement for native riscv64 builds#62607
JamieMagee wants to merge 1 commit intonodejs:mainfrom
JamieMagee:riscv64-doc-gcc14

Conversation

@JamieMagee
Copy link
Copy Markdown

V8's deps/v8/src/base/cpu.cc includes <riscv_vector.h> and uses target("arch=+v") for runtime RVV detection when building natively on riscv64. GCC 13 can't handle either of those — its riscv_vector.h errors out without -march=rv64gcv, and it doesn't support the target attribute for RISC-V at all. GCC 14 added both (r14-5527).

This only affects native builds. Cross-compilation from x64 skips the code entirely (it's behind V8_HOST_ARCH_RISCV64).

The project-wide minimum is GCC >= 13.2, which is fine for every other architecture. This adds a footnote to the riscv64 row in the platform table noting that native builds need GCC >= 14 or Clang >= 19.

Refs: nodejs/build#4099

V8's deps/v8/src/base/cpu.cc unconditionally includes <riscv_vector.h>
and uses __attribute__((target("arch=+v"))) for runtime RVV detection
when V8_HOST_ARCH_RISCV64 is defined (native builds only). GCC 13 does
not support the RISC-V target attribute and its riscv_vector.h cannot
be included without -march=rv64gcv, so native riscv64 builds require
GCC >= 14 or Clang >= 19.

Add a footnote to the riscv64 row in the platform list table to
document this. Cross-compilation from x64 is not affected.

Refs: nodejs/build#4099
Signed-off-by: Jamie Magee <jamie.magee@gmail.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/build
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. labels Apr 5, 2026
@Renegade334 Renegade334 requested a review from sxa April 6, 2026 06:34
@Renegade334 Renegade334 added the riscv64 Issues and PRs related to the riscv64 architecture. label Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. riscv64 Issues and PRs related to the riscv64 architecture.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants