https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70560
--- Comment #7 from James Hilliard <james.hilliard1 at gmail dot com> --- (In reply to Jonathan Wakely from comment #6) > (In reply to James Hilliard from comment #5) > > That might be somewhere here: > > http://autobuild.buildroot.org/results/3be/ > > 3bedf404de0ea42ee3ba624cded65d310a847af9/apcupsd-3.14.14/config.log > > No, I meant the command that fails when running 'make'. But it doesn't > matter now, because ... > > > It appears reference to _ZN9__gnu_cxx18__exchange_and_addEPVii are in the > > following objects in libsupc++.a. > > I was looking for the definition of the function not the references to it, > but I think the problem is that those functions are defined by > src/c++98/atomicity.cc which isn't included in libsupc++.a at all. > > Using the atomic functions in libsupc++.a assumes that atomic builtins are > supported and so we won't need the extern functions from atomicity.cc, which > isn't necessarily true. > > I think this has been broken since r244051 enabled std::exception_ptr for > targets without lock-free atomic built-ins. Previously if we didn't have > atomic built-ins, libsupc++ just wouldn't try to use atomics. Now it uses > the built-ins or falls back to the extern functions in atomicity.cc, but the > latter are not in libsupc++.a so it only works if you link to the full > libstdc++.{a,so} library. > > Please file a new bug, yours is a separate issue to this one. New bug report opened here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96657