This happens when trying to compile strigi 0.3.2 (http://www.vandenoever.info/software/strigi/) with gcc trunk from today results in
Linking CXX executable dummyindexer CMakeFiles/dummyindexer.dir/dummyindexer.o: In function `__exchange_and_add': /usr/lib/gcc/i586-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/bits/atomicity.h:47: undefined reference to `__sync_fetch_and_add_4' /usr/lib/gcc/i586-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/bits/atomicity.h:47: undefined reference to `__sync_fetch_and_add_4' CMakeFiles/dummyindexer.dir/dummyindexer.o: In function `__exchange_and_add': /usr/lib/gcc/i586-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/bits/stl_vector.h:120: undefined reference to `__sync_fetch_and_add_4' CMakeFiles/dummyindexer.dir/dummyindexer.o: In function `__exchange_and_add': /usr/lib/gcc/i586-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/bits/atomicity.h:47: undefined reference to `__sync_fetch_and_add_4' /usr/lib/gcc/i586-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/bits/atomicity.h:47: undefined reference to `__sync_fetch_and_add_4' CMakeFiles/dummyindexer.dir/indexer.o:/usr/lib/gcc/i586-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/bits/atomicity.h:47: more undefined references to `__sync_fetch_and_add_4' follow collect2: ld returned 1 exit status -- Summary: [4.2 regression] undefined reference to `__sync_fetch_and_add_4' Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bero at arklinux dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28671