This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/19545] New: static libstdc++.a does not link against shared objects


i usually compile c++ code using static libstdc++, which is no problem on:
i386-pc-solaris2.9, sparc-sun-solaris2.8, sparc-sun-solaris2.9 and i686-pc-
linux-gnu using gcc-3.4.3 and binutils-2.15.94.0.2.

only on x86_64-unknown-linux-gnu i get (not always, but very often) sthg like
===
/misc/x86_64-unknown-linux-gnu/bin/ld: /misc/x86_64-unknown-linux-gnu/opt/gcc/3.
4.3/lib/gcc/x86_64-unknown-linux-gnu/3.4.3/libstdc++.a(allocator.o): relocation 
R_X86_64_32S against `__gnu_cxx::__pool_alloc_base::_S_free_list' can not be 
used when making a shared object; recompile with -fPIC
/misc/x86_64-unknown-linux-gnu/opt/gcc/3.4.3/lib/gcc/x86_64-unknown-linux-gnu/3.
4.3/libstdc++.a(allocator.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libdb_cxx-4.3.la] Error 1
===
i know that this can be solved using the shared version of libstdc++, but i'd 
like to have binaries with do not depend on libstdc++ AND i'd like to understand 
what's wrong here.

(maybe this is a binutils problem -- i am not sure...)

-- 
           Summary: static libstdc++.a does not link against shared objects
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: niki dot waibel at gmx dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19545


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]