[Bug libstdc++/52689] static linking with libstdc++ fails

2012-06-15 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 CC||d.v.a at ngs dot ru

--- Comment #23 from Jonathan Wakely redi at gcc dot gnu.org 2012-06-15 
10:37:41 UTC ---
*** Bug 53680 has been marked as a duplicate of this bug. ***


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-05-02 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

Benjamin Kosnik bkoz at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #22 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-05-02 
22:43:40 UTC ---

Fixed.


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-25 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #21 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-04-25 
22:48:03 UTC ---
Author: bkoz
Date: Wed Apr 25 22:47:52 2012
New Revision: 186845

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=186845
Log:
2012-04-25  Benjamin Kosnik  b...@redhat.com

PR libstdc++/52689
* testsuite/17_intro/static.cc: Fix.
* testsuite/lib/dg-options.exp (dg-require-static-libstdcxx): New.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/17_intro/static.cc
trunk/libstdc++-v3/testsuite/lib/dg-options.exp
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-24 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #19 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-04-25 
01:18:02 UTC ---
Author: bkoz
Date: Wed Apr 25 01:17:57 2012
New Revision: 186794

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=186794
Log:
2012-04-24  Benjamin Kosnik  b...@redhat.com

PR libstdc++/52689
* testsuite/17_intro/static.cc: New.

Added:
trunk/libstdc++-v3/testsuite/17_intro/static.cc
Modified:
trunk/libstdc++-v3/ChangeLog


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-24 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #20 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-04-25 
02:00:06 UTC ---

Fixed for 4.7.1


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-16 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #17 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-04-17 
00:19:18 UTC ---
Author: bkoz
Date: Tue Apr 17 00:19:12 2012
New Revision: 186517

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=186517
Log:
2012-04-16  Bernhard Reutner-Fischer  al...@gcc.gnu.org

PR bootstrap/52840
* src/Makefile.am (build-debug): Do not adjust vpath dir, remove
Makefile.tmp
* src/Makefile.in: Adjust as per above.

2012-04-16  Benjamin Kosnik  b...@redhat.com

PR libstdc++/52689
* libsupc++/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
* libsupc++/Makefile.in: Regenerated.
* src/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
(libstdc___la_SOURCES): Add in compatiblity files, with content
that varies with -DPIC.
* src/Makefile.in: Regenerated.
* src/c++11/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
* src/c++11/Makefile.in: Regenerated.
* src/c++11/compatibility-atomic-c++0x.cc: Guard with PIC.
* src/c++11/compatibility-c++0x.cc: Same.
* src/c++11/future.cc: Consolidate compatibility bits into..
* src/c++11/mutex.cc: Consolidate compatibility bits into..
* src/c++11/compatibility-thread-cxx0x.cc: ...here. New.
* src/c++98/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
* src/c++98/Makefile.in: Regenerated.
* src/c++98/compatibility-list-2.cc: Guard with PIC.
* src/c++98/compatibility.cc: Tweak comments.


Added:
   
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/libsupc++/Makefile.am
branches/gcc-4_7-branch/libstdc++-v3/libsupc++/Makefile.in
branches/gcc-4_7-branch/libstdc++-v3/src/Makefile.am
branches/gcc-4_7-branch/libstdc++-v3/src/Makefile.in
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/Makefile.am
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/Makefile.in
   
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/compatibility-c++0x.cc
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/future.cc
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/mutex.cc
branches/gcc-4_7-branch/libstdc++-v3/src/c++98/Makefile.am
branches/gcc-4_7-branch/libstdc++-v3/src/c++98/Makefile.in
branches/gcc-4_7-branch/libstdc++-v3/src/c++98/compatibility-ldbl.cc
branches/gcc-4_7-branch/libstdc++-v3/src/c++98/compatibility-list-2.cc
branches/gcc-4_7-branch/libstdc++-v3/src/c++98/compatibility-list.cc
branches/gcc-4_7-branch/libstdc++-v3/src/c++98/compatibility.cc


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-16 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #18 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-04-17 
02:21:29 UTC ---

