Skip to content

Commit d242726

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 d242726

File tree

1 file changed

+27
-20
lines changed

1 file changed

+27
-20
lines changed

BUILDING.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,26 +104,26 @@ Node.js does not support a platform version if a vendor has expired support
104104
for it. In other words, Node.js does not support running on End-of-Life (EoL)
105105
platforms. This is true regardless of entries in the table below.
106106

107-
| Operating System | Architectures | Versions | Support Type | Notes |
108-
| ---------------- | ---------------- | --------------------------------- | ------------ | ------------------------------------ |
109-
| GNU/Linux | x64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
110-
| GNU/Linux | x64 | kernel >= 3.10, musl >= 1.1.19 | Experimental | e.g. Alpine 3.8 |
111-
| GNU/Linux | x86 | kernel >= 3.10, glibc >= 2.17 | Experimental | Downgraded as of Node.js 10 |
112-
| GNU/Linux | arm64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
113-
| GNU/Linux | armv7 | kernel >= 4.18[^1], glibc >= 2.28 | Experimental | Downgraded as of Node.js 24 |
114-
| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 |
115-
| GNU/Linux | ppc64le >=power9 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 |
116-
| GNU/Linux | s390x >=z14 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 |
117-
| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
118-
| GNU/Linux | riscv64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
119-
| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] |
120-
| Windows | arm64 | >= Windows 10 | Tier 2 | |
121-
| macOS | x64 | >= 13.5 | Tier 1 | For notes about compilation see [^4] |
122-
| macOS | arm64 | >= 13.5 | Tier 1 | |
123-
| SmartOS | x64 | >= 18 | Tier 2 | |
124-
| AIX | ppc64be >=power9 | >= 7.2 TL04 | Tier 2 | |
125-
| FreeBSD | x64 | >= 13.2 | Experimental | |
126-
| OpenHarmony | arm64 | >= 5.0 | Experimental | |
107+
| Operating System | Architectures | Versions | Support Type | Notes |
108+
| ---------------- | ---------------- | --------------------------------- | ------------ | ---------------------------------------------- |
109+
| GNU/Linux | x64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
110+
| GNU/Linux | x64 | kernel >= 3.10, musl >= 1.1.19 | Experimental | e.g. Alpine 3.8 |
111+
| GNU/Linux | x86 | kernel >= 3.10, glibc >= 2.17 | Experimental | Downgraded as of Node.js 10 |
112+
| GNU/Linux | arm64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
113+
| GNU/Linux | armv7 | kernel >= 4.18[^1], glibc >= 2.28 | Experimental | Downgraded as of Node.js 24 |
114+
| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 |
115+
| GNU/Linux | ppc64le >=power9 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 |
116+
| GNU/Linux | s390x >=z14 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 |
117+
| GNU/Linux | loong64 | 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] |
119+
| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] |
120+
| Windows | arm64 | >= Windows 10 | Tier 2 | |
121+
| macOS | x64 | >= 13.5 | Tier 1 | For notes about compilation see [^4] |
122+
| macOS | arm64 | >= 13.5 | Tier 1 | |
123+
| SmartOS | x64 | >= 18 | Tier 2 | |
124+
| AIX | ppc64be >=power9 | >= 7.2 TL04 | Tier 2 | |
125+
| FreeBSD | x64 | >= 13.2 | Experimental | |
126+
| OpenHarmony | arm64 | >= 5.0 | Experimental | |
127127

128128
<!--lint disable final-definition-->
129129

@@ -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)