I'm doing my best to keep rust building for a few of the NetBSD ports, and try to keep our pkgsrc package of rust up to date. One of the targets I build for is 32-bit powerpc. I've just updated our rust package to 1.47.0. We used to patch away llvm's insistence on 8-byte atomics, since llvm itself didn't actually use or need it, but that patch is now gone for other reasons. So this means that at least the 32-bit powerpc ports now need the
-latomic library linked. On NetBSD, the
-latomic library comes from pkgsrc, so is by default stored in
/usr/pkg/lib, which is of course not in cc's default library search path. The embedded LLVM inside rust finds this library just fine during the build process, but when the
rustc_driver module is being built, it seems "something" has forgotten to instruct the cc invocation to search the required directory, so the build bombs out with
= note: ld: cannot find -latomic. This is while trying to link
The big question is if someone has any hints for how and where I should go about mending this problem? I'm fairly unfamiliar with both rust the language and the internals of the build setup, but can cargo-cult with the best if I'm given some direction.