Patch plus revisions in gcc-4_7-branch.


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-04 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #14 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-04-04 
17:06:09 UTC ---

Patch in comment #12 is ok to check in. Thanks!


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-04 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #15 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-04-04 
17:23:52 UTC ---
Patch in comment #13 is ok to check in, sadly.


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-04 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #16 from uros at gcc dot gnu.org 2012-04-04 17:25:41 UTC ---
Author: uros
Date: Wed Apr  4 17:25:27 2012
New Revision: 186142

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=186142
Log:
Partially revert:
2012-03-28  Benjamin Kosnik  b...@redhat.com

PR libstdc++/52689
* src/c++98/compatibility-ldbl.cc: Guard with PIC


Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/src/c++98/compatibility-ldbl.cc


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

Uros Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 CC||ubizjak at gmail dot com

--- Comment #11 from Uros Bizjak ubizjak at gmail dot com 2012-04-03 08:00:26 
UTC ---
This fix also causes following testsuite failure on alphaev68-pc-linux-gnu:

Running target unix
FAIL: libmudflap.c++/pass41-frag.cxx (-static) (test for excess errors)
WARNING: libmudflap.c++/pass41-frag.cxx (-static) compilation failed to produce
executable

From the testsuite log:

Executing on host: /home/uros/gcc-build/./gcc/g++ -shared-libgcc
-B/home/uros/gcc-build/./gcc -nostdinc++
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/alphaev68-unknown-linux-gnu/bin/
-B/usr/local/alphaev68-unknown-linux-gnu/lib/ -isystem
/usr/local/alphaev68-unknown-linux-gnu/include -isystem
/usr/local/alphaev68-unknown-linux-gnu/sys-include -ggdb3 -DDEBUG_ASSERT
-D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2
-D_GNU_SOURCE -mieee -I/home/uros/gcc-svn/trunk/libmudflap/testsuite
-I/home/uros/gcc-svn/trunk/libmudflap/testsuite/.. -I.. -nostdinc++
-I/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/alphaev68-unknown-linux-gnu
-I/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include
-I/home/uros/gcc-svn/trunk/libstdc++-v3/libsupc++
-I/home/uros/gcc-svn/trunk/libstdc++-v3/include/backward
-I/home/uros/gcc-svn/trunk/libstdc++-v3/testsuite/util
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/./libmudflap/.libs
/home/uros/gcc-svn/trunk/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx 
-static -fmudflap -lmudflap 
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/./libmudflap/testsuite -ldl
-lm   -o ./pass41-frag.exe(timeout = 300)
spawn /home/uros/gcc-build/./gcc/g++ -shared-libgcc
-B/home/uros/gcc-build/./gcc -nostdinc++
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/alphaev68-unknown-linux-gnu/bin/
-B/usr/local/alphaev68-unknown-linux-gnu/lib/ -isystem
/usr/local/alphaev68-unknown-linux-gnu/include -isystem
/usr/local/alphaev68-unknown-linux-gnu/sys-include -ggdb3 -DDEBUG_ASSERT
-D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2
-D_GNU_SOURCE -mieee -I/home/uros/gcc-svn/trunk/libmudflap/testsuite
-I/home/uros/gcc-svn/trunk/libmudflap/testsuite/.. -I.. -nostdinc++
-I/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/alphaev68-unknown-linux-gnu
-I/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include
-I/home/uros/gcc-svn/trunk/libstdc++-v3/libsupc++
-I/home/uros/gcc-svn/trunk/libstdc++-v3/include/backward
-I/home/uros/gcc-svn/trunk/libstdc++-v3/testsuite/util
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/./libmudflap/.libs
/home/uros/gcc-svn/trunk/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx
-static -fmudflap -lmudflap
-L/home/uros/gcc-build/alphaev68-unknown-linux-gnu/./libmudflap/testsuite -ldl
-lm -o ./pass41-frag.exe^M
/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(locale.o):
In function `std::locale::id::_M_id() const':^M
/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/c++98/../../../../../gcc-svn/trunk/libstdc++-v3/src/c++98/locale.cc:423:
undefined reference to `std::num_getchar, std::istreambuf_iteratorchar,
std::char_traitschar  ::id'^M
/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/c++98/../../../../../gcc-svn/trunk/libstdc++-v3/src/c++98/locale.cc:424:
undefined reference to `std::num_putchar, std::ostreambuf_iteratorchar,
std::char_traitschar  ::id'^M
/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/c++98/../../../../../gcc-svn/trunk/libstdc++-v3/src/c++98/locale.cc:425:
undefined reference to `std::money_getchar, std::istreambuf_iteratorchar,
std::char_traitschar  ::id'^M
/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/c++98/../../../../../gcc-svn/trunk/libstdc++-v3/src/c++98/locale.cc:426:
undefined reference to `std::money_putchar, std::ostreambuf_iteratorchar,
std::char_traitschar  ::id'^M
/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/c++98/../../../../../gcc-svn/trunk/libstdc++-v3/src/c++98/locale.cc:428:
undefined reference to `std::num_getwchar_t, std::istreambuf_iteratorwchar_t,
std::char_traitswchar_t  ::id'^M
/home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/src/c++98/../../../../../gcc-svn/trunk/libstdc++-v3/src/c++98/locale.cc:429:
undefined reference to `std::num_putwchar_t, std::ostreambuf_iteratorwchar_t,
std::char_traitswchar_t  ::id'^M

[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #12 from Uros Bizjak ubizjak at gmail dot com 2012-04-03 08:56:13 
UTC ---
(In reply to comment #11)
 This fix also causes following testsuite failure on alphaev68-pc-linux-gnu:
 
 Running target unix
 FAIL: libmudflap.c++/pass41-frag.cxx (-static) (test for excess errors)
 WARNING: libmudflap.c++/pass41-frag.cxx (-static) compilation failed to 
 produce
 executable

Reverting:

* src/c++98/compatibility-ldbl.cc: Guard with PIC

fixes the failure. Based on this, does following patch looks OK:

--cut here--
Index: src/c++98/compatibility-ldbl.cc
===
--- src/c++98/compatibility-ldbl.cc (revision 186092)
+++ src/c++98/compatibility-ldbl.cc (working copy)
@@ -27,8 +27,6 @@
 #include cmath
 #include tr1/functional

-#ifdef PIC
-
 #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT

 #ifdef __LONG_DOUBLE_128__
@@ -80,5 +78,3 @@
   __attribute__((alias (_ZNKSt3tr14hashIeEclEe)));

 #endif
-
-#endif
--cut here--


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-04-03 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #13 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE 2012-04-03 09:46:30 UTC ---
 --- Comment #12 from Uros Bizjak ubizjak at gmail dot com 2012-04-03 
 08:56:13 UTC ---

 Reverting:

 * src/c++98/compatibility-ldbl.cc: Guard with PIC

 fixes the failure. Based on this, does following patch looks OK:

I need this patch

diff --git a/libstdc++-v3/src/c++98/compatibility-list.cc
b/libstdc++-v3/src/c++98/compatibility-list.cc
--- a/libstdc++-v3/src/c++98/compatibility-list.cc
+++ b/libstdc++-v3/src/c++98/compatibility-list.cc
@@ -24,8 +24,6 @@

 #include bits/move.h

-#ifdef PIC
-
 #ifndef _GLIBCXX_BEGIN_NAMESPACE_COMPAT
 # define _GLIBCXX_BEGIN_NAMESPACE_COMPAT
 #endif
@@ -146,5 +144,3 @@ _GLIBCXX_BEGIN_NAMESPACE_COMPAT
 _GLIBCXX_END_NAMESPACE_COMPAT

 } // namespace std
-
-#endif

to allow go1 to build on Solaris.

Rainer


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-30 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ro at gcc dot gnu.org

--- Comment #10 from Rainer Orth ro at gcc dot gnu.org 2012-03-30 16:42:20 
UTC ---
Unfortuntately, the fix causes link failures during mainline bootstrap on
Solaris:

I'm using a static g++ 4.4 built libppl_c.a, which contains references to

Undefined   first referenced
 symbol in file
_ZNSt15_List_node_base4swapERS_S0_ 
/vol/gcc/lib/libppl_c.a(ppl_c_Pointset_Powerset_C_Polyhedron.o)
_ZNSt15_List_node_base4hookEPS_ /vol/gcc/lib/libppl_c.a(ppl_c_Polyhedron.o)
_ZNSt15_List_node_base6unhookEv
/vol/gcc/lib/libppl_c.a(ppl_c_Pointset_Powerset_C_Polyhedron.o)
_ZNSt15_List_node_base8transferEPS_S0_
/vol/gcc/lib/libppl_c.a(ppl_c_Pointset_Powerset_C_Polyhedron.o)
ld: fatal: symbol referencing errors. No output written to go1

These references are now unresolved.  It could be considered a build bug since
the just build libstdc++.a is searched before the gcc 4.4 libstdc++.a specified
via -L/vol/gcc-4.4/lib.

Whether it is considered an accident or not that this worked so far is the
question.

  Rainer


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-29 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #9 from Benjamin Kosnik bkoz at gcc dot gnu.org 2012-03-29 
06:14:41 UTC ---
Author: bkoz
Date: Thu Mar 29 06:14:32 2012
New Revision: 185950

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=185950
Log:
2012-03-28  Benjamin Kosnik  b...@redhat.com

PR libstdc++/52689
* libsupc++/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
* libsupc++/Makefile.in: Regenerated.
* src/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
(libstdc___la_SOURCES): Add in compatiblity files, with content
that varies with -DPIC.
* src/Makefile.in: Regenerated.
* src/c++11/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
* src/c++11/Makefile.in: Regenerated.
* src/c++11/compatibility-atomic-c++0x.cc: Guard with PIC.
* src/c++11/compatibility-c++0x.cc: Same.
* src/c++11/future.cc: Consolidate compatibility bits into..
* src/c++11/mutex.cc: Consolidate compatibility bits into..
* src/c++11/compatibility-thread-cxx0x.cc: ...here. New.
* src/c++98/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak.
* src/c++98/Makefile.in: Regenerated.
* src/c++98/compatibility-ldbl.cc: Guard with PIC
* src/c++98/compatibility-list-2.cc: Same.
* src/c++98/compatibility-list.cc: Same.
* src/c++98/compatibility.cc: Tweak comments.

Added:
trunk/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
  - copied, changed from r185946, trunk/libstdc++-v3/src/c++11/mutex.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/libsupc++/Makefile.am
trunk/libstdc++-v3/libsupc++/Makefile.in
trunk/libstdc++-v3/src/Makefile.am
trunk/libstdc++-v3/src/Makefile.in
trunk/libstdc++-v3/src/c++11/Makefile.am
trunk/libstdc++-v3/src/c++11/Makefile.in
trunk/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc
trunk/libstdc++-v3/src/c++11/compatibility-c++0x.cc
trunk/libstdc++-v3/src/c++11/future.cc
trunk/libstdc++-v3/src/c++11/mutex.cc
trunk/libstdc++-v3/src/c++98/Makefile.am
trunk/libstdc++-v3/src/c++98/Makefile.in
trunk/libstdc++-v3/src/c++98/compatibility-ldbl.cc
trunk/libstdc++-v3/src/c++98/compatibility-list-2.cc
trunk/libstdc++-v3/src/c++98/compatibility-list.cc
trunk/libstdc++-v3/src/c++98/compatibility.cc


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-27 Thread jens.maurer at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #6 from Jens Maurer jens.maurer at gmx dot net 2012-03-27 
07:03:46 UTC ---
$ nm
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib64/libstdc++.a
| grep GLIBCXX_3.4.14
 B _ZSt15future_category@@GLIBCXX_3.4.14


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-27 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #7 from Markus Trippelsdorf markus at trippelsdorf dot de 
2012-03-27 07:32:00 UTC ---
I've opened a bug for Fedora17 here:
https://bugzilla.redhat.com/show_bug.cgi?id=806598

Maybe you could do the same thing for Ubuntu?

BTW the current vanilla git ld.bfd also links without problems.
So vendor specific binutils patches may be responsible for this bug.


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-03-27
 CC||jakub at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |bkoz at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.7.1
 Ever Confirmed|0   |1

--- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2012-03-27 
15:07:17 UTC ---
This is a libstdc++ bug, caused by the libstdc++ directory reorganization and
introduction of the convenience libraries.

The various source files in libstdc++ that use .symver directives were written
with the assumption that libtool builds things twice, once without -DPIC for
libstdc++.a and once with -DPIC for libstdc++.so.6.
The compatibility stuff with symbol versions only belongs to libstdc++.so.6
obviously, otherwise you get the errors you are getting and gold is broken if
it doesn't error out on that.
Unfortunately the convenience libraries contain solely -DPIC code (-fPIC isn't
a big deal, but -DPIC is here), so everything is compiled just once and
libstdc++.a (incorrectly) as well as libstdc++.so.6 (correctly) is built with
the .symver stuff in the objects.


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-24 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #5 from Markus Trippelsdorf markus at trippelsdorf dot de 
2012-03-24 20:20:54 UTC ---
It looks like a linker bug.
I was able to reproduce the issue with Fedora17.

 $ ld -v
GNU ld version 2.22.52.0.1-10.fc17 20120131
 $ g++ x.cc -static-libstdc++
/usr/bin/ld: a.out: No symbol version section for versioned symbol
`_ZSt15future_category@@GLIBCXX_3.4.14'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

