public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins
@ 2008-04-03 16:02 oblivian at users dot sourceforge dot net
2008-04-03 17:35 ` [Bug libstdc++/35816] " oblivian at users dot sourceforge dot net
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: oblivian at users dot sourceforge dot net @ 2008-04-03 16:02 UTC (permalink / raw)
To: gcc-bugs
When compiling a combined gcc + g++ + binutils, the configure script for the
libstdc++ library is using the host g++ rather than the last stage g++ for
determining atomic builtin support status.
While I probably need to compile the toolchain with CXXFLAGS=-march=i486, from
what I've read, to enable support for atomic builtins in the compiler, I did
not. This resulted in a target g++ that did not support atomic builtins and a
libstdc++ that expected the compiler did because it got the value from checking
the host g++ rather than the final bootstrap stage g++.
The configure parameters were:
--prefix=/$(TOOLS_DIR)/usr \
--with-sysroot=/$(TOOLS_DIR) \
--with-pic \
--enable-shared \
--enable-clocale=gnu \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-languages=c,c++ \
--enable-checking=release \
--disable-werror \
--enable-stage1-checking \
--enable-bootstrap
--
Summary: libstdc++ built during bootstrap is pulling in host g++
support for atomic builtins
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: oblivian at users dot sourceforge dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35816
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/35816] libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins
2008-04-03 16:02 [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins oblivian at users dot sourceforge dot net
@ 2008-04-03 17:35 ` oblivian at users dot sourceforge dot net
2008-04-03 20:46 ` [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check oblivian at users dot sourceforge dot net
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: oblivian at users dot sourceforge dot net @ 2008-04-03 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from oblivian at users dot sourceforge dot net 2008-04-03 17:34 -------
After looking back at my 4.2.3 build logs. The above is somewhat incorrect.
In 4.2.3, the pass 2 toolchain build of libstdc++ correctly checked the target
g++ rather than the host and reported that it would not use atomic builtins.
It appears that this has changed in 4.3.0 or is an artifact of using sysroot
(which should not look at the host g++ for configuration options).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35816
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check
2008-04-03 16:02 [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins oblivian at users dot sourceforge dot net
2008-04-03 17:35 ` [Bug libstdc++/35816] " oblivian at users dot sourceforge dot net
@ 2008-04-03 20:46 ` oblivian at users dot sourceforge dot net
2008-04-14 22:49 ` bkoz at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: oblivian at users dot sourceforge dot net @ 2008-04-03 20:46 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check
2008-04-03 16:02 [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins oblivian at users dot sourceforge dot net
2008-04-03 17:35 ` [Bug libstdc++/35816] " oblivian at users dot sourceforge dot net
2008-04-03 20:46 ` [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check oblivian at users dot sourceforge dot net
@ 2008-04-14 22:49 ` bkoz at gcc dot gnu dot org
2008-04-14 23:54 ` bkoz at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2008-04-14 22:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from bkoz at gcc dot gnu dot org 2008-04-14 22:48 -------
Wow. Confirmed. This does not happen at -O2 with gcc-4.1.2
However, on gcc-4.3.0 branch:
$bld/H-x86-gcc-4_3-branch.20080227/bin/g++ -O2 -S -march=i386 testatomic.cc
gives:
.file "testatomic.cc"
.text
.p2align 2,,3
.globl main
.type main, @function
main:
.LFB2:
leal 4(%esp), %ecx
.LCFI0:
andl $-16, %esp
pushl -4(%ecx)
.LCFI1:
pushl %ebp
.LCFI2:
movl %esp, %ebp
.LCFI3:
pushl %ecx
.LCFI4:
subl $16, %esp
.LCFI5:
leal -8(%ebp), %edx
xorl %eax, %eax
lock addl %eax, (%edx)
addl $16, %esp
popl %ecx
leave
leal -4(%ecx), %esp
ret
.LFE2:
.size main, .-main
.ident "GCC: (GNU) 4.3.0 20080227 (prerelease)"
.section .note.GNU-stack,"",@progbits
Fix in progress.
--
bkoz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bkoz at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-04-14 22:48:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35816
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check
2008-04-03 16:02 [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins oblivian at users dot sourceforge dot net
` (2 preceding siblings ...)
2008-04-14 22:49 ` bkoz at gcc dot gnu dot org
@ 2008-04-14 23:54 ` bkoz at gcc dot gnu dot org
2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2008-04-14 23:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from bkoz at gcc dot gnu dot org 2008-04-14 23:54 -------
Subject: Bug 35816
Author: bkoz
Date: Mon Apr 14 23:53:15 2008
New Revision: 134297
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134297
Log:
2008-04-14 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/35816
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Set CXXFLAGS to
-O0 when checking for atomic builtins.
* configure: Regenerate.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/acinclude.m4
trunk/libstdc++-v3/configure
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35816
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check
2008-04-03 16:02 [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins oblivian at users dot sourceforge dot net
` (3 preceding siblings ...)
2008-04-14 23:54 ` bkoz at gcc dot gnu dot org
@ 2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2008-04-15 0:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from bkoz at gcc dot gnu dot org 2008-04-15 00:26 -------
Subject: Bug 35816
Author: bkoz
Date: Tue Apr 15 00:25:45 2008
New Revision: 134305
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134305
Log:
2008-04-14 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/35816
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Set CXXFLAGS to
-O0 when checking for atomic builtins.
* configure: Regenerate.
Modified:
branches/gcc-4_3-branch/libstdc++-v3/ChangeLog
branches/gcc-4_3-branch/libstdc++-v3/acinclude.m4
branches/gcc-4_3-branch/libstdc++-v3/configure
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35816
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check
2008-04-03 16:02 [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins oblivian at users dot sourceforge dot net
` (4 preceding siblings ...)
2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
@ 2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2008-04-15 0:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from bkoz at gcc dot gnu dot org 2008-04-15 00:26 -------
fixed in trunk and on gcc-4_3-branch
--
bkoz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35816
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-04-15 0:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-03 16:02 [Bug libstdc++/35816] New: libstdc++ built during bootstrap is pulling in host g++ support for atomic builtins oblivian at users dot sourceforge dot net
2008-04-03 17:35 ` [Bug libstdc++/35816] " oblivian at users dot sourceforge dot net
2008-04-03 20:46 ` [Bug libstdc++/35816] libstdc++ build during bootstrap is optimizing away atomic builtin check oblivian at users dot sourceforge dot net
2008-04-14 22:49 ` bkoz at gcc dot gnu dot org
2008-04-14 23:54 ` bkoz at gcc dot gnu dot org
2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
2008-04-15 0:27 ` bkoz at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).