acinclude.m4 (GLIBCPP_CHECK_TARGET): New macro...

2000-11-13  Phil Edwards  <pme@sources.redhat.com>

	* acinclude.m4 (GLIBCPP_CHECK_TARGET):  New macro, replacing
	  GLIBCPP_CHECK_CPU and GLIBCPP_CHECK_OS, sourcing configure.target.
	  (GLIBCPP_CONFIGURE):  Call new macro here.
	* configure.host:  Cleanup.
	* configure.in:  Remove those two macros.
	* configure.target:  New file.
	* aclocal.m4:  Regenerated.
	* configure:  Ditto.
	* Makefile.in:  Ditto.
	* libio/Makefile.in:  Ditto.
	* libmath/Makefile.in:  Ditto.
	* libsupc++/Makefile.in:  Ditto.
	* src/Makefile.in:  Ditto.

	* mkcheck.in:  Use libtool.  Split things out into functions.

From-SVN: r37443
This commit is contained in:
Phil Edwards 2000-11-13 23:49:41 +00:00
parent b72554f1df
commit d0941a315e
13 changed files with 1713 additions and 1480 deletions

View File

@ -1,3 +1,21 @@
2000-11-13 Phil Edwards <pme@sources.redhat.com>
* acinclude.m4 (GLIBCPP_CHECK_TARGET): New macro, replacing
GLIBCPP_CHECK_CPU and GLIBCPP_CHECK_OS, sourcing configure.target.
(GLIBCPP_CONFIGURE): Call new macro here.
* configure.host: Cleanup.
* configure.in: Remove those two macros.
* configure.target: New file.
* aclocal.m4: Regenerated.
* configure: Ditto.
* Makefile.in: Ditto.
* libio/Makefile.in: Ditto.
* libmath/Makefile.in: Ditto.
* libsupc++/Makefile.in: Ditto.
* src/Makefile.in: Ditto.
* mkcheck.in: Use libtool. Split things out into functions.
2000-11-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Makefile.am (tmp-libstdsc++.INC:): Do not use -I$(top_builddir).

View File

@ -134,7 +134,48 @@ MULTICLEAN = true
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CC_FOR_TARGET=$(CC_FOR_TARGET)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "EXPECT=$(EXPECT)" "RUNTEST=$(RUNTEST)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "includedir=$(includedir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "NM=$(NM)" "NM_FOR_BUILD=$(NM_FOR_BUILD)" "NM_FOR_TARGET=$(NM_FOR_TARGET)" "DESTDIR=$(DESTDIR)" "WERROR=$(WERROR)"
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"EXPECT=$(EXPECT)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs

View File

@ -156,6 +156,10 @@ LIB_AC_PROG_CXX
*) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
esac
# This does for the target what configure.host does for the host. In
# addition to modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_TARGET
GLIBCPP_CFLAGS="[$]{glibcpp_cflags}"
GLIBCPP_CXXFLAGS="[$]{glibcpp_cxxflags}"
AC_SUBST(GLIBCPP_CFLAGS)
@ -754,93 +758,15 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
])
dnl Check to see what architecture we are compiling for. Also, if
dnl architecture-specific flags are required for compilation, add them here.
dnl Check to see what architecture and operating system we are compiling
dnl for. Also, if architecture- or OS-specific flags are required for
dnl compilation, pick them up here.
dnl
dnl GLIBCPP_CHECK_CPU
AC_DEFUN(GLIBCPP_CHECK_CPU, [
AC_MSG_CHECKING([for cpu config directory])
# Currently unused, but could be useful.
# CPU_FLAGS=
case "${target_cpu}" in
alpha*)
cpu_include_dir="config/cpu/alpha"
;;
arm*)
cpu_include_dir="config/cpu/arm"
;;
ia64)
cpu_include_dir="config/cpu/ia64"
;;
i386)
cpu_include_dir="config/cpu/i386"
;;
i486 | i586 | i686 | i786)
cpu_include_dir="config/cpu/i486"
;;
powerpc | rs6000)
cpu_include_dir="config/cpu/powerpc"
;;
sparc64 | ultrasparc)
cpu_include_dir="config/cpu/sparc/sparc64"
;;
sparc*)
cpu_include_dir="config/cpu/sparc/sparc32"
;;
*)
cpu_include_dir="config/cpu/generic"
;;
esac
AC_MSG_RESULT($cpu_include_dir)
])
dnl Check to see what OS we are compiling for. Also, if os-specific flags
dnl are required for compilation, add them here.
dnl
dnl GLIBCPP_CHECK_OS
AC_DEFUN(GLIBCPP_CHECK_OS, [
AC_MSG_CHECKING([for OS config directory])
# Currently unused, but could be useful.
# OS_FLAGS=
case "${target_os}" in
aix4.[[3456789]]* | aix[[56789]]*)
os_include_dir="config/os/aix"
case "$CXX" in
*pthread*)
enable_threads='posix'
;;
*)
enable_threads='no'
;;
esac
;;
aix*)
os_include_dir="config/os/aix"
;;
bsd* | freebsd*)
os_include_dir="config/os/bsd"
;;
linux*)
os_include_dir="config/os/gnu-linux"
;;
irix*)
os_include_dir="config/os/irix"
;;
solaris2.5*)
os_include_dir="config/os/solaris/solaris2.5"
;;
solaris2.6*)
os_include_dir="config/os/solaris/solaris2.6"
;;
solaris2.7* | solaris2.8*)
os_include_dir="config/os/solaris/solaris2.7"
;;
*)
os_include_dir="config/os/generic"
;;
esac
AC_MSG_RESULT($os_include_dir)
dnl GLIBCPP_CHECK_TARGET
AC_DEFUN(GLIBCPP_CHECK_TARGET, [
. [$]{glibcpp_basedir}/configure.target
AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
AC_MSG_RESULT(OS config directory is $os_include_dir)
AC_LINK_FILES($os_include_dir/bits/os_defines.h, include/bits/os_defines.h)
])
@ -1422,7 +1348,7 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
;;
xyes)
# default
target_thread_file=''
target_thread_file='posix'
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
xsolaris | xwin32 | xdce | xvxworks)
@ -1447,7 +1373,7 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
AC_MSG_ERROR(thread package $THREADS not yet supported)
;;
*)
AC_MSG_ERROR($THREADS is an unknown thread package)
AC_MSG_ERROR($THREADS is an unsupported/unknown thread package)
;;
esac
AC_MSG_RESULT($THREADH)

View File

