This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check
- From: "oblivian at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Apr 2008 20:45:58 -0000
- Subject: [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check
- References: <bug-35816-15855@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from oblivian at users dot sourceforge dot net 2008-04-03 20:45 -------
Ok so the gcc/g++ i build has optimization on by default. The configuration
scripts don't seem to take this into account and the call to CXX for the atomic
check is optimizing away the check in the output assembly code; thus, the grep
for __sync_fetch_and_add fails and does not turn off atomic builtins.
the following is right before the code generation in the configure file
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
The check probably needs to also take into account optimization so that the
check for __sync_fetch_and_add can not be removed regardless of optimization
flags.
To revert to 4.2.3 behavior I inserted a -O0 in the ac_compile command for the
check.
--
oblivian at users dot sourceforge dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|libstdc++ built during |libstdc++ build during
|bootstrap is pulling in host|bootstrap is optimizing away
|g++ support for atomic |atomic builtin check
|builtins |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35816