build: fix arm64 cross-compilation by targos · Pull Request #51256 · nodejs/node

@bnoordhuis @targos

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: nodejs#42888
Co-Authored-By: Michaël Zasso <targos@protonmail.com>

@nodejs-github-bot added build

Issues and PRs related to build files or the CI.

needs-ci

PRs that need a full CI run.

labels

Dec 22, 2023

richardlau

@lpinca lpinca added the commit-queue

Add this label to land a pull request using GitHub Actions.

label

Dec 27, 2023

This was referenced

Dec 28, 2023

RafaelGSS pushed a commit that referenced this pull request

Jan 2, 2024
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: #42888
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: #51256
Fixes: nodejs/build#3319
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

robertsLando added a commit to yao-pkg/pkg-fetch that referenced this pull request

Jan 3, 2024

richardlau pushed a commit that referenced this pull request

Mar 25, 2024
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: #42888
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: #51256
Fixes: nodejs/build#3319
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

@targos targos deleted the fix-arm64-pointer branch

April 12, 2024 11:46

marco-ippolito pushed a commit that referenced this pull request

May 2, 2024
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: #42888
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: #51256
Fixes: nodejs/build#3319
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>