@ -168,6 +168,10 @@ LIB_AC_PROG_CXX
*) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
esac
# This does for the target what configure.host does for the host. In
# addition to modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_TARGET
GLIBCPP_CFLAGS="[$]{glibcpp_cflags}"
GLIBCPP_CXXFLAGS="[$]{glibcpp_cxxflags}"
AC_SUBST(GLIBCPP_CFLAGS)
@ -766,93 +770,15 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
])
dnl Check to see what architecture we are compiling for. Also, if
dnl architecture-specific flags are required for compilation, add them here.
dnl Check to see what architecture and operating system we are compiling
dnl for. Also, if architecture- or OS-specific flags are required for
dnl compilation, pick them up here.
dnl
dnl GLIBCPP_CHECK_CPU
AC_DEFUN(GLIBCPP_CHECK_CPU, [
AC_MSG_CHECKING([for cpu config directory])
# Currently unused, but could be useful.
# CPU_FLAGS=
case "${target_cpu}" in
alpha*)
cpu_include_dir="config/cpu/alpha"
;;
arm*)
cpu_include_dir="config/cpu/arm"
;;
ia64)
cpu_include_dir="config/cpu/ia64"
;;
i386)
cpu_include_dir="config/cpu/i386"
;;
i486 | i586 | i686 | i786)
cpu_include_dir="config/cpu/i486"
;;
powerpc | rs6000)
cpu_include_dir="config/cpu/powerpc"
;;
sparc64 | ultrasparc)
cpu_include_dir="config/cpu/sparc/sparc64"
;;
sparc*)
cpu_include_dir="config/cpu/sparc/sparc32"
;;
*)
cpu_include_dir="config/cpu/generic"
;;
esac
AC_MSG_RESULT($cpu_include_dir)
])
dnl Check to see what OS we are compiling for. Also, if os-specific flags
dnl are required for compilation, add them here.
dnl
dnl GLIBCPP_CHECK_OS
AC_DEFUN(GLIBCPP_CHECK_OS, [
AC_MSG_CHECKING([for OS config directory])
# Currently unused, but could be useful.
# OS_FLAGS=
case "${target_os}" in
aix4.[[3456789]]* | aix[[56789]]*)
os_include_dir="config/os/aix"
case "$CXX" in
*pthread*)
enable_threads='posix'
;;
*)
enable_threads='no'
;;
esac
;;
aix*)
os_include_dir="config/os/aix"
;;
bsd* | freebsd*)
os_include_dir="config/os/bsd"
;;
linux*)
os_include_dir="config/os/gnu-linux"
;;
irix*)
os_include_dir="config/os/irix"
;;
solaris2.5*)
os_include_dir="config/os/solaris/solaris2.5"
;;
solaris2.6*)
os_include_dir="config/os/solaris/solaris2.6"
;;
solaris2.7* | solaris2.8*)
os_include_dir="config/os/solaris/solaris2.7"
;;
*)
os_include_dir="config/os/generic"
;;
esac
AC_MSG_RESULT($os_include_dir)
dnl GLIBCPP_CHECK_TARGET
AC_DEFUN(GLIBCPP_CHECK_TARGET, [
. [$]{glibcpp_basedir}/configure.target
AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
AC_MSG_RESULT(OS config directory is $os_include_dir)
AC_LINK_FILES($os_include_dir/bits/os_defines.h, include/bits/os_defines.h)
])
@ -1434,7 +1360,7 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
;;
xyes)
# default
target_thread_file=''
target_thread_file='posix'
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
xsolaris | xwin32 | xdce | xvxworks)
@ -1459,7 +1385,7 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
AC_MSG_ERROR(thread package $THREADS not yet supported)
;;
*)
AC_MSG_ERROR($THREADS is an unknown thread package)
AC_MSG_ERROR($THREADS is an unsupported/unknown thread package)
;;
esac
AC_MSG_RESULT($THREADH)

2133
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -10,34 +10,32 @@
# If it encounters an error, it will exit with a message.
# It uses the following shell variables:
# host The configuration host
# host_cpu The configuration host CPU
# target_optspace --enable-target-optspace ("yes", "no", "")
# host The configuration host
# host_cpu The configuration host CPU
# target_optspace --enable-target-optspace ("yes", "no", "")
# It sets the following shell variables:
# glibcpp_cflags Special CFLAGS to use when building
# glibcpp_cxxflags Special CXXFLAGS to use when building
# glibcpp_cflags Special CFLAGS to use when building
# glibcpp_cxxflags Special CXXFLAGS to use when building
glibcpp_cflags=
glibcpp_cxxflags=
AM_RUNTESTFLAGS=
# Set any host dependent compiler flags.
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
echo "$target"
DIVIDESPEC=-fuse-divide-subroutine
case "${host}" in
i686-*|i586-*)
;;
;;
sparc-*)
;;
*)
;;
;;
esac
glibcpp_cflags="${glibcpp_cflags} ${libgcj_flags}"
glibcpp_cxxflags="${glibcpp_cxxflags} ${libgcj_flags}"

View File

@ -28,8 +28,6 @@ AM_CONFIG_HEADER(config.h)
# Check for c++ or library specific bits that don't require linking.
GLIBCPP_CHECK_COMPILER_VERSION
GLIBCPP_CHECK_CPU
GLIBCPP_CHECK_OS
# Enable all the crazy c++ stuff. C_MBCHAR must come early.
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)

View File

@ -0,0 +1,125 @@
# configure.target
# This shell script handles all target based configuration for libstdc++.
# It sets various shell variables based on the the target and the
# configuration options. You can modify this shell script without
# needing to rerun autoconf.
# This shell script should be invoked as
# . configure.target
# If it encounters an error, it will exit with a message.
# It uses the following shell variables:
# target The configuration target
# target_cpu The configuration target CPU
# target_os The configuration target OS
# target_optspace --enable-target-optspace ("yes", "no", "")
# It possibly modifies the following shell variables:
# glibcpp_cflags Special CFLAGS to use when building
# glibcpp_cxxflags Special CXXFLAGS to use when building
# cpu_include_dir CPU-specific include directory, relative to srcdir
# os_include_dir OS-specific include directory, relative to srcdir
# The first two are set in configure.host and modified here.
# These are "local" and should be set in the switch statements below. They
# will be appended to their real conterparts once the dust settles.
l_glibcpp_cflags=
l_glibcpp_cxxflags=
# Set any CPU dependent compiler flags.
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
case "${target_cpu}" in
alpha*)
cpu_include_dir="config/cpu/alpha"
;;
arm*)
cpu_include_dir="config/cpu/arm"
;;
ia64)
cpu_include_dir="config/cpu/ia64"
;;
i386)
cpu_include_dir="config/cpu/i386"
;;
i486 | i586 | i686 | i786)
cpu_include_dir="config/cpu/i486"
;;
powerpc | rs6000)
cpu_include_dir="config/cpu/powerpc"
;;
sparc64 | ultrasparc)
cpu_include_dir="config/cpu/sparc/sparc64"
;;
sparc*)
cpu_include_dir="config/cpu/sparc/sparc32"
;;
*)
cpu_include_dir="config/cpu/generic"
;;
esac
# Set any OS dependent compiler flags.
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
case "${target_os}" in
aix4.[[3456789]]* | aix[[56789]]*)
os_include_dir="config/os/aix"
case "$CXX" in
*pthread*)
enable_threads='posix'
;;
*)
enable_threads='no'
;;
esac
;;
aix*)
os_include_dir="config/os/aix"
;;
bsd* | freebsd*)
os_include_dir="config/os/bsd"
;;
linux*)
os_include_dir="config/os/gnu-linux"
;;
irix*)
os_include_dir="config/os/irix"
;;
solaris2.5*)
os_include_dir="config/os/solaris/solaris2.5"
;;
solaris2.6*)
os_include_dir="config/os/solaris/solaris2.6"
;;
solaris2.7* | solaris2.8*)
os_include_dir="config/os/solaris/solaris2.7"
;;
*)
os_include_dir="config/os/generic"
;;
esac
# Set any flags dependant on the full target triplet.
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
#case "${target}" in
# *-*-telepathic)
# # On the MindReader 10000 platform, you really *can* tell the
# # compiler to "do what I mean".
# l_glibcpp_cxxflags='-fDWIM'
# ;;
#esac
# Okay, folks, show's over. Move along, move along.
glibcpp_cflags="${glibcpp_cflags} ${libgcj_flags} ${l_glibcpp_cflags}"
glibcpp_cxxflags="${glibcpp_cxxflags} ${libgcj_flags} ${l_glibcpp_cxxflags}"

