This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Export std::_List_node_base for non-PIC code
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 05 Apr 2012 11:15:40 +0200
- Subject: [v3] Export std::_List_node_base for non-PIC code
As discussed in PR libstdc++/52689, no longer exporting
std::_List_node_base for non-PIC code breaks linking go1 on Solaris with
static libstdc++:
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
The following patch fixes this, bootstrapped without regressions on
i386-pc-solaris2.11, approved by Benjamin in the PR, installed on
mainline.
Rainer
2012-04-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Partially revert:
2012-03-28 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/52689
* src/c++98/compatibility-list.cc: Same.
# HG changeset patch
# Parent 5e498daa5c157ffd17681f8d800f6866eb837cf6
Export std::_List_node_base for non-PIC code
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
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University