From 45ce8306416904760d8f4eecab7656dc9d536afd Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sun, 5 Apr 2026 16:29:03 -0700 Subject: [PATCH] doc: note GCC >= 14 requirement for native riscv64 builds V8's deps/v8/src/base/cpu.cc unconditionally includes 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: https://github.com/nodejs/build/issues/4099 Signed-off-by: Jamie Magee --- BUILDING.md | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 4fb7521190b1fc..2cb15c812acf3b 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -104,26 +104,26 @@ Node.js does not support a platform version if a vendor has expired support for it. In other words, Node.js does not support running on End-of-Life (EoL) platforms. This is true regardless of entries in the table below. -| Operating System | Architectures | Versions | Support Type | Notes | -| ---------------- | ---------------- | --------------------------------- | ------------ | ------------------------------------ | -| GNU/Linux | x64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 | -| GNU/Linux | x64 | kernel >= 3.10, musl >= 1.1.19 | Experimental | e.g. Alpine 3.8 | -| GNU/Linux | x86 | kernel >= 3.10, glibc >= 2.17 | Experimental | Downgraded as of Node.js 10 | -| GNU/Linux | arm64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 | -| GNU/Linux | armv7 | kernel >= 4.18[^1], glibc >= 2.28 | Experimental | Downgraded as of Node.js 24 | -| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 | -| GNU/Linux | ppc64le >=power9 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 | -| GNU/Linux | s390x >=z14 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 | -| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | | -| GNU/Linux | riscv64 | kernel >= 5.19, glibc >= 2.36 | Experimental | | -| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] | -| Windows | arm64 | >= Windows 10 | Tier 2 | | -| macOS | x64 | >= 13.5 | Tier 1 | For notes about compilation see [^4] | -| macOS | arm64 | >= 13.5 | Tier 1 | | -| SmartOS | x64 | >= 18 | Tier 2 | | -| AIX | ppc64be >=power9 | >= 7.2 TL04 | Tier 2 | | -| FreeBSD | x64 | >= 13.2 | Experimental | | -| OpenHarmony | arm64 | >= 5.0 | Experimental | | +| Operating System | Architectures | Versions | Support Type | Notes | +| ---------------- | ---------------- | --------------------------------- | ------------ | ---------------------------------------------- | +| GNU/Linux | x64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 | +| GNU/Linux | x64 | kernel >= 3.10, musl >= 1.1.19 | Experimental | e.g. Alpine 3.8 | +| GNU/Linux | x86 | kernel >= 3.10, glibc >= 2.17 | Experimental | Downgraded as of Node.js 10 | +| GNU/Linux | arm64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 | +| GNU/Linux | armv7 | kernel >= 4.18[^1], glibc >= 2.28 | Experimental | Downgraded as of Node.js 24 | +| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 | +| GNU/Linux | ppc64le >=power9 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 | +| GNU/Linux | s390x >=z14 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 | +| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | | +| GNU/Linux | riscv64 | kernel >= 5.19, glibc >= 2.36 | Experimental | GCC >= 14 or Clang >= 19 for native builds[^7] | +| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] | +| Windows | arm64 | >= Windows 10 | Tier 2 | | +| macOS | x64 | >= 13.5 | Tier 1 | For notes about compilation see [^4] | +| macOS | arm64 | >= 13.5 | Tier 1 | | +| SmartOS | x64 | >= 18 | Tier 2 | | +| AIX | ppc64be >=power9 | >= 7.2 TL04 | Tier 2 | | +| FreeBSD | x64 | >= 13.2 | Experimental | | +| OpenHarmony | arm64 | >= 5.0 | Experimental | | @@ -148,6 +148,13 @@ platforms. This is true regardless of entries in the table below. [^4]: Our macOS Binaries are compiled with 13.5 as a target. Xcode 16 is required to compile. +[^7]: Native riscv64 builds need GCC >= 14 or Clang >= 19 because V8 + includes `` and uses `target("arch=+v")` in + `deps/v8/src/base/cpu.cc`. GCC 13's `riscv_vector.h` errors out without + `-march=rv64gcv` and doesn't support the `target` attribute at all. + Cross-compilation from x64 is unaffected (the code is behind + `V8_HOST_ARCH_RISCV64`). + ### Supported toolchains