Patchwork [libstdc++] : Fix static linking failure on alphaev68-pc-linux-gnu

login
register
mail settings
Submitter Uros Bizjak
Date April 4, 2012, 5:33 p.m.
Message ID <CAFULd4Y_2CJin3kD4SHzDOwpDs1rKNW23MfmXNDcCcGvC7ZL=A@mail.gmail.com>
Download mbox | patch
Permalink /patch/150775/
State New
Headers show

Comments

Uros Bizjak - April 4, 2012, 5:33 p.m.
Hello!

The fix for PR52689 caused 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:

/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_get<char, std::istreambuf_iterator<char,
std::char_traits<char> > >::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_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::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_get<char, std::istreambuf_iterator<char,
std::char_traits<char> > >::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_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::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_get<wchar_t, std::istreambuf_iterator<wchar_t,
std::char_traits<wchar_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_put<wchar_t, std::ostreambuf_iterator<wchar_t,
std::char_traits<wchar_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:430:
undefined reference to `std::money_get<wchar_t,
std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::id'^M

This happens in #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT protected code.

Following partial revert fixes the failure:

2012-04-04  Uros Bizjak  <ubizjak@gmail.com>

	Partially revert:
	2012-03-28  Benjamin Kosnik  <bkoz@redhat.com>

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

Tested on alphaev68-pc-linux-gnu, approved in the PR audit trail by
Benjamin, committed to SVN.

Uros.

Patch

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