Commit 530539d9 by Phil Edwards

acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): New macro, initial revision.

2002-02-14  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS):  New macro, initial revision.
	* configure.in:  Call it.
	* config/linker-map.gnu:  New file, initial incomplete revision.
	* src/Makefile.am:  Optionally pass version script to the linker.
	* aclocal.m4:  Regenerate.
	* configure:  Regenerate.
	* src/Makefile.in:  Regenerate.

From-SVN: r49770
parent 30fbb95c
2002-02-14 Phil Edwards <pme@gcc.gnu.org>
* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): New macro, initial revision.
* configure.in: Call it.
* config/linker-map.gnu: New file, initial incomplete revision.
* src/Makefile.am: Optionally pass version script to the linker.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* src/Makefile.in: Regenerate.
2002-02-13 Benjamin Kosnik <bkoz@redhat.com>
* src/localename.cc: Remove stdexcept include.
......
......@@ -2004,3 +2004,58 @@ fi
])
dnl
dnl Add version tags to symbols in shared library (or not), additionally
dnl marking other symbols as private/local (or not).
dnl
dnl GLIBCPP_ENABLE_SYMVERS
dnl --enable-symvers adds a version script to the linker call when creating
dnl the shared library.
dnl --disable-symvers does not.
dnl + Usage: GLIBCPP_ENABLE_SYMVERS[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
dnl defaults to `no'.
AC_DEFUN(GLIBCPP_ENABLE_SYMVERS, [dnl
AC_REQUIRE([AC_PROG_LD])
define([GLIBCPP_ENABLE_SYMVERS_DEFAULT], ifelse($1, yes, yes, no))dnl
AC_ARG_ENABLE(symvers,
changequote(<<, >>)dnl
<< --enable-symvers enables symbol versioning of the shared library [default=>>GLIBCPP_ENABLE_SYMVERS_DEFAULT],
changequote([, ])dnl
[case "$enableval" in
yes) enable_symvers=yes ;;
no) enable_symvers=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable symvers]) ;;
esac],
enable_symvers=GLIBCPP_ENABLE_SYMVERS_DEFAULT)dnl
dnl Option parsed, now set things appropriately
AC_MSG_CHECKING([whether to version shared lib symbols])
if test $enable_shared = no; then
enable_symvers=irrelevant
fi
# placeholder -- maybe have a fallback later
LINKER_MAP=config/linker-map.gnu
# symvers variable may evolve into holding the type of linker map someday
if test $enable_symvers = yes; then
# flat-out assume a whole bunch of things right now
#
# The name of this variable changed between autoconf versions (our problem
# for depending on an impl detail, tsk tsk). It used to be
# ac_cv_prog_gnu_ld but is now lt_cv_prog_gnu_ld, and is copied back into
# with_gnu_ld which can also be user-settable. Let's use that one.
if test $with_gnu_ld = yes; then
# we also assume that the gnu ld in question has phil's patches... can't
# think today of an easy way to programatically test for that; revisit
LINKER_MAP=config/linker-map.gnu
else
# placeholder -- maybe have a fallback later
LINKER_MAP=config/linker-map.gnu
enable_symvers=no
fi
fi
AC_LINK_FILES($LINKER_MAP, src/linker.map)
AM_CONDITIONAL(GLIBCPP_BUILD_VERSIONED_SHLIB, test "$enable_symvers" = yes)
AC_MSG_RESULT($enable_symvers)
])
## Linker script for GNU ld 2.11.94+ only.
##
## Copyright (C) 2002 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
##
## 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 2, 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 COPYING. If not, write to the Free
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
## The symbol version here is a SWAG based on libgcc-std.ver.
GCC_3.1 {
global:
## Names inside the 'extern' block are human-readable (demangled) names;
## all but the last are terminated with a semicolon.
extern "C++"
{
std::[A-Za-z]*;
std::__throw_*;
std::__basic_file*;
#std::__convert_to_*;
std::__num_base*;
std::__timepunct*
};
## Names not in an 'extern' block are mangled names. In the non-C cases,
## their demangled names are written above them, in a comment.
__cxa_*;
__gxx_personality_v0;
__dynamic_cast;
# DW.ref.__gxx_personality_v0; # I have no idea what this is.
######## these seem okay
## operator new(unsigned)
_Znwj;
## operator delete(void*)
_ZdlPv;
## operator new[](unsigned)
_Znaj;
## operator delete[](void*)
_ZdaPv;
######## hmmmmm
## std::_S_rb_tree_red
_ZSt14_S_rb_tree_red;
## std::_S_rb_tree_black
_ZSt16_S_rb_tree_black;
## std::__stl_threshold
_ZSt15__stl_threshold;
## std::__stl_chunk_size
_ZSt16__stl_chunk_size;
## VTT for std::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >
_ZTTSt19basic_istringstreamIcSt11char_traitsIcESaIcEE;
## VTT for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >
_ZTTSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE;
# this is a function, "void std::__convert_to_v(stuff)", and as such
# doesn't work well in the demangled section above
_ZSt14__convert_to_v*;
# likewise for "std::_Setfill<char> std::setfill<char>(char)"
_ZSt7setfillIcESt8_SetfillIT_ES1_;
# likewise for "bool std::has_facet<std::ctype<char> >(std::locale const&)"
_ZSt9has_facetISt5ctypeIcEEbRKSt6locale;
# likewise for "bool
# std::has_facet<std::num_put<char, std::ostreambuf_iterator<char,
# std::char_traits<char> > > >(std::locale const&)"
_ZSt9has_facetISt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEEbRKSt6locale;
# ditto for istreambuf_iterator
_ZSt9has_facetISt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEEEbRKSt6locale;
# ## vtable for std::logic_error
# _ZTVSt11logic_error;
#
# ## vtable for std::exception
# _ZTVSt9exception;
#
# ## vtable for __cxxabiv1::__class_type_info
# _ZTVN10__cxxabiv117__class_type_infoE;
#
# ## vtable for __cxxabiv1::__si_class_type_info
# _ZTVN10__cxxabiv120__si_class_type_infoE;
#
# ## vtable for __cxxabiv1::__vmi_class_type_info
# _ZTVN10__cxxabiv121__vmi_class_type_infoE;
#
# gah, screw it, export /all/ the vtables in these namespaces, somebody
# smarter than me will have to figure this one out
_ZTVSt*; _ZTVN10__cxxabiv1*;
local:
*;
};
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -49,6 +49,7 @@ GLIBCPP_ENABLE_THREADS
GLIBCPP_ENABLE_CXX_FLAGS([none])
GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
GLIBCPP_ENABLE_CONCEPT_CHECKS
GLIBCPP_ENABLE_SYMVERS([no])
if test -n "$with_cross_host" || test x"$build" != x"$host"; then
......
## Makefile for the src subdirectory of the GNU C++ Standard library.
##
## Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
......@@ -77,10 +78,15 @@ libstdc___la_LIBADD = \
../libmath/libmath.la @libio_la@ \
../libsupc++/libsupc++convenience.la
libstdc___la_LDFLAGS = -version-info @libtool_VERSION@ -lm
if GLIBCPP_BUILD_VERSIONED_SHLIB
version_arg=-Wl,--version-script=linker.map
else
version_arg=
endif
libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
libstdc___la_LDFLAGS = -version-info @libtool_VERSION@ -lm ${version_arg}
libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD) linker.map
# Use special rules for the deprecated source files so that they find
# deprecated include files.
......
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999 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.
......@@ -66,7 +66,6 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
......@@ -88,16 +87,16 @@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@
LIBMATHOBJS = @LIBMATHOBJS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
......@@ -138,6 +137,7 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@
release_VERSION = @release_VERSION@
......@@ -203,10 +203,12 @@ libstdc___la_LIBADD = \
../libmath/libmath.la @libio_la@ \
../libsupc++/libsupc++convenience.la
@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@version_arg = @GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@-Wl,--version-script=linker.map
@GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE@version_arg =
libstdc___la_LDFLAGS = -version-info @libtool_VERSION@ -lm
libstdc___la_LDFLAGS = -version-info @libtool_VERSION@ -lm ${version_arg}
libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD) linker.map
# Use special rules for the deprecated source files so that they find
# deprecated include files.
......@@ -281,6 +283,14 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
DEP_FILES = .deps/basic_file.P .deps/bitset.P .deps/c++locale.P \
.deps/cmath.P .deps/codecvt.P .deps/collate.P .deps/complex_io.P \
.deps/concept-inst.P .deps/ctype.P .deps/ext-inst.P .deps/functexcept.P \
.deps/globals.P .deps/ios.P .deps/limits.P .deps/locale-inst.P \
.deps/locale.P .deps/localename.P .deps/messages.P .deps/misc-inst.P \
.deps/moneypunct.P .deps/numpunct.P .deps/stdexcept.P .deps/stl-inst.P \
.deps/string-inst.P .deps/strstream.P .deps/time.P \
.deps/valarray-inst.P .deps/vterminate.P .deps/wstring-inst.P
SOURCES = $(libstdc___la_SOURCES)
OBJECTS = $(libstdc___la_OBJECTS)
......@@ -288,9 +298,9 @@ all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .cc .lo .o .obj .s
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus src/Makefile
cd $(top_srcdir) && $(AUTOMAKE) --gnits src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
......@@ -320,9 +330,6 @@ uninstall-toolexeclibLTLIBRARIES:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
done
.c.o:
$(COMPILE) -c $<
# FIXME: We should only use cygpath when building on Windows,
# and only if it is available.
.c.obj:
......@@ -345,9 +352,6 @@ distclean-compile:
maintainer-clean-compile:
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
......@@ -407,8 +411,13 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits src/Makefile
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
......@@ -417,16 +426,65 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
%.o: %.cc
@echo '$(CXXCOMPILE) -c $<'; \
$(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.cc
@echo '$(LTCXXCOMPILE) -c $<'; \
$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am:
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-info-am:
install-info: install-info-am
install-exec-am: install-toolexeclibLTLIBRARIES
install-exec: install-exec-am
......@@ -456,27 +514,27 @@ distclean-generic:
maintainer-clean-generic:
mostlyclean-am: mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-toolexeclibLTLIBRARIES clean-compile clean-libtool \
clean-tags clean-generic mostlyclean-am
clean-tags clean-depend clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-toolexeclibLTLIBRARIES distclean-compile \
distclean-libtool distclean-tags distclean-generic \
clean-am
distclean-libtool distclean-tags distclean-depend \
distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-toolexeclibLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
maintainer-clean-tags maintainer-clean-depend \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
......@@ -489,12 +547,14 @@ uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-info-am \
install-info install-exec-am install-exec install-data-am install-data \
install-am install uninstall-am uninstall all-redirect all-am all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
strstream.lo: strstream.cc
$(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment