doc: note GCC >= 14 requirement for native riscv64 builds#62607
doc: note GCC >= 14 requirement for native riscv64 builds#62607JamieMagee wants to merge 1 commit intonodejs:mainfrom
Conversation
|
Review requested:
|
|
My read is that these only apply to V8 >=14.2.147, and therefore not to any current release lines – please re-label if not the case. |
|
@Renegade334 Yeah, that's right. The |
811b04d to
d242726
Compare
|
Please rebase onto main to fix the CI errors. |
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>
d242726 to
45ce830
Compare
Done! |
There was a problem hiding this comment.
Can you double check this? On my system I have riscv_vector in the libgcc-13-dev package (Armbian-bpi-SpacemiT 24.5.0 so I'd expect it to find it ok, although I haven't attempted a build with that version built with 13 yet)
OK I see you've added the note about a problem when it's built with 13 and without rc64gcv
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