mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
build: fix arm64 cross-compilation
Commit 938212f
added -msign-return-address=all to _all_ cflags but that
is wrong when cross-compiling, it should only be added to the target's
cflags.
The flag being deprecated, it is also changed to
`-mbranch-protection=standard`.
Fixes: https://github.com/nodejs/node/issues/42888
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/51256
Fixes: https://github.com/nodejs/build/issues/3319
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
c3664227a8
commit
c21b2bee72
@ -1273,9 +1273,7 @@ def configure_node(o):
|
|||||||
|
|
||||||
o['variables']['want_separate_host_toolset'] = int(cross_compiling)
|
o['variables']['want_separate_host_toolset'] = int(cross_compiling)
|
||||||
|
|
||||||
# Enable branch protection for arm64
|
|
||||||
if target_arch == 'arm64':
|
if target_arch == 'arm64':
|
||||||
o['cflags']+=['-msign-return-address=all']
|
|
||||||
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
|
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
|
||||||
|
|
||||||
if options.node_snapshot_main is not None:
|
if options.node_snapshot_main is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user