On Tue, 23 Aug 2022 at 16:44:54 -0400, Jeffrey Walton wrote: > On Tue, Aug 23, 2022 at 4:40 PM Simon McVittie <s...@debian.org> wrote: > > On Tue, 23 Aug 2022 at 13:23:30 +0100, Simon McVittie wrote: > > > The final link fails with multiple definitions of the various atomic > > > builtins: > > > > > > > (.text+0x0): multiple definition of `__sync_fetch_and_add_4'; > > > > /home/smcv/mozjs91-armel/debian/build/armv5te-unknown-linux-gnueabi/release/libjsrust.a(compiler_builtins-23c2fc8f8ef06d87.compiler_builtins.bdb7b41d-cgu.153.rcgu.o):/usr/src/rustc-1.59.0/vendor/compiler_builtins/src/arm_linux.rs:94: > > > > first defined here > > Also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104248#c2 (and > more generally https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358).
Those are related, but seem like the opposite issue: I'm getting a build failure because I somehow end up with two copies of __sync_fetch_and_add_4, whereas those bugs are about having zero copies of similar compiler-provided functions. We want exactly one copy :-) Or are you saying that I'm getting these multiple definitions *because*, unlike gcc-11, gcc-12 is automatically providing symbols like __sync_fetch_and_add_4 in order to resolve those gcc bug reports? In any case it seems to be possible to work around this by forcing gcc-11, which is not great (toolchain maintainers dislike uses of a non-default gcc) but arguably better than FTBFS. smcv