https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58638
Scott Lipcon <slipcon at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |slipcon at gmail dot com
--- Comment #9 from Scott Lipcon <slipcon at gmail dot com> ---
We saw the same issue with gcc 4.9.2 on x86_64 Linux - we build the compiler
with --disable-shared in order to be able to deliver our software on systems
without libstdc++.so. Without the patches in this issue, we were unable to
link our .sos to libstdc++.a because of the missing -fPIC. The patch I ended
up using was a bit different than those in the comments below, but seems to be
working for our installation:
--- libstdc++-v3/configure.ac.orig 2015-01-08 08:40:40.480754159 -0500
+++ libstdc++-v3/configure.ac 2015-01-08 08:43:27.633844665 -0500
@@ -120,6 +120,11 @@
glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"
+elif test "${with_pic+set}" = set; then
+ glibcxx_lt_pic_flag="-prefer-pic"
+ glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
+ glibcxx_compiler_shared_flag=
+
else
glibcxx_lt_pic_flag=
glibcxx_compiler_pic_flag=
I hope this gets applied to an official release at some point.