Building gcc 4.8.2 and libstdc++ with --disable-shared --with-pic

Egon Kocjan ekocjan@gmail.com
Thu Mar 27 14:03:00 GMT 2014


Hi

I've been using a toolchain with gcc 4.2.4 with configure flags 
--disable-shared --with-pic, which works nicely. But now that I've 
upgraded to gcc 4.8.2, the configure flags --disable-shared --with-pic 
do not seem to work anymore - the result is non-pic libstdc++.a. This is 
a workaround, that I'm using at the moment to get pic libstdc++.a:

--- gcc-4.8.2/libstdc++-v3/configure.orig    2014-03-27 
14:23:18.037130000 +0100
+++ gcc-4.8.2/libstdc++-v3/configure    2014-03-27 14:26:03.977130000 +0100
@@ -14924,8 +14924,8 @@
    glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"

  else
-  glibcxx_lt_pic_flag=
-  glibcxx_compiler_pic_flag=
+  glibcxx_lt_pic_flag="-prefer-pic"
+  glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
    glibcxx_compiler_shared_flag=
  fi



Am I doing something wrong or is this a bug in libstdc++ configure?

Thanks,
Egon



More information about the Libstdc++ mailing list