@@ -11,6 +11,20 @@ index b3718cff39..6a4a664ba0 100644
1111 }, {
1212 'lto': ' -flto ', # Clang
1313 }],
14+ diff --git node/configure.py node/configure.py
15+ index 215aee5d80..ccb59bd304 100755
16+ --- node/configure.py
17+ +++ node/configure.py
18+ @@ -1259,9 +1259,7 @@ def configure_node(o):
19+
20+ o['variables']['want_separate_host_toolset'] = int(cross_compiling)
21+
22+ - # Enable branch protection for arm64
23+ if target_arch == 'arm64':
24+ - o['cflags']+=['-msign-return-address=all']
25+ o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
26+
27+ if options.node_snapshot_main is not None:
1428diff --git node/deps/v8/include/v8-initialization.h node/deps/v8/include/v8-initialization.h
1529index d3e35d6ec5..6e9bbe3849 100644
1630--- node/deps/v8/include/v8-initialization.h
@@ -300,6 +314,20 @@ index dea0121566..d8618f3edb 100644
300314 } catch (e) {
301315 throw e; /* node-do-not-add-exception-line */
302316 }
317+ diff --git node/node.gyp node/node.gyp
318+ index b0f132efd8..3a43b724dc 100644
319+ --- node/node.gyp
320+ +++ node/node.gyp
321+ @@ -110,6 +110,9 @@
322+ },
323+
324+ 'conditions': [
325+ + ['target_arch=="arm64"', {
326+ + 'cflags': ['-msign-return-address=all'], # Pointer authentication.
327+ + }],
328+ ['OS=="aix"', {
329+ 'ldflags': [
330+ '-Wl,-bnoerrmsg',
303331diff --git node/src/inspector_agent.cc node/src/inspector_agent.cc
304332index decd9f748a..4e5afbee4f 100644
305333--- node/src/inspector_agent.cc
0 commit comments