File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,40 @@ cd /home/node
1717tar -xf node.tar.xz
1818cd " node-${fullversion} "
1919
20+ # see https://github.com/nodejs/node/pull/45756
21+ cat << "EOF " > correct-cflags.patch
22+ diff --git a/configure.py b/configure.py
23+ index a6dae354d4233..e2bb9dce12795 100755
24+ --- a/configure.py
25+ +++ b/configure.py
26+ @@ -1247,9 +1247,7 @@ def configure_node(o):
27+
28+ o['variables']['want_separate_host_toolset'] = int(cross_compiling)
29+
30+ - # Enable branch protection for arm64
31+ if target_arch == 'arm64':
32+ - o['cflags']+=['-msign-return-address=all']
33+ o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
34+
35+ if options.node_snapshot_main is not None:
36+ diff --git a/node.gyp b/node.gyp
37+ index 448cb8a8c7cd4..6cec024ffe722 100644
38+ --- a/node.gyp
39+ +++ b/node.gyp
40+ @@ -109,6 +109,9 @@
41+ },
42+
43+ 'conditions': [
44+ + ['target_arch=="arm64"', {
45+ + 'cflags': ['-msign-return-address=all'], # Pointer authentication.
46+ + }],
47+ ['OS in "aix os400"', {
48+ 'ldflags': [
49+ '-Wl,-bnoerrmsg',
50+ EOF
51+ git apply correct-cflags.patch --verbose
52+ rm -f correct-cflags.patch
53+
2054export CC_host=" ccache gcc-8"
2155export CXX_host=" ccache g++-8"
2256export CC=" ccache aarch64-linux-gnu-gcc-8"
You can’t perform that action at this time.
0 commit comments