Skip to content

Commit 811b04d

Browse files
committed
doc: note GCC >= 14 requirement for native riscv64 builds
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>
1 parent 12249cc commit 811b04d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

BUILDING.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ platforms. This is true regardless of entries in the table below.
115115
| GNU/Linux | ppc64le >=power9 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 |
116116
| GNU/Linux | s390x >=z14 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 |
117117
| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
118-
| GNU/Linux | riscv64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
118+
| GNU/Linux | riscv64 | kernel >= 5.19, glibc >= 2.36 | Experimental | GCC >= 14 or Clang >= 19 for native builds[^7] |
119119
| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] |
120120
| Windows | arm64 | >= Windows 10 | Tier 2 | |
121121
| macOS | x64 | >= 13.5 | Tier 1 | For notes about compilation see [^4] |
@@ -148,6 +148,13 @@ platforms. This is true regardless of entries in the table below.
148148
[^4]: Our macOS Binaries are compiled with 13.5 as a target. Xcode 16 is
149149
required to compile.
150150

151+
[^7]: Native riscv64 builds need GCC >= 14 or Clang >= 19 because V8
152+
includes `<riscv_vector.h>` and uses `target("arch=+v")` in
153+
`deps/v8/src/base/cpu.cc`. GCC 13's `riscv_vector.h` errors out without
154+
`-march=rv64gcv` and doesn't support the `target` attribute at all.
155+
Cross-compilation from x64 is unaffected (the code is behind
156+
`V8_HOST_ARCH_RISCV64`).
157+
151158
<!--lint enable final-definition-->
152159

153160
### Supported toolchains

0 commit comments

Comments
 (0)