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

build: fix arm64 cross-compilation #51256

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,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:
Expand Down
3 changes: 3 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@
},

'conditions': [
['target_arch=="arm64"', {
'cflags': ['-mbranch-protection=standard'], # Pointer authentication.
}],
['OS in "aix os400"', {
'ldflags': [
'-Wl,-bnoerrmsg',
Expand Down
Loading