Gold is fine:

 $ sudo ln -f /bin/ld.gold /bin/ld
 $ g++ x.cc -static-libstdc++
 $


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-23 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

Markus Trippelsdorf markus at trippelsdorf dot de changed:

   What|Removed |Added

 CC||markus at trippelsdorf dot
   ||de

--- Comment #1 from Markus Trippelsdorf markus at trippelsdorf dot de 
2012-03-23 17:30:11 UTC ---
Looks like you have an old stale version in your path somewhere.
What does:
$ find /usr/lib -name libstdc++.a
show?


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-23 Thread jens.maurer at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #2 from Jens Maurer jens.maurer at gmx dot net 2012-03-23 
20:13:11 UTC ---
$ find /usr/lib -name libstdc++.a
/usr/lib/gcc/x86_64-linux-gnu/4.6/32/libstdc++.a
/usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a
/usr/lib/gcc/x86_64-linux-gnu/4.5/libstdc++.a


However, these old libstdc++.a files are NOT used:

g++ -Wl,--verbose x.cc -static-libstdc++
GNU ld (GNU Binutils for Ubuntu) 2.21.53.20110810
...
attempt to open /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/crtbegin.o
succeeded
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/crtbegin.o
attempt to open /home/jmaurer/tmp/cc0s7Nqc.o succeeded
/home/jmaurer/tmp/cc0s7Nqc.o
attempt to open /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/libstdc++.a
failed
attempt to open
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib64/libstdc++.a
succeeded
(/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib64/libstdc++.a)globals_io.o
...

The libstdc++.a file used is the one installed today:

$ ls -lL
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib64/libstdc++.a
-rw-r--r-- 1 root root 16227426 2012-03-23 13:31
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib64/libstdc++.a


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-23 Thread jens.maurer at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #3 from Jens Maurer jens.maurer at gmx dot net 2012-03-23 
20:14:33 UTC ---
In case it matters, here's the configure info etc:

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.0/configure -enable-languages=c,c++
--prefix=/usr/local --enable-shared --enable-linker-build-id --with-system-zlib
--without-included-gettext --enable-threads=posix --enable-lto
Thread model: posix
gcc version 4.7.0 (GCC)


[Bug libstdc++/52689] static linking with libstdc++ fails

2012-03-23 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52689

--- Comment #4 from Markus Trippelsdorf markus at trippelsdorf dot de 
2012-03-23 21:18:19 UTC ---
Please run:
 $ nm
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib64/libstdc++.a
| grep GLIBCXX_3.4.14
and paste the output here.