This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Building gcc 4.8.2 and libstdc++ with --disable-shared --with-pic
- From: Egon Kocjan <ekocjan at gmail dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Thu, 27 Mar 2014 15:02:55 +0100
- Subject: Building gcc 4.8.2 and libstdc++ with --disable-shared --with-pic
- Authentication-results: sourceware.org; auth=none
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