doc: note GCC >= 14 requirement for native riscv64 builds#62607
Open
JamieMagee wants to merge 1 commit intonodejs:mainfrom
Open
doc: note GCC >= 14 requirement for native riscv64 builds#62607JamieMagee wants to merge 1 commit intonodejs:mainfrom
JamieMagee wants to merge 1 commit intonodejs:mainfrom
Conversation
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>
Collaborator
|
Review requested:
|
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
V8's
deps/v8/src/base/cpu.ccincludes<riscv_vector.h>and usestarget("arch=+v")for runtime RVV detection when building natively on riscv64. GCC 13 can't handle either of those — itsriscv_vector.herrors out without-march=rv64gcv, and it doesn't support thetargetattribute 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