Commit c470c17d by Benjamin Kosnik Committed by Benjamin Kosnik

Makefile.am (string_sources): Simplify...


2000-06-14  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

      	* src/Makefile.am (string_sources): Simplify, assuming that with
	-ffunction-sections, -fdata-sections, -Wl,--gc-sections, all this
	hacking is not necessary.
        (wstring_sources): Same.
        (OPTIMIZE_CXXFLAGS): Enable -fdata-sections -ffunction-sections
	-Wl,--gc-sections.
	* src/string-inst.cc: Remove macro blocks.
	* mkcheck.in (CXX_FLAG): Add bits here.

	* src/string-inst.cc: Remove iostream-related string instantiations.
	* src/misc-inst.cc: Add here.

	* acinclude.m4 (GLIBCPP_CHECK_COMPILER_VERSION): Change FMTFLAGS
	to WFMT_FLAGS.
	* aclocal.m4: Regenerate.
	* configure.in: Change up.
	* configure: Regenerate.

From-SVN: r34593
parent 0a377997
2000-06-14 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* src/Makefile.am (string_sources): Simplify, assuming that with
-ffunction-sections, -fdata-sections, -Wl,--gc-sections, all this
hacking is not necessary.
(wstring_sources): Same.
(OPTIMIZE_CXXFLAGS): Enable -fdata-sections -ffunction-sections
-Wl,--gc-sections.
* src/string-inst.cc: Remove macro blocks.
* mkcheck.in (CXX_FLAG): Add bits here.
* src/string-inst.cc: Remove iostream-related string instantiations.
* src/misc-inst.cc: Add here.
* acinclude.m4 (GLIBCPP_CHECK_COMPILER_VERSION): Change FMTFLAGS
to WFMT_FLAGS.
* aclocal.m4: Regenerate.
* configure.in: Change up.
* configure: Regenerate.
2000-06-13 Steven King <sxking@uswest.net> 2000-06-13 Steven King <sxking@uswest.net>
* acinclude.m4: Fixup some of the builtin math tests and add tests for * acinclude.m4: Fixup some of the builtin math tests and add tests for
......
...@@ -68,18 +68,17 @@ AS = @AS@ ...@@ -68,18 +68,17 @@ AS = @AS@
BUILD_LIBIO_INCLUDE = @BUILD_LIBIO_INCLUDE@ BUILD_LIBIO_INCLUDE = @BUILD_LIBIO_INCLUDE@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
CPUFLAGS = @CPUFLAGS@ CPU_FLAGS = @CPU_FLAGS@
CSHADOWFLAGS = @CSHADOWFLAGS@ CSHADOWFLAGS = @CSHADOWFLAGS@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
CSTDIO_CC = @CSTDIO_CC@ CSTDIO_CC = @CSTDIO_CC@
CSTDIO_H = @CSTDIO_H@ CSTDIO_H = @CSTDIO_H@
CXX = @CXX@ CXX = @CXX@
CXXCPP = @CXXCPP@ CXXCPP = @CXXCPP@
DEBUGFLAGS = @DEBUGFLAGS@ DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@ DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FMTFLAGS = @FMTFLAGS@
GCC_OBJDIR = @GCC_OBJDIR@ GCC_OBJDIR = @GCC_OBJDIR@
GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@ GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@
GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@ GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@
...@@ -92,6 +91,8 @@ MAKEINFO = @MAKEINFO@ ...@@ -92,6 +91,8 @@ MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
THREADDEPS = @THREADDEPS@ THREADDEPS = @THREADDEPS@
THREADINCS = @THREADINCS@ THREADINCS = @THREADINCS@
THREADLIBS = @THREADLIBS@ THREADLIBS = @THREADLIBS@
...@@ -100,6 +101,7 @@ THREADSPEC = @THREADSPEC@ ...@@ -100,6 +101,7 @@ THREADSPEC = @THREADSPEC@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@ USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
VERSION = @VERSION@ VERSION = @VERSION@
WERROR = @WERROR@ WERROR = @WERROR@
WFMT_FLAGS = @WFMT_FLAGS@
cpu_include_dir = @cpu_include_dir@ cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@ ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
......
...@@ -155,19 +155,36 @@ AC_SUBST(GLIBCPP_CXXFLAGS) ...@@ -155,19 +155,36 @@ AC_SUBST(GLIBCPP_CXXFLAGS)
dnl dnl
dnl Check to see if g++ can compile this library, and if so, if any version- dnl Check to see if g++ can compile this library, and if so, if any version-
dnl specific precautions need to be taken. In particular, test for dnl specific precautions need to be taken.
dnl newer compiler features, or features that are present in newer dnl
dnl GLIBCPP_CHECK_COMPILER_VERSION
AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
# Sanity check that g++ is capable of dealing with v-3.
AC_MSG_CHECKING([for g++ that will successfully compile this code])
AC_EGREP_CPP([ok], [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
ok
#endif
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory)
])
dnl
dnl Test for newer compiler features, or features that are present in newer
dnl compiler version but not older compiler versions should be placed dnl compiler version but not older compiler versions should be placed
dnl here. dnl here.
dnl dnl
dnl Define FMTFLAGS='-fdiagnostics-show-location=once' if possible dnl Define WFMT_FLAGS='-fdiagnostics-show-location=once' if possible
dnl
dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining
dnl code or the new system_header pragma will die. Other options dealing dnl code or the new system_header pragma will die.
dnl with warnings, errors, and compiler complaints may be folded into
dnl the WERROR variable.
dnl dnl
dnl GLIBCPP_CHECK_COMPILER_VERSION dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ dnl compiler supports it.
dnl GLIBCPP_CHECK_COMPILER_FEATURES
AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# All these tests are for C++; save the language and the compiler flags. # All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits # The CXXFLAGS thing is suspicious, but based on similar bits
# found in GLIBCPP_CONFIGURE. # found in GLIBCPP_CONFIGURE.
...@@ -177,15 +194,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -177,15 +194,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
WERROR='-Werror' WERROR='-Werror'
# Sanity check that g++ is capable of dealing with v-3.
AC_MSG_CHECKING([for g++ that will successfully compile this code])
AC_EGREP_CPP([ok], [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
ok
#endif
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory)
# Check for pragma system_header. # Check for pragma system_header.
AC_MSG_CHECKING([for g++ that supports pragma system_header]) AC_MSG_CHECKING([for g++ that supports pragma system_header])
CXXFLAGS='-Wunknown-pragmas -Werror' CXXFLAGS='-Wunknown-pragmas -Werror'
...@@ -214,15 +222,66 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -214,15 +222,66 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
CXXFLAGS='' CXXFLAGS=''
fi fi
if test "$ac_gabydiags" = "yes"; then if test "$ac_gabydiags" = "yes"; then
FMTFLAGS='-fdiagnostics-show-location=once' WFMT_FLAGS='-fdiagnostics-show-location=once'
fi fi
AC_MSG_RESULT($ac_gabydiags) AC_MSG_RESULT($ac_gabydiags)
# Check for -ffunction-sections -fdata-sections
AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
CXXFLAGS='-ffunction-sections -fdata-sections'
AC_TRY_COMPILE(, [int foo;
], [ac_fdsections=yes], [ac_fdsections=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
fi
if test "$ac_fdsections" = "yes"; then
SECTION_FLAGS='-ffunction-sections -fdata-sections'
fi
AC_MSG_RESULT($ac_fdsections)
AC_LANG_RESTORE AC_LANG_RESTORE
AC_SUBST(WERROR) AC_SUBST(WERROR)
AC_SUBST(FMTFLAGS) AC_SUBST(WFMT_FLAGS)
AC_SUBST(SECTION_FLAGS)
]) ])
dnl
dnl Check to see if tricky linker opts can be used.
dnl
dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible
dnl GLIBCPP_CHECK_LINKER_FEATURES
AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
# All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits
# found in GLIBCPP_CONFIGURE.
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# Check for -Wl,--gc-sections
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
CXXFLAGS='-Wl,--gc-sections'
AC_TRY_COMPILE(, [int foo;
], [ac_sectionLDflags=yes], [ac_sectionLFflags=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
fi
if test "$ac_sectionLDflags" = "yes"; then
SECTION_LDFLAGS='-Wl,--gc-sections'
fi
AC_MSG_RESULT($ac_sectionLDflags)
AC_LANG_RESTORE
AC_SUBST(SECTION_LDFLAGS)
])
dnl dnl
dnl Check to see what builtin math functions are supported dnl Check to see what builtin math functions are supported
dnl dnl
...@@ -841,7 +900,7 @@ dnl ...@@ -841,7 +900,7 @@ dnl
dnl GLIBCPP_CHECK_CPU dnl GLIBCPP_CHECK_CPU
AC_DEFUN(GLIBCPP_CHECK_CPU, [ AC_DEFUN(GLIBCPP_CHECK_CPU, [
AC_MSG_CHECKING([for cpu primitives directory]) AC_MSG_CHECKING([for cpu primitives directory])
CPUFLAGS= CPU_FLAGS=
case "$target_cpu" in case "$target_cpu" in
alpha*) alpha*)
cpu_include_dir="config/cpu/alpha" cpu_include_dir="config/cpu/alpha"
...@@ -857,7 +916,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [ ...@@ -857,7 +916,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [
;; ;;
powerpc | rs6000) powerpc | rs6000)
cpu_include_dir="config/cpu/powerpc" cpu_include_dir="config/cpu/powerpc"
CPUFLAGS='-mcpu=powerpc' CPU_FLAGS='-mcpu=powerpc'
;; ;;
sparc64 | ultrasparc) sparc64 | ultrasparc)
cpu_include_dir="config/cpu/sparc/sparc64" cpu_include_dir="config/cpu/sparc/sparc64"
...@@ -871,7 +930,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [ ...@@ -871,7 +930,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [
esac esac
AC_MSG_RESULT($cpu_include_dir) AC_MSG_RESULT($cpu_include_dir)
AC_SUBST(cpu_include_dir) AC_SUBST(cpu_include_dir)
AC_SUBST(CPUFLAGS) AC_SUBST(CPU_FLAGS)
]) ])
...@@ -1270,13 +1329,13 @@ enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl ...@@ -1270,13 +1329,13 @@ enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
dnl Option parsed, now set things appropriately dnl Option parsed, now set things appropriately
case "$enable_debug" in case "$enable_debug" in
yes) yes)
DEBUGFLAGS='-O0 -ggdb' DEBUG_FLAGS='-O0 -ggdb'
;; ;;
no) no)
DEBUGFLAGS='-g' DEBUG_FLAGS='-g'
;; ;;
esac esac
AC_SUBST(DEBUGFLAGS) AC_SUBST(DEBUG_FLAGS)
]) ])
......
...@@ -167,19 +167,36 @@ AC_SUBST(GLIBCPP_CXXFLAGS) ...@@ -167,19 +167,36 @@ AC_SUBST(GLIBCPP_CXXFLAGS)
dnl dnl
dnl Check to see if g++ can compile this library, and if so, if any version- dnl Check to see if g++ can compile this library, and if so, if any version-
dnl specific precautions need to be taken. In particular, test for dnl specific precautions need to be taken.
dnl newer compiler features, or features that are present in newer dnl
dnl GLIBCPP_CHECK_COMPILER_VERSION
AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
# Sanity check that g++ is capable of dealing with v-3.
AC_MSG_CHECKING([for g++ that will successfully compile this code])
AC_EGREP_CPP([ok], [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
ok
#endif
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory)
])
dnl
dnl Test for newer compiler features, or features that are present in newer
dnl compiler version but not older compiler versions should be placed dnl compiler version but not older compiler versions should be placed
dnl here. dnl here.
dnl dnl
dnl Define FMTFLAGS='-fdiagnostics-show-location=once' if possible dnl Define WFMT_FLAGS='-fdiagnostics-show-location=once' if possible
dnl
dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining
dnl code or the new system_header pragma will die. Other options dealing dnl code or the new system_header pragma will die.
dnl with warnings, errors, and compiler complaints may be folded into
dnl the WERROR variable.
dnl dnl
dnl GLIBCPP_CHECK_COMPILER_VERSION dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ dnl compiler supports it.
dnl GLIBCPP_CHECK_COMPILER_FEATURES
AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# All these tests are for C++; save the language and the compiler flags. # All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits # The CXXFLAGS thing is suspicious, but based on similar bits
# found in GLIBCPP_CONFIGURE. # found in GLIBCPP_CONFIGURE.
...@@ -189,15 +206,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -189,15 +206,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
WERROR='-Werror' WERROR='-Werror'
# Sanity check that g++ is capable of dealing with v-3.
AC_MSG_CHECKING([for g++ that will successfully compile this code])
AC_EGREP_CPP([ok], [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
ok
#endif
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory)
# Check for pragma system_header. # Check for pragma system_header.
AC_MSG_CHECKING([for g++ that supports pragma system_header]) AC_MSG_CHECKING([for g++ that supports pragma system_header])
CXXFLAGS='-Wunknown-pragmas -Werror' CXXFLAGS='-Wunknown-pragmas -Werror'
...@@ -226,15 +234,66 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -226,15 +234,66 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
CXXFLAGS='' CXXFLAGS=''
fi fi
if test "$ac_gabydiags" = "yes"; then if test "$ac_gabydiags" = "yes"; then
FMTFLAGS='-fdiagnostics-show-location=once' WFMT_FLAGS='-fdiagnostics-show-location=once'
fi fi
AC_MSG_RESULT($ac_gabydiags) AC_MSG_RESULT($ac_gabydiags)
# Check for -ffunction-sections -fdata-sections
AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
CXXFLAGS='-ffunction-sections -fdata-sections'
AC_TRY_COMPILE(, [int foo;
], [ac_fdsections=yes], [ac_fdsections=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
fi
if test "$ac_fdsections" = "yes"; then
SECTION_FLAGS='-ffunction-sections -fdata-sections'
fi
AC_MSG_RESULT($ac_fdsections)
AC_LANG_RESTORE AC_LANG_RESTORE
AC_SUBST(WERROR) AC_SUBST(WERROR)
AC_SUBST(FMTFLAGS) AC_SUBST(WFMT_FLAGS)
AC_SUBST(SECTION_FLAGS)
]) ])
dnl
dnl Check to see if tricky linker opts can be used.
dnl
dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible
dnl GLIBCPP_CHECK_LINKER_FEATURES
AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
# All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits
# found in GLIBCPP_CONFIGURE.
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# Check for -Wl,--gc-sections
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
CXXFLAGS='-Wl,--gc-sections'
AC_TRY_COMPILE(, [int foo;
], [ac_sectionLDflags=yes], [ac_sectionLFflags=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
fi
if test "$ac_sectionLDflags" = "yes"; then
SECTION_LDFLAGS='-Wl,--gc-sections'
fi
AC_MSG_RESULT($ac_sectionLDflags)
AC_LANG_RESTORE
AC_SUBST(SECTION_LDFLAGS)
])
dnl dnl
dnl Check to see what builtin math functions are supported dnl Check to see what builtin math functions are supported
dnl dnl
...@@ -853,7 +912,7 @@ dnl ...@@ -853,7 +912,7 @@ dnl
dnl GLIBCPP_CHECK_CPU dnl GLIBCPP_CHECK_CPU
AC_DEFUN(GLIBCPP_CHECK_CPU, [ AC_DEFUN(GLIBCPP_CHECK_CPU, [
AC_MSG_CHECKING([for cpu primitives directory]) AC_MSG_CHECKING([for cpu primitives directory])
CPUFLAGS= CPU_FLAGS=
case "$target_cpu" in case "$target_cpu" in
alpha*) alpha*)
cpu_include_dir="config/cpu/alpha" cpu_include_dir="config/cpu/alpha"
...@@ -869,7 +928,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [ ...@@ -869,7 +928,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [
;; ;;
powerpc | rs6000) powerpc | rs6000)
cpu_include_dir="config/cpu/powerpc" cpu_include_dir="config/cpu/powerpc"
CPUFLAGS='-mcpu=powerpc' CPU_FLAGS='-mcpu=powerpc'
;; ;;
sparc64 | ultrasparc) sparc64 | ultrasparc)
cpu_include_dir="config/cpu/sparc/sparc64" cpu_include_dir="config/cpu/sparc/sparc64"
...@@ -883,7 +942,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [ ...@@ -883,7 +942,7 @@ AC_DEFUN(GLIBCPP_CHECK_CPU, [
esac esac
AC_MSG_RESULT($cpu_include_dir) AC_MSG_RESULT($cpu_include_dir)
AC_SUBST(cpu_include_dir) AC_SUBST(cpu_include_dir)
AC_SUBST(CPUFLAGS) AC_SUBST(CPU_FLAGS)
]) ])
...@@ -1282,13 +1341,13 @@ enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl ...@@ -1282,13 +1341,13 @@ enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
dnl Option parsed, now set things appropriately dnl Option parsed, now set things appropriately
case "$enable_debug" in case "$enable_debug" in
yes) yes)
DEBUGFLAGS='-O0 -ggdb' DEBUG_FLAGS='-O0 -ggdb'
;; ;;
no) no)
DEBUGFLAGS='-g' DEBUG_FLAGS='-g'
;; ;;
esac esac
AC_SUBST(DEBUGFLAGS) AC_SUBST(DEBUG_FLAGS)
]) ])
......
...@@ -106,6 +106,8 @@ else ...@@ -106,6 +106,8 @@ else
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h]) machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h])
GLIBCPP_CHECK_COMPILER_FEATURES
GLIBCPP_CHECK_LINKER_FEATURES
GLIBCPP_CHECK_COMPLEX_SUPPORT GLIBCPP_CHECK_COMPLEX_SUPPORT
GLIBCPP_CHECK_COMPLEX_FLOAT_SUPPORT GLIBCPP_CHECK_COMPLEX_FLOAT_SUPPORT
GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
......
...@@ -68,18 +68,17 @@ AS = @AS@ ...@@ -68,18 +68,17 @@ AS = @AS@
BUILD_LIBIO_INCLUDE = @BUILD_LIBIO_INCLUDE@ BUILD_LIBIO_INCLUDE = @BUILD_LIBIO_INCLUDE@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
CPUFLAGS = @CPUFLAGS@ CPU_FLAGS = @CPU_FLAGS@
CSHADOWFLAGS = @CSHADOWFLAGS@ CSHADOWFLAGS = @CSHADOWFLAGS@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
CSTDIO_CC = @CSTDIO_CC@ CSTDIO_CC = @CSTDIO_CC@
CSTDIO_H = @CSTDIO_H@ CSTDIO_H = @CSTDIO_H@
CXX = @CXX@ CXX = @CXX@
CXXCPP = @CXXCPP@ CXXCPP = @CXXCPP@
DEBUGFLAGS = @DEBUGFLAGS@ DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@ DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FMTFLAGS = @FMTFLAGS@
GCC_OBJDIR = @GCC_OBJDIR@ GCC_OBJDIR = @GCC_OBJDIR@
GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@ GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@
GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@ GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@
...@@ -92,6 +91,8 @@ MAKEINFO = @MAKEINFO@ ...@@ -92,6 +91,8 @@ MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
THREADDEPS = @THREADDEPS@ THREADDEPS = @THREADDEPS@
THREADINCS = @THREADINCS@ THREADINCS = @THREADINCS@
THREADLIBS = @THREADLIBS@ THREADLIBS = @THREADLIBS@
...@@ -100,6 +101,7 @@ THREADSPEC = @THREADSPEC@ ...@@ -100,6 +101,7 @@ THREADSPEC = @THREADSPEC@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@ USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
VERSION = @VERSION@ VERSION = @VERSION@
WERROR = @WERROR@ WERROR = @WERROR@
WFMT_FLAGS = @WFMT_FLAGS@
cpu_include_dir = @cpu_include_dir@ cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@ ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
......
...@@ -68,18 +68,17 @@ AS = @AS@ ...@@ -68,18 +68,17 @@ AS = @AS@
BUILD_LIBIO_INCLUDE = @BUILD_LIBIO_INCLUDE@ BUILD_LIBIO_INCLUDE = @BUILD_LIBIO_INCLUDE@
CC = @CC@ CC = @CC@
CPP = @CPP@ CPP = @CPP@
CPUFLAGS = @CPUFLAGS@ CPU_FLAGS = @CPU_FLAGS@
CSHADOWFLAGS = @CSHADOWFLAGS@ CSHADOWFLAGS = @CSHADOWFLAGS@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
CSTDIO_CC = @CSTDIO_CC@ CSTDIO_CC = @CSTDIO_CC@
CSTDIO_H = @CSTDIO_H@ CSTDIO_H = @CSTDIO_H@
CXX = @CXX@ CXX = @CXX@
CXXCPP = @CXXCPP@ CXXCPP = @CXXCPP@
DEBUGFLAGS = @DEBUGFLAGS@ DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@ DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FMTFLAGS = @FMTFLAGS@
GCC_OBJDIR = @GCC_OBJDIR@ GCC_OBJDIR = @GCC_OBJDIR@
GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@ GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@
GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@ GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@
...@@ -92,6 +91,8 @@ MAKEINFO = @MAKEINFO@ ...@@ -92,6 +91,8 @@ MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
THREADDEPS = @THREADDEPS@ THREADDEPS = @THREADDEPS@
THREADINCS = @THREADINCS@ THREADINCS = @THREADINCS@
THREADLIBS = @THREADLIBS@ THREADLIBS = @THREADLIBS@
...@@ -100,6 +101,7 @@ THREADSPEC = @THREADSPEC@ ...@@ -100,6 +101,7 @@ THREADSPEC = @THREADSPEC@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@ USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
VERSION = @VERSION@ VERSION = @VERSION@
WERROR = @WERROR@ WERROR = @WERROR@
WFMT_FLAGS = @WFMT_FLAGS@
cpu_include_dir = @cpu_include_dir@ cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@ ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
......
...@@ -69,7 +69,7 @@ fi ...@@ -69,7 +69,7 @@ fi
# gcc compiler flags # gcc compiler flags
#CXX_FLAG="-fsquangle -fhonor-std -fnew-exceptions -g -O2 -DDEBUG_ASSERT " #CXX_FLAG="-fsquangle -fhonor-std -fnew-exceptions -g -O2 -DDEBUG_ASSERT "
#CXX_FLAG="-g -O2 -DDEBUG_ASSERT " #CXX_FLAG="-g -O2 -DDEBUG_ASSERT "
CXX_FLAG="-g -DDEBUG_ASSERT " CXX_FLAG="-g -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
# a specific flag(s) to force the use of shared libraries, if any # a specific flag(s) to force the use of shared libraries, if any
SH_FLAG="" SH_FLAG=""
......
...@@ -38,25 +38,23 @@ EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la ...@@ -38,25 +38,23 @@ EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
# Using these options is probably a good idea for thrill-seekers. Just # Using these options is probably a good idea for thrill-seekers. Just
# uncomment the lines below and make, everything else is ready to go... # uncomment the lines below and make, everything else is ready to go...
# OPTIMIZE_CXXFLAGS = \ # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
# -O3 -fstrict-aliasing \
# -fdata-sections -ffunction-sections -fvtable-gc -Wl,--gc-sections
# These bits are all figured out from configure. Look in acinclude.m4 # These bits are all figured out from configure. Look in acinclude.m4
# or configure.in to see how they are set. # or configure.in to see how they are set.
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
AC_CXXFLAGS = \ AC_CXXFLAGS = \
@WERROR@ @FMTFLAGS@ @CSHADOWFLAGS@ @CPUFLAGS@ \ @WERROR@ @WFMT_FLAGS@ @CPU_FLAGS@ @EXTRA_CXX_FLAGS@ \
@EXTRA_CXX_FLAGS@ @DEBUGFLAGS@ @SECTION_FLAGS@ @SECTION_LDFLAGS@ @DEBUG_FLAGS@
# Need to manually set this option because AC_CXXFLAGS has to be at # Need to manually set this option because AC_CXXFLAGS has to be at
# the end of the compile line so that -O2 can be over-riden as the # the end of the compile line so that -O2 can be overridden as the
# occasion call for it. (ie, --enable-debug) # occasion call for it. (ie, --enable-debug)
AM_CXXFLAGS = \ AM_CXXFLAGS = \
$(FORMAT_CXXFLAGS) \ -fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \
-fno-implicit-templates \
-Wall -Wno-format -W -Wwrite-strings -Winline \ -Wall -Wno-format -W -Wwrite-strings -Winline \
$(OPTIMIZE_CXXFLAGS) $(AC_CXXFLAGS) $(AC_CXXFLAGS)
# Passed down for cross compilers, canadian crosses. # Passed down for cross compilers, canadian crosses.
...@@ -79,8 +77,8 @@ INCLUDES = \ ...@@ -79,8 +77,8 @@ INCLUDES = \
# Need to explicitly set this so that AM_CXXFLAGS is last. (That way, # Need to explicitly set this so that AM_CXXFLAGS is last. (That way,
# things like -O2 passed down from the toplevel can be overridden by # things like -O2 passed down from the toplevel can be overridden by
# --enable-debug.) # --enable-debug.)
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) \ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) \ LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
...@@ -195,63 +193,25 @@ sources = \ ...@@ -195,63 +193,25 @@ sources = \
complex.cc complexf.cc complexl.cc complex_io.cc \ complex.cc complexf.cc complexl.cc complex_io.cc \
stdexcept.cc ios.cc stdstreams.cc strstream.cc \ stdexcept.cc ios.cc stdstreams.cc strstream.cc \
locale.cc localename.cc \ locale.cc localename.cc \
locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc string-inst.cc
string_sources = \
stringMAIN.cc stringCTORNC.cc stringCTORAL.cc \
stringCTORCPR.cc stringCTORCPRAL.cc stringCTORPRAL.cc \
stringCTORPAL.cc stringCTORPP.cc stringCTORII.cc \
stringMUTATE.cc stringRESERVE.cc \
stringSWAP.cc stringSLOP.cc \
stringRESIZE.cc stringAPPCOPY.cc stringAPPCPR.cc stringAPPPR.cc \
stringAPPDUP.cc stringAPPII.cc stringASSCP.cc stringASSII.cc \
stringINSII.cc stringREPRR.cc stringREPIIDUP.cc stringREPII.cc \
stringREPIII.cc stringREP4I.cc stringREPIIPP.cc stringREPIIPP2.cc \
stringCOPY.cc stringCONII.cc stringCONIIF.cc stringCONPPF.cc \
stringCONPPF2.cc stringCONSC.cc \
stringFIND.cc stringFINDC.cc stringRFIND.cc \
stringRFINDC.cc stringFFO.cc stringFLO.cc stringFFNO.cc \
stringFLNO.cc stringFLNOC.cc stringCOMPARE.cc stringCOMPARE2.cc \
stringCOMPAREP.cc stringCOMPAREP2.cc stringADDPS.cc stringADDCS.cc \
stringEXTRACT.cc stringINSERT.cc stringGETLINE.cc stringSCOPY.cc \
stringEQ.cc
wstring_sources = \ wstring_sources = \
wstringMAIN.cc wstringCTORNC.cc wstringCTORAL.cc \ wstring-inst.cc
wstringCTORCPR.cc wstringCTORCPRAL.cc wstringCTORPRAL.cc \
wstringCTORPAL.cc wstringCTORPP.cc \
wstringCTORII.cc \
wstringMUTATE.cc wstringRESERVE.cc \
wstringSWAP.cc wstringSLOP.cc \
wstringRESIZE.cc wstringAPPCOPY.cc wstringAPPCPR.cc wstringAPPPR.cc \
wstringAPPDUP.cc wstringAPPII.cc wstringASSCP.cc wstringASSII.cc \
wstringINSII.cc wstringREPRR.cc wstringREPIIDUP.cc wstringREPII.cc \
wstringREPIII.cc wstringREP4I.cc wstringREPIIPP.cc wstringREPIIPP2.cc \
wstringCOPY.cc wstringCONII.cc wstringCONIIF.cc wstringCONPPF.cc \
wstringCONPPF2.cc wstringCONSC.cc \
wstringFIND.cc wstringFINDC.cc wstringRFIND.cc \
wstringRFINDC.cc wstringFFO.cc wstringFLO.cc wstringFFNO.cc \
wstringFLNO.cc wstringFLNOC.cc wstringCOMPARE.cc wstringCOMPARE2.cc \
wstringCOMPAREP.cc wstringCOMPAREP2.cc wstringADDPS.cc \
wstringADDCS.cc wstringEXTRACT.cc wstringINSERT.cc wstringGETLINE.cc \
wstringSCOPY.cc wstringEQ.cc
VPATH += $(top_srcdir) $(top_srcdir)/std $(top_srcdir)/src VPATH += $(top_srcdir) $(top_srcdir)/std $(top_srcdir)/src
VPATH += $(top_srcdir)/@ctype_include_dir@ VPATH += $(top_srcdir)/@ctype_include_dir@
# Actual sources for the distro, but don't build these. # Actual sources for the distro, but don't build these.
EXTRA_sources = string-inst.cc #EXTRA_sources = string-inst.cc
libstdc___la_SOURCES = $(sources) libstdc___la_SOURCES = $(sources)
libinst_string_la_SOURCES = $(string_sources)
libinst_wstring_la_SOURCES = $(wstring_sources) libinst_wstring_la_SOURCES = $(wstring_sources)
libstdc___la_LIBADD = \ libstdc___la_LIBADD = \
../math/libmath.la ../libio/libio.la \ ../math/libmath.la ../libio/libio.la \
libinst-string.la @libinst_wstring_la@ @libinst_wstring_la@
libstdc___la_LDFLAGS = -version-info 3:0:0 -lm libstdc___la_LDFLAGS = -version-info 3:0:0 -lm
...@@ -333,235 +293,9 @@ locale-inst.o: locale-inst.cc ...@@ -333,235 +293,9 @@ locale-inst.o: locale-inst.cc
locale-inst.lo: locale-inst.cc locale-inst.lo: locale-inst.cc
$(LTCXXCOMPILE) -fimplicit-templates -c $< $(LTCXXCOMPILE) -fimplicit-templates -c $<
stringMAIN.lo \ # We have to instantiate wstring bits too. . .
stringCTORNC.lo \ wstring-inst.o: string-inst.cc
stringCTORAL.lo \ $(CXXCOMPILE) -fimplicit-templates -c -DC=wchar_t $< -o $@
stringCTORCPR.lo \ wstring-inst.lo: string-inst.cc
stringCTORCPRAL.lo \ $(LTCXXCOMPILE) -fimplicit-templates -c -DC=wchar_t $< -o $@
stringCTORPRAL.lo \
stringCTORPAL.lo \
stringCTORPP.lo \
stringCTORII.lo \
stringMUTATE.lo \
stringRESERVE.lo \
stringSWAP.lo \
stringSLOP.lo \
stringRESIZE.lo \
stringAPPCOPY.lo \
stringAPPCPR.lo \
stringAPPPR.lo \
stringAPPDUP.lo \
stringAPPII.lo \
stringASSCP.lo \
stringASSII.lo \
stringINSII.lo \
stringREPRR.lo \
stringREPIIDUP.lo \
stringREPII.lo \
stringREPIII.lo \
stringREP4I.lo \
stringREPIIPP.lo \
stringREPIIPP2.lo \
stringCOPY.lo \
stringCONII.lo \
stringCONIIF.lo \
stringCONPPF.lo \
stringCONPPF2.lo \
stringCONSC.lo \
stringFIND.lo \
stringFINDC.lo \
stringRFIND.lo \
stringRFINDC.lo \
stringFFO.lo \
stringFLO.lo \
stringFFNO.lo \
stringFLNO.lo \
stringFLNOC.lo \
stringCOMPARE.lo \
stringCOMPARE2.lo \
stringCOMPAREP.lo \
stringCOMPAREP2.lo \
stringADDPS.lo \
stringADDCS.lo \
stringEXTRACT.lo \
stringINSERT.lo \
stringGETLINE.lo \
stringSCOPY.lo \
stringEQ.lo : string-inst.cc
$(LTCXXCOMPILE) -fimplicit-templates \
-c -D`echo $@ | tr -dc '0-9A-Z'` $< -o $@
wstringMAIN.lo \
wstringCTORNC.lo \
wstringCTORAL.lo \
wstringCTORCPR.lo \
wstringCTORCPRAL.lo \
wstringCTORPRAL.lo \
wstringCTORPAL.lo \
wstringCTORPP.lo \
wstringCTORII.lo \
wstringMUTATE.lo \
wstringRESERVE.lo \
wstringSWAP.lo \
wstringSLOP.lo \
wstringRESIZE.lo \
wstringAPPCOPY.lo \
wstringAPPCPR.lo \
wstringAPPPR.lo \
wstringAPPDUP.lo \
wstringAPPII.lo \
wstringASSCP.lo \
wstringASSII.lo \
wstringINSII.lo \
wstringREPRR.lo \
wstringREPIIDUP.lo \
wstringREPII.lo \
wstringREPIII.lo \
wstringREP4I.lo \
wstringREPIIPP.lo \
wstringREPIIPP2.lo \
wstringCOPY.lo \
wstringCONII.lo \
wstringCONIIF.lo \
wstringCONPPF.lo \
wstringCONPPF2.lo \
wstringCONSC.lo \
wstringFIND.lo \
wstringFINDC.lo \
wstringRFIND.lo \
wstringRFINDC.lo \
wstringFFO.lo \
wstringFLO.lo \
wstringFFNO.lo \
wstringFLNO.lo \
wstringFLNOC.lo \
wstringCOMPARE.lo \
wstringCOMPARE2.lo \
wstringCOMPAREP.lo \
wstringCOMPAREP2.lo \
wstringADDPS.lo \
wstringADDCS.lo \
wstringEXTRACT.lo \
wstringINSERT.lo \
wstringGETLINE.lo \
wstringSCOPY.lo \
wstringEQ.lo : string-inst.cc
$(LTCXXCOMPILE) -fimplicit-templates \
-c -D`echo $@ | tr -dc '0-9A-Z'` -DC=wchar_t $< -o $@
stringMAIN.o \
stringCTORNC.o \
stringCTORAL.o \
stringCTORCPR.o \
stringCTORCPRAL.o \
stringCTORPRAL.o \
stringCTORPAL.o \
stringCTORPP.o \
stringCTORII.o \
stringMUTATE.o \
stringRESERVE.o \
stringSWAP.o \
stringSLOP.o \
stringRESIZE.o \
stringAPPCOPY.o \
stringAPPCPR.o \
stringAPPPR.o \
stringAPPDUP.o \
stringAPPII.o \
stringASSCP.o \
stringASSII.o \
stringINSII.o \
stringREPRR.o \
stringREPIIDUP.o \
stringREPII.o \
stringREPIII.o \
stringREP4I.o \
stringREPIIPP.o \
stringREPIIPP2.o \
stringCOPY.o \
stringCONII.o \
stringCONIIF.o \
stringCONPPF.o \
stringCONPPF2.o \
stringCONSC.o \
stringFIND.o \
stringFINDC.o \
stringRFIND.o \
stringRFINDC.o \
stringFFO.o \
stringFLO.o \
stringFFNO.o \
stringFLNO.o \
stringFLNOC.o \
stringCOMPARE.o \
stringCOMPARE2.o \
stringCOMPAREP.o \
stringCOMPAREP2.o \
stringADDPS.o \
stringADDCS.o \
stringEXTRACT.o \
stringINSERT.o \
stringGETLINE.o \
stringSCOPY.o \
stringEQ.o : string-inst.cc
$(CXXCOMPILE) -fimplicit-templates \
-c -D`echo $@ | tr -dc '0-9A-Z'` $< -o $@
wstringMAIN.o \
wstringCTORNC.o \
wstringCTORAL.o \
wstringCTORCPR.o \
wstringCTORCPRAL.o \
wstringCTORPRAL.o \
wstringCTORPAL.o \
wstringCTORPP.o \
wstringCTORII.o \
wstringMUTATE.o \
wstringRESERVE.o \
wstringSWAP.o \
wstringSLOP.o \
wstringRESIZE.o \
wstringAPPCOPY.o \
wstringAPPCPR.o \
wstringAPPPR.o \
wstringAPPDUP.o \
wstringAPPII.o \
wstringASSCP.o \
wstringASSII.o \
wstringINSII.o \
wstringREPRR.o \
wstringREPIIDUP.o \
wstringREPII.o \
wstringREPIII.o \
wstringREP4I.o \
wstringREPIIPP.o \
wstringREPIIPP2.o \
wstringCOPY.o \
wstringCONII.o \
wstringCONIIF.o \
wstringCONPPF.o \
wstringCONPPF2.o \
wstringCONSC.o \
wstringFIND.o \
wstringFINDC.o \
wstringRFIND.o \
wstringRFINDC.o \
wstringFFO.o \
wstringFLO.o \
wstringFFNO.o \
wstringFLNO.o \
wstringFLNOC.o \
wstringCOMPARE.o \
wstringCOMPARE2.o \
wstringCOMPAREP.o \
wstringCOMPAREP2.o \
wstringADDPS.o \
wstringADDCS.o \
wstringEXTRACT.o \
wstringINSERT.o \
wstringGETLINE.o \
wstringSCOPY.o \
wstringEQ.o : string-inst.cc
$(CXXCOMPILE) -fimplicit-templates \
-c -D`echo $@ | tr -dc '0-9A-Z'` -DC=wchar_t $< -o $@
// Explicit instantiation file. // Explicit instantiation file.
// Copyright (C) 1997-1999 Free Software Foundation, Inc. // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -187,6 +187,36 @@ namespace std { ...@@ -187,6 +187,36 @@ namespace std {
// //
// string related to iostreams
//
template
basic_istream<char>&
operator>>(basic_istream<char>&, string&);
template
basic_ostream<char>&
operator<<(basic_ostream<char>&, const string&);
template
basic_istream<char>&
getline(basic_istream<char>&, string&, char);
template
basic_istream<char>&
getline(basic_istream<char>&, string&);
#ifdef _GLIBCPP_USE_WCHAR_T
template
basic_istream<wchar_t>&
operator>>(basic_istream<wchar_t>&, wstring&);
template
basic_ostream<wchar_t>&
operator<<(basic_ostream<wchar_t>&, const wstring&);
template
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&, wchar_t);
template
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&);
#endif
//
// algorithm // algorithm
// //
typedef _Char_traits_match<char, char_traits<char> > char_match; typedef _Char_traits_match<char, char_traits<char> > char_match;
......
...@@ -36,14 +36,6 @@ ...@@ -36,14 +36,6 @@
#include <bits/std_string.h> #include <bits/std_string.h>
#include <bits/std_algorithm.h> #include <bits/std_algorithm.h>
#include <bits/std_istream.h>
#include <bits/std_ostream.h>
// NB: Unnecessary if the .h headers include these
#ifndef _GLIBCPP_FULLY_COMPLIANT_HEADERS
#include <bits/istream.tcc>
#include <bits/ostream.tcc>
#endif
// Instantiation configuration. // Instantiation configuration.
#ifndef C #ifndef C
...@@ -55,7 +47,6 @@ namespace std ...@@ -55,7 +47,6 @@ namespace std
{ {
typedef basic_string<C> S; typedef basic_string<C> S;
#ifdef MAIN
template C S::_Rep::_S_terminal; template C S::_Rep::_S_terminal;
template S::size_type S::_Rep::_S_max_size; template S::size_type S::_Rep::_S_max_size;
template S::size_type S::_S_empty_rep_storage[]; template S::size_type S::_S_empty_rep_storage[];
...@@ -64,159 +55,107 @@ namespace std ...@@ -64,159 +55,107 @@ namespace std
template S::_Rep* S::_Rep::_S_create(size_t, S::allocator_type const&); template S::_Rep* S::_Rep::_S_create(size_t, S::allocator_type const&);
template void S::_Rep::_M_destroy(S::allocator_type const&) throw(); template void S::_Rep::_M_destroy(S::allocator_type const&) throw();
template void __destroy_aux(S*, S*, __false_type); template void __destroy_aux(S*, S*, __false_type);
#endif
#ifdef CTORNC
template template
S::basic_string(S::size_type, C, S::allocator_type const&); S::basic_string(S::size_type, C, S::allocator_type const&);
#endif
#ifdef CTORAL
template template
S::basic_string(S::allocator_type const&); S::basic_string(S::allocator_type const&);
#endif
#ifdef CTORCPR
template template
S::basic_string(S const&, S::size_type, S::size_type); S::basic_string(S const&, S::size_type, S::size_type);
#endif
#ifdef CTORCPRAL
template template
S::basic_string( S::basic_string(
S const&, S::size_type, S::size_type, S::allocator_type const&); S const&, S::size_type, S::size_type, S::allocator_type const&);
#endif
#ifdef CTORPRAL
template template
S::basic_string( S::basic_string(
C const*, S::size_type, S::allocator_type const&); C const*, S::size_type, S::allocator_type const&);
#endif
#ifdef CTORPAL
template template
S::basic_string( S::basic_string(
C const*, S::allocator_type const&); C const*, S::allocator_type const&);
#endif
#ifdef CTORPP
template template
S::basic_string S::basic_string
(C*, C*, const allocator<C>&); (C*, C*, const allocator<C>&);
#endif
#ifdef CTORII
template template
S::basic_string S::basic_string
(S::iterator, S::iterator, const allocator<C>&); (S::iterator, S::iterator, const allocator<C>&);
#endif
#ifdef MUTATE
template template
void S::_M_leak_hard(); void S::_M_leak_hard();
template template
void S::_M_mutate(S::size_type, S::size_type, S::size_type); void S::_M_mutate(S::size_type, S::size_type, S::size_type);
template template
C* S::_Rep::_M_clone(S::allocator_type const&, S::size_type); C* S::_Rep::_M_clone(S::allocator_type const&, S::size_type);
#endif
#ifdef RESERVE
template template
void S::reserve(S::size_type); void S::reserve(S::size_type);
#endif
#ifdef SWAP
template template
void S::swap(S&); void S::swap(S&);
#endif
#ifdef SLOP
# ifdef _GLIBCPP_ALLOC_CONTROL # ifdef _GLIBCPP_ALLOC_CONTROL
template template
bool (* S::_Rep::_S_excess_slop)(size_t, size_t); bool (* S::_Rep::_S_excess_slop)(size_t, size_t);
template template
bool S::_Rep::_S_default_excess(size_t, size_t); bool S::_Rep::_S_default_excess(size_t, size_t);
# endif # endif
#endif
#ifdef RESIZE
template template
void S::resize(S::size_type, C); void S::resize(S::size_type, C);
#endif
#ifdef APPCOPY
template template
S& S::append(S const&); S& S::append(S const&);
#endif
#ifdef APPCPR
template template
S& S::append(S const&, S::size_type, S::size_type); S& S::append(S const&, S::size_type, S::size_type);
#endif
#ifdef APPPR
template template
S& S::append(C const*, S::size_type); S& S::append(C const*, S::size_type);
#endif
#ifdef APPDUP
template template
S& S::append(S::size_type, C); S& S::append(S::size_type, C);
#endif
#ifdef APPII
template template
S& S&
S::append<S::iterator> S::append<S::iterator>
(S::iterator, S::iterator); (S::iterator, S::iterator);
#endif
#ifdef ASSCP
template template
S& S&
S::assign(S const&); S::assign(S const&);
#endif
#ifdef ASSII
template template
S& S&
S::assign<S::iterator> S::assign<S::iterator>
(S::iterator, S::iterator); (S::iterator, S::iterator);
#endif
#ifdef INSII
template template
void void
S::insert<S::iterator> //c* S::insert<S::iterator> //c*
(S::iterator, S::iterator, S::iterator); //it, c+, c+ and temptype = char* (S::iterator, S::iterator, S::iterator); //it, c+, c+ and temptype = char*
#endif
#ifdef REPRR
template template
S& S::replace( S& S::replace(
S::size_type, S::size_type, S const&, S::size_type, S::size_type); S::size_type, S::size_type, S const&, S::size_type, S::size_type);
#endif
#ifdef REPIIDUP
template template
S& S::replace(S::iterator, S::iterator, S::size_type, C); S& S::replace(S::iterator, S::iterator, S::size_type, C);
#endif
#ifdef REPII
template template
S& S&
S::replace<S::iterator> // c* S::replace<S::iterator> // c*
(S::iterator, S::iterator, S::iterator, S::iterator); //it, it, c+, c+ (S::iterator, S::iterator, S::iterator, S::iterator); //it, it, c+, c+
#endif
#ifdef REPIII
template template
S& S&
S::_M_replace<S::iterator> S::_M_replace<S::iterator>
(S::iterator, S::iterator, S::iterator, S::iterator, forward_iterator_tag); (S::iterator, S::iterator, S::iterator, S::iterator, forward_iterator_tag);
#endif
#ifdef REP4I
// Only one template keyword allowed here. // Only one template keyword allowed here.
// See core issue #46 (NAD) // See core issue #46 (NAD)
// http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46 // http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46
...@@ -225,62 +164,44 @@ namespace std ...@@ -225,62 +164,44 @@ namespace std
S::_M_replace<S::const_iterator> S::_M_replace<S::const_iterator>
(S::iterator, S::iterator, (S::iterator, S::iterator,
S::const_iterator, S::const_iterator, forward_iterator_tag); S::const_iterator, S::const_iterator, forward_iterator_tag);
#endif
#ifdef REPIIPP
template template
S& S&
S::_M_replace<C*> S::_M_replace<C*>
(S::iterator, S::iterator, C*, C*, forward_iterator_tag); (S::iterator, S::iterator, C*, C*, forward_iterator_tag);
#endif
#ifdef REPIIPP2
template template
S& S&
S::_M_replace<const C*> S::_M_replace<const C*>
(S::iterator, S::iterator, const C*, const C*, forward_iterator_tag); (S::iterator, S::iterator, const C*, const C*, forward_iterator_tag);
#endif
#ifdef COPY
template template
S::size_type S::copy(C*, S::size_type, S::size_type) const; S::size_type S::copy(C*, S::size_type, S::size_type) const;
#endif
#ifdef CONII
template template
C* C*
S::_S_construct<S::iterator> S::_S_construct<S::iterator>
(S::iterator, S::iterator, const allocator<C>&); (S::iterator, S::iterator, const allocator<C>&);
#endif
#ifdef CONIIF
template template
C* C*
S::_S_construct<S::iterator> S::_S_construct<S::iterator>
(S::iterator, S::iterator, const allocator<C>&, forward_iterator_tag); (S::iterator, S::iterator, const allocator<C>&, forward_iterator_tag);
#endif
#ifdef CONPPF
template template
C* C*
S::_S_construct<C*> S::_S_construct<C*>
(C*, C*, const allocator<C>&, forward_iterator_tag); (C*, C*, const allocator<C>&, forward_iterator_tag);
#endif
#ifdef CONPPF2
template template
C* C*
S::_S_construct<const C*> S::_S_construct<const C*>
(const C*, const C*, const allocator<C>&, forward_iterator_tag); (const C*, const C*, const allocator<C>&, forward_iterator_tag);
#endif
#ifdef CONSC
template template
C* C*
S::_S_construct(S::size_type, C, S::allocator_type const&); S::_S_construct(S::size_type, C, S::allocator_type const&);
#endif
#ifdef FIND
// These members are explicitly specialized, and can only be in one // These members are explicitly specialized, and can only be in one
// translation unit or else we get multiple copies. . . // translation unit or else we get multiple copies. . .
#if _GLIBCPP_INSTANTIATING_CHAR #if _GLIBCPP_INSTANTIATING_CHAR
...@@ -300,101 +221,55 @@ namespace std ...@@ -300,101 +221,55 @@ namespace std
_Char_traits_match<wchar_t, traits_type>(__c)); _Char_traits_match<wchar_t, traits_type>(__c));
} }
#endif #endif
#endif
#ifdef FINDC
template template
S::size_type S::find(C, S::size_type) const; S::size_type S::find(C, S::size_type) const;
#endif
#ifdef RFIND
template template
S::size_type S::rfind(C const*, S::size_type, S::size_type) const; S::size_type S::rfind(C const*, S::size_type, S::size_type) const;
#endif
#ifdef RFINDC
template template
S::size_type S::rfind(C, S::size_type) const; S::size_type S::rfind(C, S::size_type) const;
#endif
#ifdef FFO
template template
S::size_type S::find_first_of(C const*, S::size_type, S::size_type) const; S::size_type S::find_first_of(C const*, S::size_type, S::size_type) const;
#endif
#ifdef FLO
template template
S::size_type S::find_last_of(C const*, S::size_type, S::size_type) const; S::size_type S::find_last_of(C const*, S::size_type, S::size_type) const;
#endif
#ifdef FFNO
template template
S::size_type S::find_first_not_of( S::size_type S::find_first_not_of(
C const*, S::size_type, S::size_type) const; C const*, S::size_type, S::size_type) const;
#endif
#ifdef FLNO
template template
S::size_type S::find_last_not_of( S::size_type S::find_last_not_of(
C const*, S::size_type, S::size_type) const; C const*, S::size_type, S::size_type) const;
#endif
#ifdef FLNOC
template template
S::size_type S::find_last_not_of(C, S::size_type) const; S::size_type S::find_last_not_of(C, S::size_type) const;
#endif
#ifdef COMPARE
template template
int S::compare(S::size_type, S::size_type, S const&) const; int S::compare(S::size_type, S::size_type, S const&) const;
#endif
#ifdef COMPARE2
template template
int S::compare(S::size_type, S::size_type, S const&, S::size_type, int S::compare(S::size_type, S::size_type, S const&, S::size_type,
S::size_type) const; S::size_type) const;
#endif
#ifdef COMPAREP
template template
int S::compare(C const*) const; int S::compare(C const*) const;
#endif
#ifdef COMPAREP2
template template
int S::compare( int S::compare(
S::size_type, S::size_type, C const*, S::size_type) const; S::size_type, S::size_type, C const*, S::size_type) const;
#endif
#ifdef ADDPS
template S operator+(const C*, const S&); template S operator+(const C*, const S&);
#endif
#ifdef ADDCS
template S operator+(C, const S&); template S operator+(C, const S&);
#endif
#ifdef EQ
template bool operator==(const S::iterator&, const S::iterator&); template bool operator==(const S::iterator&, const S::iterator&);
template bool operator==(const S::const_iterator&, const S::const_iterator&); template bool operator==(const S::const_iterator&, const S::const_iterator&);
#endif
#ifdef EXTRACT
template basic_istream<C>& operator>>(basic_istream<C>&, S&);
#endif
#ifdef INSERT
template basic_ostream<C>& operator<<(basic_ostream<C>&, const S&);
#endif
#ifdef GETLINE
template basic_istream<C>& getline(basic_istream<C>&, S&, C);
template basic_istream<C>& getline(basic_istream<C>&, S&);
#endif
#ifdef SCOPY
template void _S_string_copy(const S&, C*, allocator<C>::size_type); template void _S_string_copy(const S&, C*, allocator<C>::size_type);
#endif
} // std } // std
......
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