File: fix-riscv64.patch

package info (click to toggle)
nodejs 22.21.1%2Bdfsg%2B~cs22.19.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 251,932 kB
  • sloc: cpp: 1,542,927; javascript: 597,777; ansic: 114,330; python: 60,784; sh: 4,155; makefile: 2,917; asm: 1,750; pascal: 1,565; perl: 248; lisp: 222; xml: 42
file content (38 lines) | stat: -rw-r--r-- 1,536 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From bdaa898ceaf61840d030ee83b2e9adf40973544d Mon Sep 17 00:00:00 2001
From: Lu Yahan <yahan@iscas.ac.cn>
Date: Mon, 18 Nov 2024 23:41:23 +0800
Subject: [PATCH] tools: fix riscv64 build failed

PR-URL: https://github.com/nodejs/node/pull/52888
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
---
 tools/v8_gypfiles/v8.gyp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -1184,6 +1184,23 @@
               ],
             }],
           ],
+          'conditions': [
+            ['v8_enable_webassembly==1', {
+              'conditions': [
+                ['((_toolset=="host" and host_arch=="riscv64" or _toolset=="target" and target_arch=="riscv64") and (OS=="linux")) or ((_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux"))', {
+                  'sources': [
+                    '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
+                    '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
+                  ],
+                }],
+                ['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux")', {
+                  'sources': [
+                    '<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
+                  ],
+                }],
+              ],
+            }],
+          ],
         }],
         ['v8_target_arch=="arm"', {
           'sources': [