diff options
| author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-20 02:10:22 +0000 |
|---|---|---|
| committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-20 02:10:22 +0000 |
| commit | eaf4b52d10e8399420a931445d290a5b470cd56e (patch) | |
| tree | 83818fa8812212f4c4643f4ab5975bed4c9efd59 /libstdc++-v3/src/c++98 | |
| parent | 07cf7615dafa0714bf2c4fc5bd37e52c16a2e9cb (diff) | |
| download | ppe42-gcc-eaf4b52d10e8399420a931445d290a5b470cd56e.tar.gz ppe42-gcc-eaf4b52d10e8399420a931445d290a5b470cd56e.zip | |
2012-09-18 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191509 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src/c++98')
| -rw-r--r-- | libstdc++-v3/src/c++98/Makefile.am | 22 | ||||
| -rw-r--r-- | libstdc++-v3/src/c++98/Makefile.in | 48 | ||||
| -rw-r--r-- | libstdc++-v3/src/c++98/compatibility-list-2.cc | 2 | ||||
| -rw-r--r-- | libstdc++-v3/src/c++98/compatibility.cc | 6 |
4 files changed, 43 insertions, 35 deletions
diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am index 05767e9ff23..c153a59336d 100644 --- a/libstdc++-v3/src/c++98/Makefile.am +++ b/libstdc++-v3/src/c++98/Makefile.am @@ -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) \ diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in index b2f2be48a14..519dd20da3c 100644 --- a/libstdc++-v3/src/c++98/Makefile.in +++ b/libstdc++-v3/src/c++98/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -194,7 +194,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@ @@ -242,7 +241,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@ @@ -402,7 +404,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) @@ -412,11 +414,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 @@ -428,8 +426,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) \ @@ -475,7 +483,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/fragment.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -494,7 +501,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libc++98convenience.la: $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_DEPENDENCIES) $(EXTRA_libc__98convenience_la_DEPENDENCIES) +libc++98convenience.la: $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_DEPENDENCIES) $(CXXLINK) $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -583,15 +590,10 @@ install-am: all-am installcheck: installcheck-am install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: diff --git a/libstdc++-v3/src/c++98/compatibility-list-2.cc b/libstdc++-v3/src/c++98/compatibility-list-2.cc index 975450cb100..0e118ff4371 100644 --- a/libstdc++-v3/src/c++98/compatibility-list-2.cc +++ b/libstdc++-v3/src/c++98/compatibility-list-2.cc @@ -24,7 +24,7 @@ #include <bits/move.h> -#ifdef PIC +#ifdef _GLIBCXX_SHARED #ifndef _GLIBCXX_BEGIN_NAMESPACE_COMPAT # define _GLIBCXX_BEGIN_NAMESPACE_COMPAT diff --git a/libstdc++-v3/src/c++98/compatibility.cc b/libstdc++-v3/src/c++98/compatibility.cc index 38d9e4b6743..9f423d0e821 100644 --- a/libstdc++-v3/src/c++98/compatibility.cc +++ b/libstdc++-v3/src/c++98/compatibility.cc @@ -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 |

