Skip to content

Commit

Permalink
nodejs: allow building for vfpv2
Browse files Browse the repository at this point in the history
  • Loading branch information
tie committed Jul 17, 2024
1 parent b623320 commit f299a8e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkgs/development/web/nodejs/configure-armv6-vfpv2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Allows ARM FPU to be set to vfpv2, e.g. for Raspberry Pi.

See https://github.com/nodejs/node/issues/44357#issuecomment-1235821878

--- a/configure.py
+++ b/configure.py
@@ -50,7 +50,7 @@
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
'ppc64', 'x64', 'x86', 'x86_64', 's390x', 'riscv64', 'loong64')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
-valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
+valid_arm_fpu = ('vfp', 'vfpv2', 'vfpv3', 'vfpv3-d16', 'neon')
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
valid_mips_fpu = ('fp32', 'fp64', 'fpxx')
valid_mips_float_abi = ('soft', 'hard')
1 change: 1 addition & 0 deletions pkgs/development/web/nodejs/nodejs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ let
if platform.isAarch32 && platform ? gcc.fpu then
lib.throwIfNot (builtins.elem platform.gcc.fpu [
"vfp"
"vfpv2"
"vfpv3"
"vfpv3-d16"
"neon"
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/web/nodejs/v18.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ buildNodejs {
sha256 = "sha256-p2x+oblq62ljoViAYmDICUtiRNZKaWUp0CBUe5qVyio=";
patches = [
./configure-emulator-node18.patch
./configure-armv6-vfpv2.patch
./disable-darwin-v8-system-instrumentation.patch
./bypass-darwin-xcrun-node16.patch
./revert-arm64-pointer-auth.patch
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/web/nodejs/v20.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildNodejs {
sha256 = "sha256-/dU6VynZNmkaKhFRBG+0iXchy4sPyir5V4I6m0D+DDQ=";
patches = [
./configure-emulator.patch
./configure-armv6-vfpv2.patch
./disable-darwin-v8-system-instrumentation-node19.patch
./bypass-darwin-xcrun-node16.patch
./node-npm-build-npm-package-logic.patch
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/web/nodejs/v22.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildNodejs {
sha256 = "sha256-ZfyFf1qoJWqvyQCzRMARXJrq4loCVB/Vzg29Tf0cX7k=";
patches = [
./configure-emulator.patch
./configure-armv6-vfpv2.patch
./disable-darwin-v8-system-instrumentation-node19.patch
./bypass-darwin-xcrun-node16.patch
./node-npm-build-npm-package-logic.patch
Expand Down

0 comments on commit f299a8e

Please sign in to comment.