View File

@ -121,14 +121,21 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
INCLUDES = -nostdinc++ -I$(top_builddir)/include -I$(GLIBCPP_INCLUDE_DIR) $(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)
INCLUDES = \
-nostdinc++ \
-I$(top_builddir)/include -I$(GLIBCPP_INCLUDE_DIR) \
$(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)
libio_headers = libio.h libioP.h iolibio.h
libio_headers = \
libio.h libioP.h iolibio.h
@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = filedoalloc.c genops.c fileops.c stdfiles.c c_codecvt.c iofclose.c iofopen.c stdio.c
@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = @GLIBCPP_NEED_LIBIO_TRUE@\
@GLIBCPP_NEED_LIBIO_TRUE@ filedoalloc.c genops.c fileops.c stdfiles.c c_codecvt.c iofclose.c \
@GLIBCPP_NEED_LIBIO_TRUE@ iofopen.c stdio.c
@GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS =
@GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = wfiledoalloc.c wfileops.c wgenops.c iofwide.c
@GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = @GLIBCPP_NEED_WLIBIO_TRUE@\
@GLIBCPP_NEED_WLIBIO_TRUE@ wfiledoalloc.c wfileops.c wgenops.c iofwide.c
@GLIBCPP_NEED_WLIBIO_FALSE@LIBIO_WSRCS =
EXTRA_DIST = iostreamP.h

View File

@ -112,18 +112,31 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
noinst_LTLIBRARIES = libmath.la
EXTRA_LONG_DOUBLE_yes = ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c signbitl.c cabsl.c
EXTRA_LONG_DOUBLE_yes = \
ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c \
csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c \
signbitl.c cabsl.c
EXTRA_DIST = ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.c csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c ctanhf.c carg.c cargf.c hypot.c hypotf.c atan2f.c expf.c $(EXTRA_LONG_DOUBLE_yes)
EXTRA_DIST = \
ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c \
cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.c \
csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c \
ctanhf.c carg.c cargf.c hypot.c hypotf.c\
atan2f.c expf.c \
$(EXTRA_LONG_DOUBLE_yes)
libmath_la_LIBADD = @LIBMATHOBJS@ $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
libmath_la_LIBADD = \
@LIBMATHOBJS@ \
$(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = signbit.c signbitf.c
libmath_la_SOURCES = \
signbit.c signbitf.c
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
@ -137,7 +150,9 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
INCLUDES = -I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES)
INCLUDES = \
-I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include \
$(TOPLEVEL_INCLUDES)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h

View File

@ -110,12 +110,12 @@ MAINT_CHARSET = latin1
# Cross compiler and multilib support.
# Install a library built with a cross compiler in tooldir, not libdir.
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@gcc_version = @gcc_version@
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexecdir = $(libdir)/gcc-lib/$(target_alias)
@USE_LIBDIR_FALSE@toolexecdir = $(exec_prefix)/$(target_alias)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexeclibdir = $(toolexecdir)/$(gcc_version)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@toolexeclibdir = $(libdir)$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@gcc_version = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@@gcc_version@
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexecdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@$(libdir)/gcc-lib/$(target_alias)
@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@$(toolexecdir)/$(gcc_version)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@toolexeclibdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@$(libdir)$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
# Need this library to both be part of libstdc++.a, and installed
# separately too.
@ -131,11 +131,13 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# These bits are all figured out from configure. Look in acinclude.m4
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
CONFIG_CXXFLAGS = \
@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
# Warning flags to use.
WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
WARN_CXXFLAGS = \
@WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
@ -147,20 +149,38 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
INCLUDES = -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) $(CONFIG_INCLUDES) -I$(top_builddir)/include
INCLUDES = \
-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include \
$(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) \
$(CONFIG_INCLUDES) -I$(top_builddir)/include
headers = cxxabi.h exception new new.h typeinfo
headers = \
cxxabi.h exception new new.h typeinfo
sources = del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc exception_support.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc vec.cc
sources = \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
exception_support.cc \
new_handler.cc \
new_op.cc \
new_opnt.cc \
new_opv.cc \
new_opvnt.cc \
pure.cc \
tinfo.cc \
tinfo2.cc \
vec.cc
libsupc___la_SOURCES = $(sources)
libsupc__convenience_la_SOURCES = $(sources)
@GXX_INCLUDE_DIR_TRUE@glibcppinstalldir = @gxx_include_dir@
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@glibcppinstalldir = $(libdir)/gcc-lib/$(target_alias)/@gcc_version@/include/g++
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@glibcppinstalldir = $(prefix)/include/g++-@libstdcxx_interface@
@GXX_INCLUDE_DIR_TRUE@glibcppinstalldir = @GXX_INCLUDE_DIR_TRUE@@gxx_include_dir@
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@glibcppinstalldir = @GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@$(libdir)/gcc-lib/$(target_alias)/@gcc_version@/include/g++
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@glibcppinstalldir = @GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@$(prefix)/include/g++-@libstdcxx_interface@
glibcppinstall_HEADERS = $(headers)
@ -173,7 +193,12 @@ LIBSUPCXX_CXXFLAGS = -prefer-pic
# 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. (ie, --enable-debug)
AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
AM_CXXFLAGS = \
-fno-implicit-templates \
$(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
$(CONFIG_CXXFLAGS)
# libstdc++ libtool notes
@ -194,14 +219,16 @@ AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS)
# 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
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We have a problem when building the shared libstdc++ object if
# the rules automake generates would be used. We cannot allow CXX to
# be used in libtool since this would add -lstdc++ to the link line
# which of course is problematic at this point.
CXXLINK = $(LIBTOOL) --mode=link "$(CC)" @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
CXXLINK = $(LIBTOOL) --mode=link "$(CC)" \
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h

