[Bug libstdc++/28671] [4.2 regression] undefined reference to `__sync_fetch_and_add_4'

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Thu Aug 10 00:06:00 GMT 2006

------- Comment #8 from pcarlini at suse dot de  2006-08-10 00:05 -------
(In reply to comment #6)
> Ok, misunderstanding about the compiler flags -- -march=i586 was used to build
> the compiler, strigi was built without any -march= tags (making the default
> i386, I guess).
> Using -march=i586 in strigi makes the problem go away, and the problem is 100%
> reproducable even when compiling a simple test app without -march=i586.

Ok, that makes sense and then, yes, it's the issue I was fearing in that
message. The problem seems to be that the autoconf test
GLIBCXX_ENABLE_ATOMIC_BUILTINS is *always* run (irrespective of the details of
configure.host), thus _GLIBCXX_ATOMIC_BUILTINS defined for your GCC build
flags, and then you have always to use -march=i486 (or higher) when compiling
your code. Annoying to say the least. We don't want that. Thanks for your


pcarlini at suse dot de changed:

           What    |Removed                     |Added
             Status|WAITING                     |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-08-10 00:05:59
               date|                            |


More information about the Gcc-bugs mailing list