Decouple NetBSD/amd64 builds from dynamic libgcc_s
The prebuilt binaries for NetBSD x86_64 require libgcc_s.so, but the base NetBSD system can be built as a "pure" clang build; in such cases the system will not contain libgcc_s.so.
To cover non-gcc NetBSD systems the bootstrap kit should be built using -static-libgcc.
See https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=52584
Triage: Is this still a problem? Wanted to ask since 6 years have passed and circumstances might have changed.
Martin Nordholts at 2023-09-24 12:09:36
Triage: Is this still a problem? Wanted to ask since 6 years have passed and circumstances might have changed.
Hm, yes, this seems to still be an issue with the 1.71.1 amd64 NetBSD binaries:
: {3} ldd work/rust-bootstrap/bin/rustc work/rust-bootstrap/bin/rustc: -lrustc_driver-f54da20e09a97277 => /usr/pkgsrc/wip/rust/work/rust-bootstrap/bin/../lib/librustc_driver-f54da20e09a97277.so -lstd-39880e7e4681db9f => /usr/pkgsrc/wip/rust/work/rust-bootstrap/bin/../lib/libstd-39880e7e4681db9f.so -lpthread.1 => /usr/lib/libpthread.so.1 -lc.12 => /usr/lib/libc.so.12 -lgcc_s.1 => /usr/lib/libgcc_s.so.1 -lm.0 => /usr/lib/libm.so.0 : {4}(this is from my pkgsrc-wip build tree for rust 1.72.0 on amd64, which uses the binaries built by the rust project)
Same for the
cargobinary, of course:: {5} ldd work/rust-bootstrap/bin/cargo work/rust-bootstrap/bin/cargo: -lpthread.1 => /usr/lib/libpthread.so.1 -lc.12 => /usr/lib/libc.so.12 -lgcc_s.1 => /usr/lib/libgcc_s.so.1 -lm.0 => /usr/lib/libm.so.0 : {6}Looking at the gcc(1) man page reveals that there are caveats related to exceptions when using
-static-libgcc, I am unsure whether rustc or cargo uses or relies on exceptions.he32 at 2023-09-25 09:46:55
Looking at the gcc(1) man page reveals that there are caveats related to exceptions when using -static-libgcc, I am unsure whether rustc or cargo uses or relies on exceptions.
our panics are likely "exceptions", for these purposes. can you describe the caveats or link the HTML version of the doc?
Jubilee at 2024-07-24 22:24:44