re PR libstdc++/28811 (--with-pic vs static libraries and libstdc++)
2012-11-05 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/28811 PR libstdc++/54482 * configure.ac (glibcxx_lt_pic_flag, glibcxx_compiler_pic_flag, glibcxx_compiler_shared_flag): New. Use them. (lt_prog_compiler_pic_CXX): Set via glibcxx_*_flag(s) above. (pic_mode): Set to default. (PIC_CXXFLAGS): Remove. * Makefile.am (PICFLAG, PICFLAG_FOR_TARGET): Remove. Comment. * libsupc++/Makefile.am: Use glibcxx_ld_pic_flag and glibcxx_compiler_shared_flag. Comment. * src/c++11/Makefile.am: Same. * src/c++98/Makefile.am: Same. * src/Makefile.am: Use glibcxx_compiler_pic_flag. * Makefile.in: Regenerated. * aclocal.m4: Same. * configure: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * libsupc++/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * src/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * testsuite/Makefile.in: Same. * src/c++11/compatibility-atomic-c++0x.cc: Use _GLIBCXX_SHARED instead of PIC to designate shared-only code blocks. * src/c++11/compatibility-c++0x.cc: Same. * src/c++11/compatibility-thread-c++0x.cc: Same. * src/c++98/compatibility-list-2.cc: Same. * src/c++98/compatibility.cc: : Same. * testsuite/17_intro/shared_with_static_deps.cc: New. * doc/xml/manual/build_hacking.xml: Separate configure from make/build issues, add build details. From-SVN: r193195
This commit is contained in:
parent
e787567a1e
commit
2664caca92
|
@ -1,3 +1,46 @@
|
|||
2012-11-05 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
PR libstdc++/28811
|
||||
PR libstdc++/54482
|
||||
* configure.ac (glibcxx_lt_pic_flag,
|
||||
glibcxx_compiler_pic_flag,
|
||||
glibcxx_compiler_shared_flag): New. Use them.
|
||||
(lt_prog_compiler_pic_CXX): Set via glibcxx_*_flag(s) above.
|
||||
(pic_mode): Set to default.
|
||||
(PIC_CXXFLAGS): Remove.
|
||||
* Makefile.am (PICFLAG, PICFLAG_FOR_TARGET): Remove. Comment.
|
||||
* libsupc++/Makefile.am: Use glibcxx_ld_pic_flag and
|
||||
glibcxx_compiler_shared_flag. Comment.
|
||||
* src/c++11/Makefile.am: Same.
|
||||
* src/c++98/Makefile.am: Same.
|
||||
* src/Makefile.am: Use glibcxx_compiler_pic_flag.
|
||||
|
||||
* Makefile.in: Regenerated.
|
||||
* aclocal.m4: Same.
|
||||
* configure: Same.
|
||||
* doc/Makefile.in: Same.
|
||||
* include/Makefile.in: Same.
|
||||
* libsupc++/Makefile.in: Same.
|
||||
* po/Makefile.in: Same.
|
||||
* python/Makefile.in: Same.
|
||||
* src/Makefile.in: Same.
|
||||
* src/c++11/Makefile.in: Same.
|
||||
* src/c++98/Makefile.in: Same.
|
||||
* testsuite/Makefile.in: Same.
|
||||
|
||||
* src/c++11/compatibility-atomic-c++0x.cc: Use
|
||||
_GLIBCXX_SHARED instead of PIC to designate shared-only
|
||||
code blocks.
|
||||
* src/c++11/compatibility-c++0x.cc: Same.
|
||||
* src/c++11/compatibility-thread-c++0x.cc: Same.
|
||||
* src/c++98/compatibility-list-2.cc: Same.
|
||||
* src/c++98/compatibility.cc: : Same.
|
||||
|
||||
* testsuite/17_intro/shared_with_static_deps.cc: New.
|
||||
|
||||
* doc/xml/manual/build_hacking.xml: Separate configure from
|
||||
make/build issues, add build details.
|
||||
|
||||
2012-11-05 Benjamin Kosnik <bkoz@redhat.com>
|
||||
Oleg Smolsky <oleg@smolsky.net>
|
||||
|
||||
|
|
|
@ -152,8 +152,6 @@ AM_MAKEFLAGS = \
|
|||
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
||||
"MAKE=$(MAKE)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
||||
"PICFLAG=$(PICFLAG)" \
|
||||
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
||||
"SHELL=$(SHELL)" \
|
||||
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
||||
"exec_prefix=$(exec_prefix)" \
|
||||
|
|
|
@ -188,7 +188,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -236,7 +235,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
@ -353,8 +355,6 @@ AM_MAKEFLAGS = \
|
|||
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
||||
"MAKE=$(MAKE)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
||||
"PICFLAG=$(PICFLAG)" \
|
||||
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
||||
"SHELL=$(SHELL)" \
|
||||
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
||||
"exec_prefix=$(exec_prefix)" \
|
||||
|
|
|
@ -602,7 +602,6 @@ ac_subst_vars='am__EXEEXT_FALSE
|
|||
am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
PIC_CXXFLAGS
|
||||
WARN_FLAGS
|
||||
OPTIMIZE_CXXFLAGS
|
||||
TOPLEVEL_INCLUDES
|
||||
|
@ -713,6 +712,9 @@ GLIBCXX_BUILD_PCH_FALSE
|
|||
GLIBCXX_BUILD_PCH_TRUE
|
||||
GLIBCXX_HOSTED_FALSE
|
||||
GLIBCXX_HOSTED_TRUE
|
||||
glibcxx_compiler_shared_flag
|
||||
glibcxx_compiler_pic_flag
|
||||
glibcxx_lt_pic_flag
|
||||
enable_static
|
||||
enable_shared
|
||||
lt_host_flags
|
||||
|
@ -5280,6 +5282,7 @@ $as_echo "$as_me: OS config directory is $os_include_dir" >&6;}
|
|||
|
||||
|
||||
|
||||
# Libtool setup.
|
||||
if test "x${with_newlib}" != "xyes"; then
|
||||
enable_dlopen=yes
|
||||
|
||||
|
@ -11497,7 +11500,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11500 "configure"
|
||||
#line 11503 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -11603,7 +11606,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11606 "configure"
|
||||
#line 11609 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -14889,6 +14892,38 @@ esac
|
|||
|
||||
|
||||
|
||||
# libtool variables for C++ shared and position-independent compiles.
|
||||
#
|
||||
# Use glibcxx_lt_pic_flag to designate the automake variable
|
||||
# used to encapsulate the default libtool approach to creating objects
|
||||
# with position-independent code. Default: -prefer-pic.
|
||||
#
|
||||
# Use glibcxx_compiler_shared_flag to designate a compile-time flags for
|
||||
# creating shared objects. Default: -D_GLIBCXX_SHARED.
|
||||
#
|
||||
# Use glibcxx_compiler_pic_flag to designate a compile-time flags for
|
||||
# creating position-independent objects. This varies with the target
|
||||
# hardware and operating system, but is often: -DPIC -fPIC.
|
||||
if test "$enable_shared" = yes; then
|
||||
glibcxx_lt_pic_flag="-prefer-pic"
|
||||
glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
|
||||
glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"
|
||||
|
||||
else
|
||||
glibcxx_lt_pic_flag=
|
||||
glibcxx_compiler_pic_flag=
|
||||
glibcxx_compiler_shared_flag=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Override the libtool's pic_flag and pic_mode.
|
||||
# Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT.
|
||||
# NB: this impacts --with-pic and --without-pic.
|
||||
lt_prog_compiler_pic_CXX="$glibcxx_compiler_pic_flag $glibcxx_compiler_shared_flag"
|
||||
pic_mode='default'
|
||||
|
||||
# Eliminate -lstdc++ addition to postdeps for cross compiles.
|
||||
postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
|
||||
|
||||
|
@ -14961,7 +14996,7 @@ fi
|
|||
#
|
||||
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 14964 "configure"
|
||||
#line 14999 "configure"
|
||||
struct S { ~S(); };
|
||||
void bar();
|
||||
void foo()
|
||||
|
@ -15296,7 +15331,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
|
|||
# Fake what AC_TRY_COMPILE does.
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15299 "configure"
|
||||
#line 15334 "configure"
|
||||
int main()
|
||||
{
|
||||
typedef bool atomic_type;
|
||||
|
@ -15331,7 +15366,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15334 "configure"
|
||||
#line 15369 "configure"
|
||||
int main()
|
||||
{
|
||||
typedef short atomic_type;
|
||||
|
@ -15366,7 +15401,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15369 "configure"
|
||||
#line 15404 "configure"
|
||||
int main()
|
||||
{
|
||||
// NB: _Atomic_word not necessarily int.
|
||||
|
@ -15402,7 +15437,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15405 "configure"
|
||||
#line 15440 "configure"
|
||||
int main()
|
||||
{
|
||||
typedef long long atomic_type;
|
||||
|
@ -15481,7 +15516,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
|
|||
# unnecessary for this test.
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15484 "configure"
|
||||
#line 15519 "configure"
|
||||
int main()
|
||||
{
|
||||
_Decimal32 d1;
|
||||
|
@ -15523,7 +15558,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|||
# unnecessary for this test.
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15526 "configure"
|
||||
#line 15561 "configure"
|
||||
template<typename T1, typename T2>
|
||||
struct same
|
||||
{ typedef T2 type; };
|
||||
|
@ -15557,7 +15592,7 @@ $as_echo "$enable_int128" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15560 "configure"
|
||||
#line 15595 "configure"
|
||||
template<typename T1, typename T2>
|
||||
struct same
|
||||
{ typedef T2 type; };
|
||||
|
@ -66471,13 +66506,6 @@ $as_echo "$gxx_include_dir" >&6; }
|
|||
|
||||
|
||||
|
||||
if test "$enable_shared" = yes; then
|
||||
PIC_CXXFLAGS="-prefer-pic"
|
||||
else
|
||||
PIC_CXXFLAGS=
|
||||
fi
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files scripts/testsuite_flags"
|
||||
|
|
|
@ -88,6 +88,7 @@ CXXFLAGS="$save_CXXFLAGS"
|
|||
# up critical shell variables.
|
||||
GLIBCXX_CONFIGURE
|
||||
|
||||
# Libtool setup.
|
||||
if test "x${with_newlib}" != "xyes"; then
|
||||
AC_LIBTOOL_DLOPEN
|
||||
fi
|
||||
|
@ -96,6 +97,38 @@ ACX_LT_HOST_FLAGS
|
|||
AC_SUBST(enable_shared)
|
||||
AC_SUBST(enable_static)
|
||||
|
||||
# libtool variables for C++ shared and position-independent compiles.
|
||||
#
|
||||
# Use glibcxx_lt_pic_flag to designate the automake variable
|
||||
# used to encapsulate the default libtool approach to creating objects
|
||||
# with position-independent code. Default: -prefer-pic.
|
||||
#
|
||||
# Use glibcxx_compiler_shared_flag to designate a compile-time flags for
|
||||
# creating shared objects. Default: -D_GLIBCXX_SHARED.
|
||||
#
|
||||
# Use glibcxx_compiler_pic_flag to designate a compile-time flags for
|
||||
# creating position-independent objects. This varies with the target
|
||||
# hardware and operating system, but is often: -DPIC -fPIC.
|
||||
if test "$enable_shared" = yes; then
|
||||
glibcxx_lt_pic_flag="-prefer-pic"
|
||||
glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
|
||||
glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"
|
||||
|
||||
else
|
||||
glibcxx_lt_pic_flag=
|
||||
glibcxx_compiler_pic_flag=
|
||||
glibcxx_compiler_shared_flag=
|
||||
fi
|
||||
AC_SUBST(glibcxx_lt_pic_flag)
|
||||
AC_SUBST(glibcxx_compiler_pic_flag)
|
||||
AC_SUBST(glibcxx_compiler_shared_flag)
|
||||
|
||||
# Override the libtool's pic_flag and pic_mode.
|
||||
# Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT.
|
||||
# NB: this impacts --with-pic and --without-pic.
|
||||
lt_prog_compiler_pic_CXX="$glibcxx_compiler_pic_flag $glibcxx_compiler_shared_flag"
|
||||
pic_mode='default'
|
||||
|
||||
# Eliminate -lstdc++ addition to postdeps for cross compiles.
|
||||
postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
|
||||
|
||||
|
@ -421,13 +454,6 @@ GLIBCXX_EXPORT_INSTALL_INFO
|
|||
GLIBCXX_EXPORT_INCLUDES
|
||||
GLIBCXX_EXPORT_FLAGS
|
||||
|
||||
if test "$enable_shared" = yes; then
|
||||
PIC_CXXFLAGS="-prefer-pic"
|
||||
else
|
||||
PIC_CXXFLAGS=
|
||||
fi
|
||||
AC_SUBST(PIC_CXXFLAGS)
|
||||
|
||||
dnl In autoconf 2.5x, AC_OUTPUT is replaced by four AC_CONFIG_* macros,
|
||||
dnl which can all be called multiple times as needed, plus one (different)
|
||||
dnl AC_OUTPUT macro. This one lists the files to be created:
|
||||
|
|
|
@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -210,7 +209,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
|
|
@ -8,7 +8,13 @@
|
|||
C++
|
||||
</keyword>
|
||||
<keyword>
|
||||
BUILD_HACKING
|
||||
build
|
||||
</keyword>
|
||||
<keyword>
|
||||
configure
|
||||
</keyword>
|
||||
<keyword>
|
||||
hacking
|
||||
</keyword>
|
||||
<keyword>
|
||||
version
|
||||
|
@ -38,7 +44,50 @@
|
|||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="build_hacking.map"><info><title>Overview: What Comes from Where</title></info>
|
||||
<section xml:id="build_hacking.overview">
|
||||
<info><title>Overview</title></info>
|
||||
|
||||
<section xml:id="build_hacking.overview.basic">
|
||||
<info><title>General Process</title></info>
|
||||
|
||||
<para>
|
||||
The configure process begins the act of building libstdc++, and is
|
||||
started via:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
<computeroutput>
|
||||
configure
|
||||
</computeroutput>
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
The <filename>configure</filename> file is a script generated (via
|
||||
<command>autoconf</command>) from the file
|
||||
<filename>configure.ac</filename>.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
After the configure process is complete,
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
<computeroutput>
|
||||
make all
|
||||
</computeroutput>
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
in the build directory starts the build process. The <literal>all</literal> target comes from the <filename>Makefile</filename> file, which is generated via <command>configure</command> from the <filename>Makefile.in</filename> file, which is in turn generated (via
|
||||
<command>automake</command>) from the file
|
||||
<filename>Makefile.am</filename>.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section xml:id="build_hacking.overview.map"><info><title>What Comes from Where</title></info>
|
||||
|
||||
|
||||
<figure>
|
||||
|
@ -57,19 +106,19 @@
|
|||
</figure>
|
||||
|
||||
<para>
|
||||
Regenerate all generated files by using the command sequence
|
||||
<code>"autoreconf"</code> at the top level of the libstdc++ source
|
||||
directory. The following will also work, but is much more complex:
|
||||
<code>"aclocal-1.11 && autoconf-2.64 &&
|
||||
autoheader-2.64 && automake-1.11"</code> The version
|
||||
numbers may be absent entirely or otherwise vary depending on
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/prerequisites.html">the
|
||||
current requirements</link> and your vendor's choice of
|
||||
installation names.
|
||||
Regenerate all generated files by using the command
|
||||
<code>autoreconf</code> at the top level of the libstdc++ source
|
||||
directory.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="build_hacking.scripts"><info><title>Storing Information in non-AC files (like configure.host)</title></info>
|
||||
</section> <!-- overview -->
|
||||
|
||||
|
||||
<section xml:id="build_hacking.configure">
|
||||
<info><title>Configure</title></info>
|
||||
|
||||
<section xml:id="build_hacking.configure.scripts"><info><title>Storing Information in non-AC files (like configure.host)</title></info>
|
||||
|
||||
|
||||
<para>
|
||||
|
@ -101,7 +150,7 @@
|
|||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="build_hacking.conventions"><info><title>Coding and Commenting Conventions</title></info>
|
||||
<section xml:id="build_hacking.configure.conventions"><info><title>Coding and Commenting Conventions</title></info>
|
||||
|
||||
|
||||
<para>
|
||||
|
@ -126,7 +175,7 @@
|
|||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="build_hacking.acinclude"><info><title>The acinclude.m4 layout</title></info>
|
||||
<section xml:id="build_hacking.configure.acinclude"><info><title>The acinclude.m4 layout</title></info>
|
||||
|
||||
<para>
|
||||
The nice thing about acinclude.m4/aclocal.m4 is that macros aren't
|
||||
|
@ -217,7 +266,7 @@
|
|||
|
||||
</section>
|
||||
|
||||
<section xml:id="build_hacking.enable"><info><title><constant>GLIBCXX_ENABLE</constant>, the <literal>--enable</literal> maker</title></info>
|
||||
<section xml:id="build_hacking.configure.enable"><info><title><constant>GLIBCXX_ENABLE</constant>, the <literal>--enable</literal> maker</title></info>
|
||||
|
||||
|
||||
<para>
|
||||
|
@ -351,5 +400,86 @@
|
|||
</para>
|
||||
|
||||
</section>
|
||||
</section> <!-- configure -->
|
||||
|
||||
<section xml:id="build_hacking.make"><info><title>Make</title></info>
|
||||
|
||||
<para>
|
||||
The build process has to make all of object files needed for
|
||||
static or shared libraries, but first it has to generate some
|
||||
include files. The general order is as follows:
|
||||
</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
make include files, make pre-compiled headers
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
make libsupc++
|
||||
</para>
|
||||
<para>
|
||||
Generates a libtool convenience library,
|
||||
<filename>libsupc++convenience</filename> with language-support
|
||||
routines. Also generates a freestanding static library,
|
||||
<filename>libsupc++.a</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
make src
|
||||
</para>
|
||||
<para>
|
||||
Generates two convenience libraries, one for C++98 and one for
|
||||
C++11, various compability files for shared and static
|
||||
libraries, and then collects all the generated bits and creates
|
||||
the final libstdc++ libraries.
|
||||
</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
make src/c++98
|
||||
</para>
|
||||
<para>
|
||||
Generates a libtool convenience library,
|
||||
<filename>libc++98convenience</filename> with language-support
|
||||
routines. Uses the <literal>-std=gnu++98</literal> dialect.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
make src/c++11
|
||||
</para>
|
||||
<para>
|
||||
Generates a libtool convenience library,
|
||||
<filename>libc++11convenience</filename> with language-support
|
||||
routines. Uses the <literal>-std=gnu++11</literal> dialect.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
make src
|
||||
</para>
|
||||
<para>
|
||||
Generates needed compatibility objects for shared and static
|
||||
libraries. Shared-only code is seggregated at compile-time via
|
||||
the macro <literal>_GLIBCXX_SHARED</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Then, collects all the generated convenience libraries, adds in
|
||||
any required compatibility objects, and creates the final shared
|
||||
and static libraries: <filename>libstdc++.so</filename> and
|
||||
<filename>libstdc++.a</filename>.
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
</section> <!-- make -->
|
||||
|
||||
</section>
|
||||
|
|
|
@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -208,7 +207,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
|
|
@ -98,33 +98,6 @@ sources = \
|
|||
libsupc___la_SOURCES = $(sources) $(c_sources)
|
||||
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
|
||||
|
||||
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
|
||||
# modified in a per-library or per-sub-library way. Need to manually
|
||||
# set this option because CONFIG_CXXFLAGS has to be after
|
||||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion call for it.
|
||||
AM_CXXFLAGS = \
|
||||
$(PIC_CXXFLAGS) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
AM_MAKEFLAGS = \
|
||||
"gxx_include_dir=$(gxx_include_dir)"
|
||||
|
||||
|
||||
# Use special rules for pulling things out of libiberty. These
|
||||
# objects should be compiled with the "C" compiler, not the C++
|
||||
# compiler, and also should not use the C++ includes.
|
||||
C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
|
||||
C_COMPILE = \
|
||||
$(CC) $(DEFS) $(C_INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
# LTCOMPILE is copied from LTCXXCOMPILE below.
|
||||
LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
|
||||
$(CC) $(DEFS) $(C_INCLUDES) $(PIC_CXXFLAGS) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
cp-demangle.c:
|
||||
rm -f $@
|
||||
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
|
||||
|
@ -155,13 +128,37 @@ nested_exception.lo: nested_exception.cc
|
|||
nested_exception.o: nested_exception.cc
|
||||
$(CXXCOMPILE) -std=gnu++0x -c $<
|
||||
|
||||
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
|
||||
# modified in a per-library or per-sub-library way. Need to manually
|
||||
# set this option because CONFIG_CXXFLAGS has to be after
|
||||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion call for it.
|
||||
AM_CXXFLAGS = \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
AM_MAKEFLAGS = \
|
||||
"gxx_include_dir=$(gxx_include_dir)"
|
||||
|
||||
|
||||
# Use special rules for pulling things out of libiberty. These
|
||||
# objects should be compiled with the "C" compiler, not the C++
|
||||
# compiler, and also should not use the C++ includes.
|
||||
C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
|
||||
C_COMPILE = \
|
||||
$(CC) $(DEFS) $(C_INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
# LTCOMPILE is copied from LTCXXCOMPILE below.
|
||||
LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
|
||||
$(CC) $(DEFS) $(C_INCLUDES) \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -173,9 +170,18 @@ nested_exception.o: nested_exception.cc
|
|||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use.
|
||||
#
|
||||
# We have to put --tag disable-shared after --tag CXX lest things
|
||||
# CXX undo the affect of disable-shared.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX --tag disable-shared \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -220,7 +220,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -268,7 +267,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
@ -413,7 +415,7 @@ libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
|
|||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion call for it.
|
||||
AM_CXXFLAGS = \
|
||||
$(PIC_CXXFLAGS) \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
|
@ -432,17 +434,14 @@ C_COMPILE = \
|
|||
|
||||
# LTCOMPILE is copied from LTCXXCOMPILE below.
|
||||
LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
|
||||
$(CC) $(DEFS) $(C_INCLUDES) $(PIC_CXXFLAGS) \
|
||||
$(CC) $(DEFS) $(C_INCLUDES) \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -454,9 +453,18 @@ LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=comp
|
|||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use.
|
||||
#
|
||||
# We have to put --tag disable-shared after --tag CXX lest things
|
||||
# CXX undo the affect of disable-shared.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX --tag disable-shared \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -208,7 +207,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
|
|
@ -184,7 +184,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -232,7 +231,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
|
|
@ -116,22 +116,41 @@ compatibility-thread-c++0x.lo: compatibility-thread-c++0x.cc
|
|||
compatibility-thread-c++0x.o: compatibility-thread-c++0x.cc
|
||||
$(CXXCOMPILE) -std=gnu++11 -c $<
|
||||
|
||||
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
|
||||
# A note on compatibility and static libraries.
|
||||
#
|
||||
# static lib == linked against only this version, should not need compat
|
||||
# shared lib == linked against potentially all compat versions
|
||||
#
|
||||
# Thus, the shared libs have more compat symbols, which can be found
|
||||
# segregated in the sources with -D_GLIBCXX_SHARED.
|
||||
#
|
||||
# In the sub-directories of libsupc++, src/c++98, src/c++11, only
|
||||
# -prefer-pic objects are generated for the convenience libraries.
|
||||
#
|
||||
# In the main src directory, make shared and static objects just for
|
||||
# the compat libraries. Shared objects are compiled with -prefer-pic
|
||||
# -D_GLIBCXX_SHARED and in the .libs sub-directory, static objects are
|
||||
# compiled with -prefer-pic (ie, -fPIC but not -D_GLIBCXX_SHARED) and
|
||||
# the main src directory.
|
||||
#
|
||||
# Why are objects destined for libstdc++.a compiled with -fPIC? First,
|
||||
# because -fPIC is not harmful to use for objects destined for static
|
||||
# libraries. In addition, using -fPIC will allow the use of static
|
||||
# libstdc++.a in the creation of other C++ shared libraries.
|
||||
|
||||
# AM_CXXFLAGS needs to be in each sub-directory so that it can be
|
||||
# modified in a per-library or per-sub-library way. Need to manually
|
||||
# set this option because CONFIG_CXXFLAGS has to be after
|
||||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion calls for it.
|
||||
AM_CXXFLAGS = \
|
||||
$(glibcxx_compiler_pic_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -142,7 +161,19 @@ AM_CXXFLAGS = \
|
|||
# can't decide which configuration to use, and it gives up. The
|
||||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use
|
||||
# attempt to infer which configuration to use.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -213,7 +213,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -261,7 +260,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
@ -374,23 +376,42 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
|
|||
# Use special rules for parallel mode compilation.
|
||||
PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
|
||||
|
||||
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
|
||||
# A note on compatibility and static libraries.
|
||||
#
|
||||
# static lib == linked against only this version, should not need compat
|
||||
# shared lib == linked against potentially all compat versions
|
||||
#
|
||||
# Thus, the shared libs have more compat symbols, which can be found
|
||||
# segregated in the sources with -D_GLIBCXX_SHARED.
|
||||
#
|
||||
# In the sub-directories of libsupc++, src/c++98, src/c++11, only
|
||||
# -prefer-pic objects are generated for the convenience libraries.
|
||||
#
|
||||
# In the main src directory, make shared and static objects just for
|
||||
# the compat libraries. Shared objects are compiled with -prefer-pic
|
||||
# -D_GLIBCXX_SHARED and in the .libs sub-directory, static objects are
|
||||
# compiled with -prefer-pic (ie, -fPIC but not -D_GLIBCXX_SHARED) and
|
||||
# the main src directory.
|
||||
#
|
||||
# Why are objects destined for libstdc++.a compiled with -fPIC? First,
|
||||
# because -fPIC is not harmful to use for objects destined for static
|
||||
# libraries. In addition, using -fPIC will allow the use of static
|
||||
# libstdc++.a in the creation of other C++ shared libraries.
|
||||
|
||||
# AM_CXXFLAGS needs to be in each sub-directory so that it can be
|
||||
# modified in a per-library or per-sub-library way. Need to manually
|
||||
# set this option because CONFIG_CXXFLAGS has to be after
|
||||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion calls for it.
|
||||
AM_CXXFLAGS = \
|
||||
$(glibcxx_compiler_pic_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -401,7 +422,19 @@ AM_CXXFLAGS = \
|
|||
# can't decide which configuration to use, and it gives up. The
|
||||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use
|
||||
# attempt to infer which configuration to use.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -68,7 +68,7 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources)
|
|||
# as the occasion calls for it.
|
||||
AM_CXXFLAGS = \
|
||||
-std=gnu++11 \
|
||||
$(PIC_CXXFLAGS) \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
|
@ -77,11 +77,7 @@ AM_MAKEFLAGS = \
|
|||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -93,8 +89,18 @@ AM_MAKEFLAGS = \
|
|||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use.
|
||||
# We have to put --tag disable-shared after --tag CXX lest things
|
||||
# CXX undo the affect of disable-shared.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX --tag disable-shared \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -177,7 +177,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -225,7 +224,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
@ -331,7 +333,7 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources)
|
|||
# as the occasion calls for it.
|
||||
AM_CXXFLAGS = \
|
||||
-std=gnu++11 \
|
||||
$(PIC_CXXFLAGS) \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
|
@ -341,11 +343,7 @@ AM_MAKEFLAGS = \
|
|||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -357,8 +355,18 @@ AM_MAKEFLAGS = \
|
|||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use.
|
||||
# We have to put --tag disable-shared after --tag CXX lest things
|
||||
# CXX undo the affect of disable-shared.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX --tag disable-shared \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
// XXX GLIBCXX_ABI Deprecated
|
||||
// gcc-4.7.0
|
||||
|
||||
#ifdef PIC
|
||||
#ifdef _GLIBCXX_SHARED
|
||||
|
||||
#define LOGSIZE 4
|
||||
|
||||
|
@ -147,7 +147,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
|
|||
// In the future, GLIBCXX_ABI > 6 should remove all uses of
|
||||
// _GLIBCXX_*_SYMVER macros in this file.
|
||||
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
|
||||
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
|
||||
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
# error "compatibility-c++0x.cc must be compiled with -std=gnu++0x"
|
||||
#endif
|
||||
|
||||
#ifdef PIC
|
||||
#ifdef _GLIBCXX_SHARED
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <bits/c++config.h>
|
||||
#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC)
|
||||
#if defined(_GLIBCXX_HAVE_TLS) && defined(_GLIBCXX_SHARED)
|
||||
#define _GLIBCXX_ASYNC_ABI_COMPAT
|
||||
#endif
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
// XXX GLIBCXX_ABI Deprecated
|
||||
// gcc-4.6.0
|
||||
// <future> export changes
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
|
||||
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
|
||||
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
|
||||
|
||||
|
@ -57,7 +57,7 @@ _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx15future_categoryE, _ZSt15future_category, GLIB
|
|||
// gcc-4.6.0
|
||||
// <mutex> export changes
|
||||
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
|
||||
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
|
||||
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
|
||||
|
||||
|
@ -82,7 +82,7 @@ _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx11try_to_lockE, _ZSt11try_to_lock, GLIBCXX_3.4.
|
|||
// <future> export changes
|
||||
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
|
||||
&& (ATOMIC_INT_LOCK_FREE > 1)
|
||||
#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC)
|
||||
#if defined(_GLIBCXX_HAVE_TLS) && defined(_GLIBCXX_SHARED)
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
|
|
@ -172,7 +172,7 @@ parallel_settings.o: parallel_settings.cc
|
|||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion calls for it.
|
||||
AM_CXXFLAGS = \
|
||||
$(PIC_CXXFLAGS) \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
|
@ -181,11 +181,7 @@ AM_MAKEFLAGS = \
|
|||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -197,8 +193,18 @@ AM_MAKEFLAGS = \
|
|||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use.
|
||||
# We have to put --tag disable-shared after --tag CXX lest things
|
||||
# CXX undo the affect of disable-shared.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX --tag disable-shared \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -192,7 +192,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -240,7 +239,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
@ -400,7 +402,7 @@ PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
|
|||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion calls for it.
|
||||
AM_CXXFLAGS = \
|
||||
$(PIC_CXXFLAGS) \
|
||||
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
|
||||
$(XTEMPLATE_FLAGS) \
|
||||
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
|
@ -410,11 +412,7 @@ AM_MAKEFLAGS = \
|
|||
|
||||
# Libtool notes
|
||||
|
||||
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
|
||||
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# 1) In general, libtool expects an argument such as `--tag=CXX' when
|
||||
# using the C++ compiler, because that will enable the settings
|
||||
# detected when C++ support was being configured. However, when no
|
||||
# such flag is given in the command line, libtool attempts to figure
|
||||
|
@ -426,8 +424,18 @@ AM_MAKEFLAGS = \
|
|||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use.
|
||||
# We have to put --tag disable-shared after --tag CXX lest things
|
||||
# CXX undo the affect of disable-shared.
|
||||
#
|
||||
# The second tag argument, `--tag disable-shared` means that libtool
|
||||
# only compiles each source once, for static objects. In actuality,
|
||||
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
|
||||
# the libtool command that is used create the object, which is
|
||||
# suitable for shared libraries. The `--tag disable-shared` must be
|
||||
# placed after --tag CXX lest things CXX undo the affect of
|
||||
# disable-shared.
|
||||
|
||||
# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
||||
# last. (That way, things like -O2 passed down from the toplevel can
|
||||
# be overridden by --enable-debug.)
|
||||
LTCXXCOMPILE = \
|
||||
$(LIBTOOL) --tag CXX --tag disable-shared \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <bits/move.h>
|
||||
|
||||
#ifdef PIC
|
||||
#ifdef _GLIBCXX_SHARED
|
||||
|
||||
#ifndef _GLIBCXX_BEGIN_NAMESPACE_COMPAT
|
||||
# define _GLIBCXX_BEGIN_NAMESPACE_COMPAT
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <bits/c++config.h>
|
||||
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
|
||||
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)\
|
||||
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
|
||||
#define istreambuf_iterator istreambuf_iteratorXX
|
||||
|
@ -204,7 +204,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
|
|||
|
||||
// NB: These symbols renames should go into the shared library only,
|
||||
// and only those shared libraries that support versioning.
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
|
||||
#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
|
||||
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
|
||||
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
|
||||
|
||||
|
@ -529,7 +529,7 @@ extern __attribute__((used, weak)) const void * const _ZTIPKe[4]
|
|||
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
|
||||
|
||||
#ifdef _GLIBCXX_SYMVER_DARWIN
|
||||
#if (defined(__ppc__) || defined(__ppc64__)) && defined(PIC)
|
||||
#if (defined(__ppc__) || defined(__ppc64__)) && defined(_GLIBCXX_SHARED)
|
||||
/* __eprintf shouldn't have been made visible from libstdc++, or
|
||||
anywhere, but on Mac OS X 10.4 it was defined in
|
||||
libstdc++.6.0.3.dylib; so on that platform we have to keep defining
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
// { dg-do link }
|
||||
// { dg-require-static-libstdcxx }
|
||||
// { dg-require-sharedlib "" }
|
||||
// { dg-require-effective-target fpic }
|
||||
// { dg-options "-shared -fPIC -static-libgcc -static-libstdc++" }
|
||||
|
||||
// Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>
|
||||
|
||||
// libstdc++/28811 --with-pic vs. static linking
|
||||
#include <iostream>
|
||||
#include <locale>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::locale c __attribute__((unused)) = std::locale::classic();
|
||||
std::cout << "i am old-skool\n";
|
||||
return 0;
|
||||
}
|
|
@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
|
|||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PIC_CXXFLAGS = @PIC_CXXFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_FLAGS = @SECTION_FLAGS@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
|
@ -208,7 +207,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
|
|||
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
||||
glibcxx_POFILES = @glibcxx_POFILES@
|
||||
glibcxx_builddir = @glibcxx_builddir@
|
||||
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
||||
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
||||
glibcxx_localedir = @glibcxx_localedir@
|
||||
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
||||
glibcxx_prefixdir = @glibcxx_prefixdir@
|
||||
glibcxx_srcdir = @glibcxx_srcdir@
|
||||
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
||||
|
|
Loading…
Reference in New Issue