Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add armv7l and arm64 bionic based cross compiled builds #91

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add patch until upstream arm64 cross compilation is fixed
  • Loading branch information
theofficialgman committed Aug 7, 2023
commit c45cc02db8c1ccc99b56f099c929770db6abf52a
34 changes: 34 additions & 0 deletions recipes/arm64-glibc-227/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,40 @@ cd /home/node
tar -xf node.tar.xz
cd "node-${fullversion}"

# see https://github.com/nodejs/node/pull/45756
cat << "EOF" > correct-cflags.patch
diff --git a/configure.py b/configure.py
index a6dae354d4233..e2bb9dce12795 100755
--- a/configure.py
+++ b/configure.py
@@ -1247,9 +1247,7 @@ def configure_node(o):

o['variables']['want_separate_host_toolset'] = int(cross_compiling)

- # Enable branch protection for arm64
if target_arch == 'arm64':
- o['cflags']+=['-msign-return-address=all']
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'

if options.node_snapshot_main is not None:
diff --git a/node.gyp b/node.gyp
index 448cb8a8c7cd4..6cec024ffe722 100644
--- a/node.gyp
+++ b/node.gyp
@@ -109,6 +109,9 @@
},

'conditions': [
+ ['target_arch=="arm64"', {
+ 'cflags': ['-msign-return-address=all'], # Pointer authentication.
+ }],
['OS in "aix os400"', {
'ldflags': [
'-Wl,-bnoerrmsg',
EOF
git apply correct-cflags.patch --verbose
rm -f correct-cflags.patch

export CC_host="ccache gcc-8"
export CXX_host="ccache g++-8"
export CC="ccache aarch64-linux-gnu-gcc-8"
Expand Down