View File

@ -1,15 +1,31 @@
#!/usr/bin/env bash
# Script to do automated testing and data collection
# for various test files, so that we don't have to do this by hand on
# every test file. It attempts to collect some diagnostic info about
# size and speed that should be useful in the future as the library
# gets tuned for size and speed. In addition, it tests static and
# shared linkage.
# Script to do automated testing and data collection for various test
# files, so that we don't have to do this by hand on every test file.
# It attempts to collect some diagnostic info about size and speed that
# should be useful in the future as the library gets tuned for size
# and speed. In addition, it tests static and shared linkage, iff each
# has been enabled.
# Invocation
# mkcheck [012] (path to build) (path to src) (path to install)
### XXX There are a lot of tests in here for OS-specific stuff. If we
### move to a 'configure.target' method of determining those extra
### flags and whatnot, we can take out all those things and source
### that file from here. (Write that file with this in mind...)
### XXX Note that breaking out of this with ^C will not work. Dunno why.
# This has been true all along. Found out about it the hard way...
case $BASH_VERSION in
1*) echo 'You need bash 2.x to run mkcheck. Exiting.'; exit 1 ;;
*) ;; # ??
esac
#
# 1: variables
#
@ -53,6 +69,11 @@ if [ $WHICH -eq 1 ]; then
fi
fi
# This is LIBTOOL=@LIBTOOL@ piped through a bit of sanity that we can
# assume for this script (by the time we run this).
LIBTOOL="$BUILD_DIR/libtool"
chmod u+x $LIBTOOL
# INC_PATH == include path to new headers for use on gcc command-line
top_srcdir=@top_srcdir@
C_DIR="`basename @C_INCLUDE_DIR@`"
@ -62,7 +83,7 @@ if [ $WHICH != "1" ]; then
-I$SRC_DIR/include -I$SRC_DIR/libsupc++ -I$SRC_DIR/libio \
-I$SRC_DIR/testsuite"
elif [ $WHICH -eq 1 ]; then
INC_PATH="-nostdinc++ -I$SRC_DIR/testsuite"
INC_PATH="-I$SRC_DIR/testsuite"
fi
if [ $WHICH -eq 2 ]; then
@ -70,25 +91,50 @@ if [ $WHICH -eq 2 ]; then
exit 0;
fi
#LIB_PATH == where to find the build library binaries.
if [ $WHICH != "1" ]; then
LIB_PATH="$BUILD_DIR/src/.libs"
# It's not dejagnu; we need to do things ourselves. Pick up any extra
# settings for this target.
. ${top_srcdir}/configure.target
# LIB_PATH == where to find the build libraries for libtool's use
# CXX == how to call the compiler
if [ $WHICH -eq 0 ]; then
LIB_PATH="$BUILD_DIR/src"
CXX="$BUILD_DIR/../../gcc/g++ -B$BUILD_DIR/../../gcc/"
elif [ $WHICH -eq 1 ]; then
LIB_PATH="$PREFIX_DIR/lib"
CXX="$PREFIX_DIR/bin/g++"
fi
# gcc compiler flags
#CXX_FLAG="-fsquangle -fhonor-std -fnew-exceptions -g -O2 -DDEBUG_ASSERT "
#CXX_FLAG="-g -O2 -DDEBUG_ASSERT "
CXX_FLAG="-g -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
# gcc compiler flags (maybe use glibcpp_cxxflags from configure.target,
# but thst's really meant for building the library itself, not using it)
CXX_FLAG="-ggdb3 -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
# a specific flag(s) to force the use of shared libraries, if any
# specific libtool flag(s) to force the use of shared libraries, if any
SH_FLAG=""
# a specific flag(s) to force the use of static libraries, if any
ST_FLAG="-static"
# specific libtool flag(s) to force the use of static libraries, if any
#ST_FLAG="-static"
ST_FLAG="-all-static"
# LTCXX == how to call libtool when creating an executable
# LTEXE == how to call libtool when running an executable
# LIBS == any extra needed -l switches, etc (may need more libs, lose lose)
if [ $WHICH -eq 0 ]; then
LTCXX="$LIBTOOL --tag=CXX --mode=link \
$CXX $CXX_FLAG $INC_PATH \
$LIB_PATH/../libsupc++/libsupc++.la $LIB_PATH/libstdc++.la \
-no-install"
LTEXE="$LIBTOOL --mode=execute"
LIBS="-nodefaultlibs -lc -lgcc -lc"
elif [ $WHICH -eq 1 ]; then
# For the installed version, we really only need to use libtool and
# the .la file to get correct rpaths.
LTCXX="$LIBTOOL --tag=CXX --mode=link \
$CXX $CXX_FLAG $INC_PATH -L$LIB_PATH \
$LIB_PATH/libstdc++.la -no-install -rpath $LIB_PATH"
LTEXE="$LIBTOOL --mode=execute"
LIBS=
fi
# Set up the testing directory, which should be in a directory called
# "testsuite" in the root level of the build directory.
@ -96,7 +142,8 @@ TEST_DIR="`pwd`/testsuite"
if [ ! -d "$TEST_DIR" ]; then
echo "making directory $TEST_DIR"
mkdir $TEST_DIR
chmod 777 $TEST_DIR
mkdir $TEST_DIR/.libs # help libtool keep quiet
chmod u+w $TEST_DIR
fi
# the name of the file that will collect and hold all this useful data:
@ -127,9 +174,9 @@ if [ ! -f "$TESTS_FILE" ]; then
echo "making file $TESTS_FILE"
for LONG_NAME in $SRC_DIR/testsuite/*/*.cc
do
DIR_NAME=$(dirname $LONG_NAME)
SHORT_NAME="`basename $DIR_NAME`/`basename $LONG_NAME`"
echo "$SHORT_NAME" >> $TESTS_FILE
DIR_NAME=$(dirname $LONG_NAME)
SHORT_NAME="`basename $DIR_NAME`/`basename $LONG_NAME`"
echo "$SHORT_NAME" >> $TESTS_FILE
done
fi
@ -144,9 +191,9 @@ fi
rm -rf "$TEST_DIR"/*exe
# Remove old core files (which now get left in cwd, not $TEST_DIR).
rm -rf ./*core
rm -rf ./*core*
# Copy over the data files for filebufs in read-only mode
# Copy over the data files for filebufs
cp $SRC_DIR/testsuite/27_io/*.txt $TEST_DIR
cp $SRC_DIR/testsuite/27_io/*.tst $TEST_DIR
chmod u+w $TEST_DIR/*.txt
@ -155,11 +202,14 @@ chmod u+w $TEST_DIR/*.tst
# Emit useful info about compiler and platform
echo "host: $(uname -mrsv)" >> $RESULTS_FILE
echo "compiler: $($CXX -v 2>&1 | tail -1)" >> $RESULTS_FILE
echo "$($CXX -v 2>&1 | grep ^Configured)" >> $RESULTS_FILE
echo "compiler flags: $CXX_FLAG" >> $RESULTS_FILE
echo "date: $(date +%Y%m%d)" >> $RESULTS_FILE
echo "" >> $RESULTS_FILE
echo "p == pass/fail execution test" >> $RESULTS_FILE
explanation='+: pass, -b: build failure, -r: run failure, x: disabled'
printf "%s\n %s\n" 'p == pass/fail execution test' "$explanation" \
>> $RESULTS_FILE
echo "ctime == time to compile and link" >> $RESULTS_FILE
echo "etime == time for executable to run" >> $RESULTS_FILE
echo "text == size of the executable text section" >> $RESULTS_FILE
@ -173,6 +223,127 @@ echo "ctime" "etime" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
echo "text" "data" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
echo "total" "name" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
echo "" >> $RESULTS_FILE
#
# 2.5: support functions
#
# Figure out how to extract size information from binaries. We take
# the text of the value we want as an argument, and leave the size in
# the appropriate variable.
#
# We discover what kind of size(1) we are using *once* and build a shell
# function named 'size_command' to wrap it. (The "function" keyword is
# redundant here, but helps me read it, so there.) Previously we were
# re-discovering the size(1) arguments three times for each test; sloooow.
#
# It is VERY IMPORTANT not to compare these numbers across platforms.
# Different size(1)'s extract section information differently. For
# example, using the native Sun size(1) and GNU size(1) built for Suns
# on the exact same binary will give very different numbers, due to all
# the variance in command-line options and arbitrary names of ELF sections.
#
# and suddenly we go to 2-space indentations...
setup_size_command()
{
if size --version 2> /dev/null | grep -c GNU > /dev/null;
then # Then we're using a GNU size(1) built for this platform.
# We lose .rodata and .data1 and who knows what else... kludge.
function size_command()
{
case $1 in
TEXT) TEXT=$(size -A $EXENAME | grep ^.text | awk '{print $2}') ;;
DATA) DATA=$(size -A $EXENAME | grep -w ^.data | awk '{print $2}') ;;
SIZE) SIZE=$(size -A $EXENAME | grep otal | awk '{print $2}') ;;
esac
}
else
# Not using GNU size; check for platform. These numbers seem to match
# up to text/data/total, although their meanings seem to be different.
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
case @host_os@ in
*aix*)
function size_command()
{
case $1 in
TEXT) TEXT=$(size -X32_64 $EXENAME | awk '{print $2}') ;;
DATA) DATA=$(size -X32_64 $EXENAME | awk '{print $4}') ;;
SIZE) SIZE=$(size -X32_64 $EXENAME | awk '{print $12}') ;;
esac
}
;;
*solaris*)
function size_command()
{
case $1 in
TEXT) TEXT=$(size $EXENAME | awk '{print $1}') ;;
DATA) DATA=$(size $EXENAME | awk '{print $3}') ;;
SIZE) SIZE=$(size $EXENAME | awk '{print $7}') ;;
esac
}
;;
*)
echo ' * Warning! Guessing how to extract section sizes!' 1>&2
function size_command()
{
# These are GNU size's settings... hey, it's worth a shot. Maybe.
case $1 in
TEXT) TEXT=$(size -A $EXENAME | grep ^.text | awk '{print $2}') ;;
DATA) DATA=$(size -A $EXENAME | grep -w ^.data | awk '{print $2}') ;;
SIZE) SIZE=$(size -A $EXENAME | grep otal | awk '{print $2}') ;;
esac
}
;;
esac
fi
}
# Test for file output
test_for_output()
{
# This checks for emitted output files, which is useful when
# testing file-related output. The rules for this working are as
# follows: the emitted file must have the ".txt" extension, and be
# based on the actual *.cc file's name. For example, 27/filbuf.cc
# currently outputs files named 27/filebuf-2.txt and 27/filebuf-3.txt.
# Also, the first emitted file must be in the form $NAME-1.txt.
# The control file must follow the same constraints, but have a
# ".tst" extension. Thus, you have 27/filebuf-2.tst, etc.
# NAME contains the source name, like 27/filebuf.cc
# From that NAME, we want to generate some possible names, using
# ls on MATCH, a pattern description generated with sed.
# this is the name of the resulting diff file, if any
DIFF_FILE="`echo $TEST_NAME | sed 's/cc$/diff/'`"
# construct wildcard names, ie for $NAME=filebuf.cc, makes "filebuf*.tst"
DATA_FILES="`echo $NAME | sed 's/\.cc/\*\.tst/g'`"
# make sure there is at least one, then go
ST_E="`echo $NAME | sed 's/\.cc/\-1\.tst/g'`"
if [ -f $ST_E ]; then
# list of actual files that match the wildcard above, ie
# "filebuf-1.tst"
ST_MATCH_LIST="`ls $DATA_FILES`"
for i in $ST_MATCH_LIST; do
# ST_OUT_FILE is generated in the build directory.
PRE_NAME2="$TEST_DIR/`basename $i`"
ST_OUT_FILE="`echo $PRE_NAME2 | sed 's/tst$/txt/'`"
diff $ST_OUT_FILE $i > $DIFF_FILE
if [ -s $DIFF_FILE ]; then
RESULT="-r"
echo "$ST_OUT_FILE has some problems, dude"
else
RESULT="+"
fi
rm $DIFF_FILE
done
else
# the file does no output, and didn't abnormally
# terminate, so assume passed.
RESULT="+"
fi
}
#
@ -197,150 +368,96 @@ test_file()
# and harder as we try compiling at, say, top of the hour; we would
# eventually have to calculate time_t anyhow. Or 3) just grab two
# time_t's (no more overhead than grabbing two date(1)'s).
compiler_invocation="$LTCXX $S_FLAG $SRC_NAME -o $EXENAME $LIBS"
# Why the leading weird character, like a colon? That way you can
# 'grep -v ^: *mkchecklog.txt' and just see the errors.
#printf "\n: " >> $LOG_FILE
printf "\n" >> $LOG_FILE
COMP_TIME_START=$($TEST_DIR/printnow)
$CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,-rpath -Wl,$LIB_PATH \
$SRC_NAME -o $EXENAME 2>> $LOG_FILE
$compiler_invocation >> $LOG_FILE 2>&1
COMP_TIME_END=$($TEST_DIR/printnow)
if [ $COMP_TIME_START -lt $COMP_TIME_END ]; then
C_TIME=$[ $COMP_TIME_END - $COMP_TIME_START ]
C_TIME=$[ $COMP_TIME_END - $COMP_TIME_START ]
else
C_TIME="0"
C_TIME="0"
fi
if [ -f $EXENAME ]; then
case @host_os@ in
*solaris2.8*)
# These numbers seem to match up to text/data/total,
# although their meanings seem to be different. Very
# important to not compare these numbers across platforms.
## Get rid of the banner information. I don't recall this
## happening under previous Solarises. Maybe it's an 8 thing.
TEXT="$(size $EXENAME | grep $EXENAME | awk '{print $1}')"
DATA="$(size $EXENAME | grep $EXENAME | awk '{print $3}')"
SIZE="$(size $EXENAME | grep $EXENAME | awk '{print $7}')"
;;
*solaris*)
# These numbers seem to match up to text/data/total,
# although their meanings seem to be different. Very
# important to not compare these numbers across platforms.
TEXT="$(size $EXENAME | awk '{print $1}')"
DATA="$(size $EXENAME | awk '{print $3}')"
SIZE="$(size $EXENAME | awk '{print $7}')"
;;
*)
TEXT="$(size -A $EXENAME | grep text | awk '{print $2}')"
DATA="$(size -A $EXENAME | grep data | awk '{print $2}')"
SIZE="$(size -A $EXENAME | grep otal | awk '{print $2}')"
;;
esac
size_command TEXT
size_command DATA
size_command SIZE
# Actually run the executable and time it . . .
# Actually run the executable and time it. Note that output
# printed by the executable will be lost and cannot be redirected,
# because we need to capture the output of 'time'. Bummer.
TIMEFORMAT='timemark %R'
E_TIME_TEXT="$(exec 2>&1; ulimit -d $MAX_MEM_USAGE; time $EXENAME)"
E_ABNORMAL_TERMINATION=$?
E_TIME_TEXT="$(exec 2>&1; ulimit -d $MAX_MEM_USAGE; \
time $LTEXE $EXENAME)"
E_ABNORMAL_TERMINATION=$?
E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')"
# joining those two commands does not work due to quoting problems:
#E_TIME="$(exec 2>&1; time $EXENAME | awk '{print $2}')"
# this will work as a fallback on certain systems...?
#E_TIME=$(exec 2>&1; time $EXENAME | cut -d ' ' -f 2)
if [ "$E_ABNORMAL_TERMINATION" -ne 0 ]; then
RESULT='-'
rm -f ./*core
# sometimes you want to save all core files for review:
#mv ./core $EXENAME.core
# sometimes the OS names core files as programname.core:
#mv ./*core $EXENAME.core
else
# XXX this should probably be a function?
if [ "$E_ABNORMAL_TERMINATION" -ne 0 ]; then
RESULT='-r'
rm -f ./*core
# sometimes you want to save all core files for review:
#mv ./core $EXENAME.core
# sometimes the OS allows you to name core files yourself:
#mv ./*core $EXENAME.core
#mv ./core* $EXENAME.core
else
test_for_output
fi
# This checks for emitted output files, which is useful
# when testing file-related output. The rules for this
# working are as follows: the emitted file must have the
# ".txt" extension, and be based on the actual *.cc file's
# name. For example, 27/filbuf.cc currently outputs files
# named 27/filebuf-2.txt and 27/filebuf-3.txt. Also, the first
# emitted file must be in the form $NAME-1.txt. The
# control file must follow the same constraints, but have
# a ".tst" extension. Thus, you have 27/filebuf-2.tst, etc
# etc.
# NAME contains the source name, like 27/filebuf.cc
# From that NAME, we want to generate some possible names, using
# ls on MATCH, a pattern description generated with sed.
# this is the name of the resulting diff file, if any
DIFF_FILE="`echo $TEST_NAME | sed 's/cc$/diff/'`"
# construct wildcard names,ie for $NAME=filebuf.cc, makes
# "filebuf*.tst"
DATA_FILES="`echo $NAME | sed 's/\.cc/\*\.tst/g'`"
# make sure there is at least one, then go
ST_E="`echo $NAME | sed 's/\.cc/\-1\.tst/g'`"
if [ -f $ST_E ]; then
# list of actual files that match the wildcard above, ie
# "filebuf-1.tst"
ST_MATCH_LIST="`ls $DATA_FILES`"
for i in $ST_MATCH_LIST
do
# ST_OUT_FILE is generated in the build directory.
PRE_NAME2="$TEST_DIR/`basename $i`"
ST_OUT_FILE="`echo $PRE_NAME2 | sed 's/tst$/txt/'`"
diff $ST_OUT_FILE $i > $DIFF_FILE
if [ -s $DIFF_FILE ]; then
RESULT="-"
echo "$ST_OUT_FILE has some problems, dude"
else
RESULT="+"
fi
rm $DIFF_FILE
done
else
# the file does no output, and didn't abnormally
# terminate, so assume passed.
RESULT="+"
fi
fi
# sometimes you want to save all failing exe files for review:
if [ "$RESULT" = "+" ]; then
rm "$EXENAME"
fi
# sometimes you want to save all failing exe files for review:
if [ "$RESULT" = "+" ]; then
rm "$EXENAME"
fi
else
# the file did not compile. Write out compilation info to the log file.
echo "$CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,-rpath -Wl,$LIB_PATH \
$SRC_NAME -o $EXENAME" 2>> $LOG_FILE
RESULT="-"
TEXT="0"
DATA="0"
SIZE="0"
# the file did not compile/link.
RESULT="-b"
TEXT="0"
DATA="0"
SIZE="0"
fi
echo $RESULT | awk '{printf("%s\t", $1)}'
echo $RESULT | awk '{printf ("%.1s ", $1)}'>>$RESULTS_FILE
echo $C_TIME $E_TIME |awk '{printf("%d\t%.3f\t", $1, $2)}'>>$RESULTS_FILE
echo $TEXT $DATA | awk '{printf("%s\t%s\t", $1, $2)}'>>$RESULTS_FILE
echo $SIZE | awk '{printf("%s\t", $1)}'>>$RESULTS_FILE
echo $NAME | awk '{printf("%s\n", $1)}'>>$RESULTS_FILE
};
printf "%s\t" "$RESULT"
printf "%-2s %d\t%.3f\t%s\t%s\t%s\t%s\n" \
"$RESULT" $C_TIME $E_TIME $TEXT $DATA $SIZE $NAME >> $RESULTS_FILE
}
echo "detailed test information in $RESULTS_FILE"
setup_size_command
echo ""
echo "Detailed test results in .${RESULTS_FILE/$BUILD_DIR}"
echo $explanation
echo "------------------------------------------------------------------------"
echo "static" | awk '{printf("%s\t", $1)}'
echo "shared" | awk '{printf("%s\t", $1)}'
echo "test" | awk '{printf("%s\n", $1)}'
printf "static\tshared\ttest\n"
echo "------------------------------------------------------------------------"
TEST_TIME_START=$($TEST_DIR/printnow)
for NAME in `cat $TESTS_FILE`
for NAME in $(<$TESTS_FILE)
do
PRE_NAME="$TEST_DIR/`basename $NAME`"
ST_NAME="`echo $PRE_NAME | sed 's/cc$/st-exe/'`"
SH_NAME="`echo $PRE_NAME | sed 's/cc$/sh-exe/'`"
test_file $NAME $ST_NAME $ST_FLAG
test_file $NAME $SH_NAME $SH_FLAG
echo "$NAME" | awk '{printf("%s\n", $1)}'
if test @enable_static@ = yes; then
test_file $NAME $ST_NAME $ST_FLAG
else
printf "x\t"
printf "static skipped\n" >> $RESULTS_FILE
fi
if test @enable_shared@ = yes; then
test_file $NAME $SH_NAME $SH_FLAG
else
printf "x\t"
printf "shared skipped\n" >> $RESULTS_FILE
fi
printf "%s\n" "$NAME"
echo "" >> $RESULTS_FILE
done
@ -363,11 +480,10 @@ mv ${RESULTS_FILE}.tmp $RESULTS_FILE
if [ $TEST_TIME_START -lt $TEST_TIME_END ]; then
TEST_TIME=$[ $TEST_TIME_END - $TEST_TIME_START ]
echo "testrun == $TEST_TIME"
echo "testrun == $TEST_TIME" >> $RESULTS_FILE
echo "testrun == $TEST_TIME seconds"
echo "testrun == $TEST_TIME seconds" >> $RESULTS_FILE
fi
exit 0

View File

@ -110,12 +110,12 @@ MAINT_CHARSET = latin1
# Cross compiler and multilib support.
# Install a library built with a cross compiler in tooldir, not libdir.
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@gcc_version = @gcc_version@
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexecdir = $(libdir)/gcc-lib/$(target_alias)
@USE_LIBDIR_FALSE@toolexecdir = $(exec_prefix)/$(target_alias)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexeclibdir = $(toolexecdir)/$(gcc_version)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@toolexeclibdir = $(libdir)$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@gcc_version = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@@gcc_version@
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexecdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@$(libdir)/gcc-lib/$(target_alias)
@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@$(toolexecdir)/$(gcc_version)
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@toolexeclibdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@$(libdir)$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
toolexeclib_LTLIBRARIES = libstdc++.la
EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
@ -127,11 +127,13 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# These bits are all figured out from configure. Look in acinclude.m4
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
CONFIG_CXXFLAGS = \
@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
# Warning flags to use.
WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
WARN_CXXFLAGS = \
@WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
@ -143,34 +145,119 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
INCLUDES = -D_GNU_SOURCE -D_ISOC99_SOURCE -nostdinc++ $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES)
INCLUDES = \
-D_GNU_SOURCE -D_ISOC99_SOURCE -nostdinc++ \
$(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) \
$(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) -I$(top_builddir)/include \
$(TOPLEVEL_INCLUDES)
base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/basic_string.h bits/std_string.h bits/string.tcc bits/generic_shadow.h bits/std_utility.h bits/std_complex.h bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h bits/gslice.h bits/gslice_array.h bits/indirect_array.h bits/exception_support.h bits/std_fstream.h bits/std_iomanip.h bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h bits/std_istream.h bits/istream.tcc bits/std_locale.h bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h bits/streambuf.tcc bits/basic_file.h bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h bits/stl_pthread_alloc.h bits/pthread_allocimpl.h bits/stl_threads.h bits/stl_iterator_base.h backward/algo.h backward/algobase.h backward/alloc.h backward/bvector.h backward/defalloc.h backward/deque.h backward/function.h backward/hash_map.h backward/hash_set.h backward/hashtable.h backward/heap.h backward/iterator.h backward/list.h backward/map.h backward/multimap.h backward/new.h backward/multiset.h backward/pair.h backward/iostream.h backward/rope.h backward/set.h backward/slist.h backward/stack.h backward/tempbuf.h backward/tree.h backward/vector.h backward/fstream.h bits/std_bitset.h bits/std_deque.h bits/std_functional.h bits/std_iterator.h bits/std_list.h bits/std_map.h bits/std_memory.h bits/std_numeric.h bits/std_queue.h bits/std_set.h bits/std_stack.h bits/std_stdexcept.h bits/std_vector.h bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h bits/stl_deque.h bits/stl_function.h bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_string_fwd.h bits/stl_tempbuf.h bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h bits/type_traits.h bits/stl_range_errors.h bits/std_algorithm.h bits/concept_checks.h bits/container_concepts.h bits/sequence_concepts.h bits/std_strstream.h ext/ropeimpl.h ext/stl_rope.h ext/stl_bvector.h bits/stl_config.h bits/stl_construct.h ext/stl_hashtable.h ext/stl_hash_fun.h ext/hash_map ext/hash_set ext/rope ext/slist ext/tree ext/bvector
base_headers = \
bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h \
bits/basic_string.h bits/std_string.h bits/string.tcc \
bits/generic_shadow.h bits/std_utility.h \
bits/std_complex.h \
bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h \
bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h \
bits/gslice.h bits/gslice_array.h bits/indirect_array.h \
bits/exception_support.h \
bits/std_fstream.h bits/std_iomanip.h \
bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc \
bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h \
bits/std_istream.h bits/istream.tcc bits/std_locale.h \
bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc \
bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h \
bits/streambuf.tcc bits/basic_file.h \
bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h \
bits/stl_pthread_alloc.h bits/pthread_allocimpl.h \
bits/stl_threads.h bits/stl_iterator_base.h \
backward/algo.h backward/algobase.h backward/alloc.h \
backward/bvector.h backward/defalloc.h backward/deque.h \
backward/function.h backward/hash_map.h backward/hash_set.h \
backward/hashtable.h backward/heap.h backward/iterator.h \
backward/list.h backward/map.h backward/multimap.h backward/new.h \
backward/multiset.h backward/pair.h backward/iostream.h \
backward/rope.h backward/set.h backward/slist.h backward/stack.h \
backward/tempbuf.h backward/tree.h backward/vector.h \
backward/fstream.h \
bits/std_bitset.h bits/std_deque.h bits/std_functional.h \
bits/std_iterator.h bits/std_list.h \
bits/std_map.h bits/std_memory.h bits/std_numeric.h \
bits/std_queue.h bits/std_set.h bits/std_stack.h \
bits/std_stdexcept.h bits/std_vector.h \
bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h \
bits/stl_deque.h bits/stl_function.h \
bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h \
bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h \
bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h \
bits/stl_relops.h bits/stl_set.h \
bits/stl_stack.h bits/stl_string_fwd.h bits/stl_tempbuf.h \
bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h \
bits/type_traits.h bits/stl_range_errors.h bits/std_algorithm.h \
bits/concept_checks.h bits/container_concepts.h \
bits/sequence_concepts.h bits/std_strstream.h \
ext/ropeimpl.h ext/stl_rope.h \
ext/stl_bvector.h bits/stl_config.h bits/stl_construct.h \
ext/stl_hashtable.h ext/stl_hash_fun.h \
ext/hash_map ext/hash_set ext/rope ext/slist \
ext/tree ext/bvector
c_base_headers = bits/std_cassert.h bits/std_cctype.h bits/std_cerrno.h bits/std_cfloat.h bits/std_climits.h bits/std_clocale.h bits/std_cmath.h bits/std_csetjmp.h bits/std_csignal.h bits/std_cstdarg.h bits/std_cstddef.h bits/std_cstdio.h bits/std_cstdlib.h bits/std_cstring.h bits/std_ctime.h bits/std_cwchar.h bits/std_cwctype.h
c_base_headers = \
bits/std_cassert.h bits/std_cctype.h bits/std_cerrno.h \
bits/std_cfloat.h bits/std_climits.h bits/std_clocale.h \
bits/std_cmath.h bits/std_csetjmp.h bits/std_csignal.h \
bits/std_cstdarg.h bits/std_cstddef.h bits/std_cstdio.h \
bits/std_cstdlib.h bits/std_cstring.h bits/std_ctime.h \
bits/std_cwchar.h bits/std_cwctype.h
c_shadow_headers = assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h wchar.h wctype.h fcntl.h libio.h iolibio.h libioP.h pthread.h iconv.h features.h langinfo.h bits/wrap_libio.h bits/wrap_iolibio.h bits/wrap_libioP.h bits/wrap_iconv.h bits/wrap_fcntl.h bits/wrap_pthread.h bits/wrap_features.h bits/wrap_langinfo.h sys/cdefs.h
c_shadow_headers = \
assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h \
signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h wchar.h \
wctype.h fcntl.h libio.h iolibio.h libioP.h pthread.h iconv.h \
features.h langinfo.h \
bits/wrap_libio.h bits/wrap_iolibio.h bits/wrap_libioP.h \
bits/wrap_iconv.h bits/wrap_fcntl.h bits/wrap_pthread.h \
bits/wrap_features.h bits/wrap_langinfo.h \
sys/cdefs.h
@GLIBCPP_USE_CSHADOW_TRUE@c_headers = $(c_base_headers) $(c_shadow_headers)
@GLIBCPP_USE_CSHADOW_FALSE@c_headers = $(c_base_headers)
@GLIBCPP_USE_CSHADOW_TRUE@c_headers = @GLIBCPP_USE_CSHADOW_TRUE@$(c_base_headers) $(c_shadow_headers)
@GLIBCPP_USE_CSHADOW_FALSE@c_headers = @GLIBCPP_USE_CSHADOW_FALSE@$(c_base_headers)
std_headers = algorithm bitset complex deque fstream functional iomanip ios iosfwd iostream istream iterator limits list locale map memory numeric ostream queue set sstream stack stdexcept streambuf string strstream utility valarray vector cassert cctype cerrno cfloat climits clocale ciso646 cmath csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime cwchar cwctype
std_headers = \
algorithm bitset complex deque fstream functional \
iomanip ios iosfwd iostream istream iterator limits list locale \
map memory numeric ostream queue set sstream stack stdexcept \
streambuf string strstream utility valarray vector \
cassert cctype cerrno cfloat climits clocale ciso646 \
cmath csetjmp csignal cstdarg cstddef cstdio cstdlib \
cstring ctime cwchar cwctype
@GLIBCPP_NEED_LIBIO_TRUE@libio_headers = $(top_srcdir)/libio/_G_config.h $(top_srcdir)/libio/libio.h
@GLIBCPP_NEED_LIBIO_TRUE@libio_headers = @GLIBCPP_NEED_LIBIO_TRUE@\
@GLIBCPP_NEED_LIBIO_TRUE@ $(top_srcdir)/libio/_G_config.h $(top_srcdir)/libio/libio.h
@GLIBCPP_NEED_LIBIO_FALSE@libio_headers =
build_headers = bits/std_limits.h bits/c++config.h bits/c++io.h bits/c++threads.h bits/atomicity.h bits/os_defines.h bits/ctype_base.h bits/ctype_noninline.h bits/ctype_inline.h
build_headers = \
bits/std_limits.h bits/c++config.h bits/c++io.h bits/c++threads.h \
bits/atomicity.h bits/os_defines.h \
bits/ctype_base.h bits/ctype_noninline.h bits/ctype_inline.h
headers = $(base_headers) $(c_headers)
sources = limitsMEMBERS.cc cmath.cc complex.cc complexf.cc complexl.cc complex_io.cc stdexcept.cc c++io.cc ios.cc stdstreams.cc strstream.cc locale.cc localename.cc codecvt.cc locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc string-inst.cc
sources = \
limitsMEMBERS.cc \
cmath.cc \
complex.cc complexf.cc complexl.cc complex_io.cc \
stdexcept.cc \
c++io.cc ios.cc stdstreams.cc strstream.cc \
locale.cc localename.cc codecvt.cc \
locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc string-inst.cc
wstring_sources = wstring-inst.cc
wstring_sources = \
wstring-inst.cc
VPATH = $(top_srcdir) $(top_srcdir)/src $(GLIBCPP_INCLUDE_DIR) $(GLIBCPP_INCLUDE_DIR)/std $(C_INCLUDE_DIR)
@ -181,24 +268,32 @@ libstdc___la_SOURCES = $(sources)
libinst_wstring_la_SOURCES = $(wstring_sources)
libstdc___la_LIBADD = ../libmath/libmath.la ../libio/libio.la ../libsupc++/libsupc++convenience.la @libinst_wstring_la@
libstdc___la_LIBADD = \
../libmath/libmath.la ../libio/libio.la \
../libsupc++/libsupc++convenience.la \
@libinst_wstring_la@
libstdc___la_LDFLAGS = -version-info 3:0:0 -lm
libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
@GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_H = $(top_builddir)/stamp-cshadow
@GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_H = @GLIBCPP_USE_CSHADOW_TRUE@$(top_builddir)/stamp-cshadow
@GLIBCPP_USE_CSHADOW_FALSE@CSHADOW_H =
@GXX_INCLUDE_DIR_TRUE@myincludep = @gxx_include_dir@
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@myincludep = $(libdir)/gcc-lib/$(target_alias)/@gcc_version@/include/g++
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@myincludep = $(prefix)/include/g++-@libstdcxx_interface@
@GXX_INCLUDE_DIR_TRUE@myincludep = @GXX_INCLUDE_DIR_TRUE@@gxx_include_dir@
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@myincludep = @GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@$(libdir)/gcc-lib/$(target_alias)/@gcc_version@/include/g++
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@myincludep = @GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@$(prefix)/include/g++-@libstdcxx_interface@
# 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. (ie, --enable-debug)
AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
AM_CXXFLAGS = \
-fno-implicit-templates \
$(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
$(CONFIG_CXXFLAGS)
# libstdc++ libtool notes
@ -219,14 +314,16 @@ AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS)
# 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
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We have a problem when building the shared libstdc++ object if
# the rules automake generates would be used. We cannot allow CXX to
# be used in libtool since this would add -lstdc++ to the link line
# which of course is problematic at this point.
CXXLINK = $(LIBTOOL) --mode=link "$(CC)" @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
CXXLINK = $(LIBTOOL) --mode=link "$(CC)" \
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h