-
Notifications
You must be signed in to change notification settings - Fork 30k
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
16.0.0 cannot be built with lto using gcc and ld #38335
Comments
/cc @joyeecheung |
It looks like an issue within V8, can you try building V8 only using |
Oh, right, the LTO flags need to be included. In that case, can you try |
Just saw #38346 , this seem to be caused by our gyp file, never mind |
"PushAllRegistersAndIterateStack" is implemented in assembly and called from "stack.cc" via 'extern "C"'. [1] However, LTO does not work well with symbol usage from assembly. [2] This change workarounds the issue by disabling LTO for the target. With GCC 10 and "./configure --enable-lto", compilation succeeds after this change. [1] v8/v8@c10863153 [2] https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ#Symbol_usage_from_assembly_language Refs: #35957 Refs: #38335 Signed-off-by: Jesse Chan <[email protected]> PR-URL: #38346 Refs: #35957 Refs: #38335 Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
Landed in master. |
"PushAllRegistersAndIterateStack" is implemented in assembly and called from "stack.cc" via 'extern "C"'. [1] However, LTO does not work well with symbol usage from assembly. [2] This change workarounds the issue by disabling LTO for the target. With GCC 10 and "./configure --enable-lto", compilation succeeds after this change. [1] v8/v8@c10863153 [2] https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ#Symbol_usage_from_assembly_language Refs: #35957 Refs: #38335 Signed-off-by: Jesse Chan <[email protected]> PR-URL: #38346 Refs: #35957 Refs: #38335 Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
I’m having this issue too when building 16.3.2 in Arch Linux. We recently switched the distro to build with LTO by default, so it would seems that this either regressed or that LTO does not get disabled properly for this target? |
LTO disabled because of nodejs/node#38335 git-svn-id: file:///srv/repos/svn-community/svn@1113506 9fca08f4-af9d-4005-b8df-a31f2cc04f65
LTO disabled because of nodejs/node#38335 git-svn-id: file:///srv/repos/svn-community/svn@1113506 9fca08f4-af9d-4005-b8df-a31f2cc04f65
I call
python configure.py --gdb --ninja --enable-lto && ninja -C -v out/Releseas
. I tried both with gcc10.2.1+ld2.35 and with gcc10.3.1+ld2.36.50.20210421. In the first case this is Fedora 33 with usr/lib/bfd-plugin/liblto_plugin.so symlinked to /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so . In the latter case it is a Linux from Scratch system with /usr/local/lib/bfd-plugins/liblto_plugin.so symlinked to /usr/local/libexec/gcc/x86_64-pc-linux-gnu/10.3.1/liblto_plugin.so .Linking mksnapshot fails with
undefined reference to 'PushAllRegistersAndIterateStack'
.This is different from #35957, where the error is
symbol 'PushAllRegistersAndIterateStack' is already defined
.The complete output is below:
The text was updated successfully, but these errors were encountered: