From edb685c1392ef43c5c2b8eae420d3dac89fd5081 Mon Sep 17 00:00:00 2001 From: Sunoru Date: Mon, 14 Nov 2022 22:38:16 -0500 Subject: [PATCH] Disable pointer authentication on arm 64. (nodejs/node#42888) --- L/libnode/build_tarballs.jl | 3 ++- L/libnode/bundled/patches/configure.py.patch | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 L/libnode/bundled/patches/configure.py.patch diff --git a/L/libnode/build_tarballs.jl b/L/libnode/build_tarballs.jl index 94e0c78ed65..2c50edcd4da 100644 --- a/L/libnode/build_tarballs.jl +++ b/L/libnode/build_tarballs.jl @@ -45,9 +45,10 @@ linux_script = raw""" cd node-* export CC_host=$HOSTCC export CXX_host=$HOSTCXX +atomic_patch -p1 "${WORKSPACE}/srcdir/patches/configure.py.patch" +atomic_patch -p1 "${WORKSPACE}/srcdir/patches/node.gypi.patch" atomic_patch -p1 "${WORKSPACE}/srcdir/patches/node_credentials.cc.patch" atomic_patch -p1 "${WORKSPACE}/srcdir/patches/test_crypto_clienthello.cc.patch" -atomic_patch -p1 "${WORKSPACE}/srcdir/patches/node.gypi.patch" # Build & install libnode if [[ $target == $MACHTYPE ]] then diff --git a/L/libnode/bundled/patches/configure.py.patch b/L/libnode/bundled/patches/configure.py.patch new file mode 100644 index 00000000000..43d9c1c2fb2 --- /dev/null +++ b/L/libnode/bundled/patches/configure.py.patch @@ -0,0 +1,17 @@ +diff --git a/configure.py b/configure.py +index a4e5723067..60ec604454 100755 +--- a/configure.py ++++ b/configure.py +@@ -1245,9 +1245,9 @@ 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'] ++ # # Enable branch protection for arm64 ++ # if target_arch == 'arm64': ++ # o['cflags']+=['-msign-return-address=all'] + + if options.node_snapshot_main is not None: + if options.shared: