-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
build: fix arm64 cross-compilation #45756
Conversation
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. Fixes: nodejs#42888
Review requested:
|
I haven't finished building yet, but looks like I just get a whole lot of warnings that |
FWIW V8 used to pass |
You're on a newer version of gcc. We're currently using gcc 8 in the CI and to build the release binaries. gcc 9 introduced a replacement option, |
I ran into other dependency issues when using gcc 8, which I could probably get around, but I'm working with docker containers and want to limit to a single gcc version installed if I can to keep the image size down. |
My gcc cross-compiler version is 11.3.0, so I tested with It builds and runs without any problems. However, I am concerned about the v8 upstream fix. |
It's part of Chromium's (and therefore V8's) push towards CFI (Control Flow Integrity.) The design doc is here if you're interested: https://docs.google.com/document/d/1O2jwK4dxI3nRcOJuPYkonhTkNQfbmwdvxQMyXgeaRHo/edit I'm going to guess they view arm64 branch protection as a special case that's been subsumed by the (more general and cross-platform) CFI work. |
based on suggested change from nodejs/node#45756
based on suggested change from nodejs/node#45756
based on suggested change from nodejs/node#45756
any news on this? |
based on suggested change from nodejs/node#45756
This fixes "msign-return-address=all" unrecognized by g++ for obj.host Basically copied from nodejs/node#45756
This fixes "msign-return-address=all" unrecognized by g++ for obj.host Basically copied from nodejs/node#45756
Ping @nodejs/build |
Resolved the obvious merge conflict but looks like a little more remedial work will be needed before this can be progressed. |
This fixes "msign-return-address=all" unrecognized by g++ for obj.host Basically copied from nodejs/node#45756
This fixes "msign-return-address=all" unrecognized by g++ for obj.host Basically copied from nodejs/node#45756
News on this? |
This seems to have been fixed in #51256 or am I misunderstanding? |
Correct. Superseded by #51256. |
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.
Fixes: #42888
cc @nxhack @josh-hemphill - can you confirm it works for you?