+2001-03-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * mkcheck.in (LIBTOOL): Don't construct -B argument here...
+ * tests_flags.in (CXX): Construct here.
+ (static_fail): Don't remove compile.out. Format with spaces.
+ (INCLUDES): Deal with xcompiling.
+ * configure.in (xcompiling): Substitute.
+ * testsuite/Makefile.am: Snake libjava configury.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/23_containers/map_operators.cc: Tweaks.
+ * testsuite/23_containers/set_operators.cc: Tweaks.
+
+2001-03-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
+
+ Enable dejagnu testing framework.
+ * configure.in: Generate testsuite/Makefile.
+ * configure: Regenerate.
+ * Makefile.am (check-install): Change rule from this...
+ (check-script-install): ...to this.
+ (check): Change rule from this...
+ (check-script):...to this.
+ * Makefile.in: Regenerate.
+
2001-03-28 Alexandre Oliva <aoliva@redhat.com>
* libsupc++/Makefile.am (CXXLINK): Add --tag disable-shared after
AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
-SUBDIRS = libio libmath libsupc++ src
+SUBDIRS = libio libmath libsupc++ src testsuite
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
# Use $${builddir} instead of $(top_builddir) for arguments to "mkcheck"
# because then the paths will be full pathnames, not relative
# pathnames. (-Wl,--rpath seems to like this better.)
-check: $(top_builddir)/mkcheck
+check-script: $(top_builddir)/mkcheck
-(chmod + $(top_builddir)/mkcheck; \
srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
cd testsuite; $${builddir}/mkcheck 0 $${builddir} $${srcdir})
-check-install: $(top_builddir)/mkcheck
+check-script-install: $(top_builddir)/mkcheck
-(chmod + $(top_builddir)/mkcheck; \
srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
+xcompiling = @xcompiling@
AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
-SUBDIRS = libio libmath libsupc++ src
+SUBDIRS = libio libmath libsupc++ src testsuite
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
# Use $${builddir} instead of $(top_builddir) for arguments to "mkcheck"
# because then the paths will be full pathnames, not relative
# pathnames. (-Wl,--rpath seems to like this better.)
-check: $(top_builddir)/mkcheck
+check-script: $(top_builddir)/mkcheck
-(chmod + $(top_builddir)/mkcheck; \
srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
cd testsuite; $${builddir}/mkcheck 0 $${builddir} $${srcdir})
-check-install: $(top_builddir)/mkcheck
+check-script-install: $(top_builddir)/mkcheck
-(chmod + $(top_builddir)/mkcheck; \
srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
CANADIAN_TRUE='#'
CANADIAN_FALSE=
fi
+
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for locale.h""... $ac_c" 1>&6
-echo "configure:15829: checking for locale.h" >&5
+echo "configure:15830: checking for locale.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15834 "configure"
+#line 15835 "configure"
#include "confdefs.h"
#include <locale.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:15857: checking for LC_MESSAGES" >&5
+echo "configure:15858: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15862 "configure"
+#line 15863 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:15869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_val_LC_MESSAGES=yes
else
glibcpp_toolexeclibdir=no
echo $ac_n "checking for interface version number""... $ac_c" 1>&6
-echo "configure:15914: checking for interface version number" >&5
+echo "configure:15915: checking for interface version number" >&5
libstdcxx_interface=$INTERFACE
echo "$ac_t""$libstdcxx_interface" 1>&6
# Process the option --with-gxx-include-dir=<path to include-files directory>
echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6
-echo "configure:15920: checking for --with-gxx-include-dir" >&5
+echo "configure:15921: checking for --with-gxx-include-dir" >&5
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
withval="$with_gxx_include_dir"
# Process the option "--enable-version-specific-runtime-libs"
echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
-echo "configure:15944: checking for --enable-version-specific-runtime-libs" >&5
+echo "configure:15945: checking for --enable-version-specific-runtime-libs" >&5
# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
if test "${enable_version_specific_runtime_libs+set}" = set; then
enableval="$enable_version_specific_runtime_libs"
fi
echo $ac_n "checking for install location""... $ac_c" 1>&6
-echo "configure:15984: checking for install location" >&5
+echo "configure:15985: checking for install location" >&5
echo "$ac_t""$gxx_include_dir" 1>&6
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "tests_flags mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "tests_flags mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile testsuite/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
s%@NATIVE_FALSE@%$NATIVE_FALSE%g
s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
+s%@xcompiling@%$xcompiling%g
s%@gxx_include_dir@%$gxx_include_dir%g
s%@glibcpp_toolexecdir@%$glibcpp_toolexecdir%g
s%@glibcpp_toolexeclibdir@%$glibcpp_toolexeclibdir%g
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"tests_flags mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"tests_flags mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile testsuite/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes)
AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
+AC_SUBST(xcompiling)
AC_CACHE_SAVE
AC_LC_MESSAGES
# installed in the correct place. To work around this not being passed
# down from config-ml.in -> top_srcdir/Makefile.am ->
# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
-AC_OUTPUT(tests_flags mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile,
+AC_OUTPUT(tests_flags mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile testsuite/Makefile,
[if test -n "$CONFIG_FILES"; then
ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
grep '^MULTISUBDIR =' Makefile >> src/Makefile
ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
+xcompiling = @xcompiling@
AUTOMAKE_OPTIONS = 1.3 cygnus
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
+xcompiling = @xcompiling@
AUTOMAKE_OPTIONS = 1.3 cygnus
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
+xcompiling = @xcompiling@
AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
# 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) -fdiagnostics-show-location=once
+WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
LIBIO_INCLUDES = @LIBIO_INCLUDES@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-INCLUDES = \
- -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
- -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include \
- $(LIBSUPCXX_INCLUDES)
-
-
-headers = \
- exception new typeinfo cxxabi.h exception_defines.h
-
-
-sources = \
- del_op.cc \
- del_opnt.cc \
- del_opv.cc \
- del_opvnt.cc \
- eh_alloc.cc \
- eh_aux_runtime.cc \
- eh_catch.cc \
- eh_exception.cc \
- eh_globals.cc \
- eh_personality.cc \
- eh_terminate.cc \
- eh_throw.cc \
- new_handler.cc \
- new_op.cc \
- new_opnt.cc \
- new_opv.cc \
- new_opvnt.cc \
- pure.cc \
- tinfo.cc \
- tinfo2.cc \
- vec.cc
+INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES)
+
+
+headers = exception new typeinfo cxxabi.h exception_defines.h
+
+
+sources = del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.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)
# 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
#
# We have to put --tag disable-shared after --tag CXX lest things
# CXX undo the affect of disable-shared.
-LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
- --mode=compile $(CXX) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=compile $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We'd have a problem when building the shared libstdc++ object if
# course is problematic at this point. So, we get the top-level
# directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver.
-CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
- --mode=link $(CXX) \
- @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared --mode=link $(CXX) @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
BUILD_DIR=$1; SRC_DIR=$2; PREFIX_DIR=$3; CXX=$4; CXXFLAGS=$5; INCLUDES=$6; LIBS=$7;
IFS=$saved_ifs
-# Build libtoolized surrogates to compile and run testcases. Also,
-# adjust CXX so that the newly built compiler can find headers.
-if [ x$WHICH = x0 ] ; then
- CXX="$CXX -B`dirname $CXX`/"
-fi
LIBTOOL="$BUILD_DIR/libtool"
LTEXE="$LIBTOOL --mode=execute"
LTCXX="$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $INCLUDES $LIBS"
# Remove old executables.
rm -rf "$TEST_DIR"/*exe
+rm -rf "$TEST_DIR"/compile.out
# Remove old core files (which now get left in cwd, not $TEST_DIR).
rm -rf ./*core*
# time_t's (no more overhead than grabbing two date(1)'s).
compiler_invocation="$LTCXX $S_FLAG $SRC_NAME -o $EXENAME"
COMP_TIME_START=$($TIMER_COMMAND)
+ echo $SRC_NAME >> compile.out
$compiler_invocation >> compile.out 2>&1
+ echo "" >> compile.out
COMP_TIME_END=$($TIMER_COMMAND)
if [ $COMP_TIME_START -lt $COMP_TIME_END ]; then
fi
if [ -f $EXENAME ]; then
- rm compile.out
+# rm compile.out
size_command TEXT
size_command DATA
size_command SIZE
else
# the file did not compile/link.
printf "\n" >> $LOG_FILE
- `cat compile.out >> $LOG_FILE`
- rm compile.out
+# `cat compile.out >> $LOG_FILE`
+# rm compile.out
RESULT="-b"
TEXT="0"
DATA="0"
ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
+xcompiling = @xcompiling@
AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-I${SRC_DIR}/include/std -I${SRC_DIR}/include/$C_DIR
-I${SRC_DIR}/libsupc++ -I${SRC_DIR}/libio
-I${SRC_DIR}/testsuite"
+ if test x@xcompiling@ == x1; then
+ INCLUDES="${INCLUDES} -I${SRC_DIR}/../newlib/libc/include"
+ fi
;;
esac
# LIB_PATH == where to find the C++ build libraries for libtool's use
# GCC_LIB_PATH == where to find the gcc build libraries for libtool's use
-# CXX == the full pathname of the compiler
+# CXX == how to invoke the compiler
case ${query} in
--built-library)
LIB_PATH=${BUILD_DIR}/src
GCC_LIB_PATH=${BUILD_DIR}/../../gcc
- CXX="${BUILD_DIR}/../../gcc/g++"
+ CXX="${BUILD_DIR}/../../gcc/g++ -B${BUILD_DIR}/../../gcc/"
;;
--installed-library)
LIB_PATH=${PREFIX_DIR}/lib
;;
esac
-# gcc compiler flags (maybe use glibcpp_cxxflags from configure.target,
-# but that's really meant for building the library itself, not using it)
+# CXXFLAGS == run the testsuite with any special configuration
+# flags from the library build.
CXXFLAGS="-ggdb3 -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
-# LIBS == any extra needed -l switches, etc (may need more libs, lose lose)
+# LIBS == any extra may needed -L switches
case ${query} in
--built-library)
LIBS="${LIB_PATH}/libstdc++.la -no-install -rpath ${GCC_LIB_PATH}"
// 2000-09-07 bgarcia@laurelnetworks.com
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
mapByIndex.insert(std::pair<unsigned, int>(6, 5));
std::map<unsigned, int>::iterator itr(mapByIndex.begin());
-
- test &= itr != mapByName.end(); // XXX - notice, it's not mapByIndex!!
- test &= itr == mapByName.end(); // XXX - notice, it's not mapByIndex!!
- return 0;
+ // NB: notice, it's not mapByIndex!!
+ test &= itr != mapByName.end(); // ERROR - * XFAIL *-*-*
+ test &= itr == mapByName.end(); // ERROR - * XFAIL *-*-*
}
// http://gcc.gnu.org/ml/libstdc++/2000-11/msg00093.html
void test02()
{
- typedef std::map<int,const int> MapInt;
-
- MapInt m;
-
- for (unsigned i=0;i<10;++i)
- m.insert(MapInt::value_type(i,i));
-
- for (MapInt::const_iterator i=m.begin();i!=m.end();++i)
- std::cerr << i->second << ' ';
-
- for (MapInt::const_iterator i=m.begin();m.end()!=i;++i)
- std::cerr << i->second << ' ';
+ typedef std::map<int,const int> MapInt;
+
+ MapInt m;
+
+ for (unsigned i=0;i<10;++i)
+ m.insert(MapInt::value_type(i,i));
+
+ for (MapInt::const_iterator i=m.begin();i!=m.end();++i)
+ std::cerr << i->second << ' ';
+
+ for (MapInt::const_iterator i=m.begin();m.end()!=i;++i)
+ std::cerr << i->second << ' ';
}
int main()
// 2000-09-07 bgarcia@laurelnetworks.com
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// map and set
// libstdc++/86: map & set iterator comparisons are not type-safe
-// XXX this is XFAIL for the time being, ie this should not compile
int main(void)
{
bool test = true;
std::set<unsigned int>::iterator itr(setByIndex.begin());
- test &= itr != setByName.end(); // XXX - notice, it's not setByIndex!!
- test &= itr == setByName.end(); // XXX - notice, it's not setByIndex!!
+ // NB: it's not setByIndex!!
+ test &= itr != setByName.end(); // ERROR - * XFAIL *-*-*
+ test &= itr == setByName.end(); // ERROR - * XFAIL *-*-*
return 0;
}
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-AUTOMAKE_OPTIONS = 1.3 cygnus dejagnu
+AUTOMAKE_OPTIONS = foreign dejagnu no-installinfo
DEJATOOL = libstdc++
-RUNTEST = runtest
+EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
+ echo $(top_builddir)/../expect/expect ; \
+ else echo expect ; fi`
+
+RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
+ echo $(top_srcdir)/../dejagnu/runtest ; \
+ else echo runtest; fi`
-# Copyright (C) 1997 Free Software Foundation, Inc.
+# Copyright (C) 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Please email any bugs, comments, and/or additions to this file to:
# bug-gcc@prep.ai.mit.edu
-load_lib "dg.exp"
+load_lib "standard.exp"
+
## The global associative array lib_env contains the totality
## of options necessary to run testcases; the meanings of which are
## as follows:
-## lib_env(CXX) The compiler used to run testcases.
-## lib_env(CXXFLAGS) Special flags passed to the compiler.
-## lib_env(INCLUDES) Includes options to pass to the compiler.
-## lib_env(LDFLAGS) Additional library flags.
-## lib_env(LIBTOOL) Path to the `libtool' script.
-## lib_env(SRC_DIR) Where V3 master source lives.
-## lib_env(BUILD_DIR) Where V3 is built.
-## lib_env(static) Flags to pass to the linker to build a
-## statically linked executable.
-## lib_env(shared) Flags to pass to the linker to build a
-## dynamically linked executable.
+## lib_env(CXX) The compiler used to run testcases.
+## lib_env(CXXFLAGS) Special flags passed to the compiler.
+## lib_env(INCLUDES) Includes options to pass to the compiler.
+## lib_env(LDFLAGS) Additional library flags.
+## lib_env(LIBTOOL) Path to the `libtool' script.
+## lib_env(SRC_DIR) Where V3 master source lives.
+## lib_env(BUILD_DIR) Where V3 is built.
+## lib_env(static) Flags to pass to the linker to build a
+## statically linked executable.
+## lib_env(shared) Flags to pass to the linker to build a
+## dynamically linked executable.
## lib_env(testcase_options) Options specified by current testcase.
-## These are specified through the @xxx@-keywords.
+## These are specified through the @xxx@-keywords.
load_lib dg.exp
# By default, we assume we want to run program images.
set dg-do-what-default run
- # Get out the source and the build directories.
+ # Get the source and the build directories.
set src-dir [lookfor_file $srcdir libstdc++-v3]
set build-dir [lookfor_file $outdir libstdc++-v3]
# mkcheck.in used to output these information.
set output [remote_exec host $lib_env(CXX) -v]
- if { [lindex $output 0] == 0 } {
- set output [lindex $output 1]
- regexp "gcc version.*$" $output version
- regsub "\n+" $version "" version
- clone_output "Compiler: $version"
- clone_output "Compiler flags: $lib_env(CXXFLAGS)"
- } else {
- perror "Cannot determine compiler version: [lindex $output 1]"
- }
+# XXX don't try clever formatting hacks at the moment
+# if { [lindex $output 0] == 0 } {
+# set output [lindex $output 1]
+# regexp "gcc version.*$" $output version
+# regsub "\n+" $version "" version
+# clone_output "Compiler: $version"
+# clone_output "Compiler flags: $lib_env(CXXFLAGS)"
+# } else {
+# perror "Cannot determine compiler version: [lindex $output 1]"
+# }
}
## dg.exp callback. Called from dg-test to run PROGRAM.
set lib_env(shared) ""
set lib_env(LIBTOOL) "$lib_env(BUILD_DIR)/libtool"
- set lib_env(FLAGS) "$lib_env(CXX) -B$lib_env(BUILD_DIR)/ \
+ set lib_env(FLAGS) "$lib_env(CXX) \
$lib_env(INCLUDES) $lib_env(CXXFLAGS)"
} else {
perror "$output"
}
###
-### The following is an abominal hack, non-recomandable software practice.
+### The following is an abominable hack, non-commendable software practice.
### This is supposed to be a very-very short term solution.
### Please, do not add any piece of code without my approval.
### -- Gaby
libstdc++_runtest [glob -nocomplain $srcdir/*]
dg-finish
+