You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when building and linking to projects with more complex C/C++ dependencies, such as re2, the order of linking and the lack of a dynamic libstdc++ prevents numerous symbols, such as setlocale and __cxa_atexit from being found. Ever since #1063, we prevent dynamic linking to libstdc++ due to numerous issues it has in the generated binaries when linked to Rust code.
Describe why this would be a good inclusion for cross
This improves C++ for most musl targets, which we should support out-of-the-box.
The text was updated successfully, but these errors were encountered:
1134: Use a linker script for libstdc++. r=Emilgardis a=Alexhuszagh
Use a linker script for `libstdc++.so` since we remove the dylib, to ensure a static build is always used to avoid segfaults at runtime. However, the archive can reference missing symbols present in `libc` or `libgcc`, and itself depends on symbols in `libm`. To ensure these libraries are properly linked when forcing a build against the static `libstdc++`, create a linker script for `libstdc++.so` that links to the static archive, and as needed, all dependencies.
Related to #1124.
Co-authored-by: Alex Huszagh <[email protected]>
Checklist
Describe your request
Currently, when building and linking to projects with more complex C/C++ dependencies, such as
re2
, the order of linking and the lack of a dynamiclibstdc++
prevents numerous symbols, such assetlocale
and__cxa_atexit
from being found. Ever since #1063, we prevent dynamic linking tolibstdc++
due to numerous issues it has in the generated binaries when linked to Rust code.Describe why this would be a good inclusion for
cross
This improves C++ for most musl targets, which we should support out-of-the-box.
The text was updated successfully, but these errors were encountered: