Commit c4c064e7 by Benjamin Kosnik Committed by Benjamin Kosnik

03-06-16 Benjamin Kosnik <bkoz@redhat.com>

	* Makefile.am (check-abi): Move...
	(new-abi-baseline): Move...
	* testsuite/Makefile.am: ...here.
	(new-abi-baseline): Conditionalize.
	(check-abi): Conditionalize.
	(check-abi-verbose): New.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* configure.in: Consolidate testsuite configure bits.
	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Same.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
	* testsuite/abi_check.cc: Add --check-verbose.
	Only output detailed information if --check-verbose.

From-SVN: r68067
parent 5b0e2409
2003-06-16 Benjamin Kosnik <bkoz@redhat.com>
* Makefile.am (check-abi): Move...
(new-abi-baseline): Move...
* testsuite/Makefile.am: ...here.
(new-abi-baseline): Conditionalize.
(check-abi): Conditionalize.
(check-abi-verbose): New.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* configure.in: Consolidate testsuite configure bits.
* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Same.
* configure: Regenerate.
* aclocal.m4: Regenerate.
* testsuite/abi_check.cc: Add --check-verbose.
Only output detailed information if --check-verbose.
2003-06-16 Andreas Jaeger <aj@suse.de>
* testsuite/abi_check.cc: Create summary report.
......
......@@ -46,26 +46,6 @@ check-script-install: $(top_builddir)/mkcheck
cd testsuite; \
@glibcpp_builddir@/mkcheck 1)
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
baseline_file = @baseline_file@
check-abi: $(top_builddir)/testsuite/abi_check
-@(cd testsuite; \
@glibcpp_srcdir@/config/abi/extract_symvers \
../src/.libs/libstdc++.so \
./current_symbols.txt && \
./abi_check --check ./current_symbols.txt ${baseline_file})
new-abi-baseline:
-@(output=${baseline_file}; \
if test -f $${output}; then \
output=$${output}.new; \
t=`echo $${output} | sed 's=.*config/abi/=='`; \
echo "Baseline file already exists, writing to $${t} instead."; \
fi; \
@glibcpp_srcdir@/config/abi/extract_symvers \
src/.libs/libstdc++.so $${output})
# These rules are messy, but are hella worth it.
doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD}`; \
......
......@@ -121,6 +121,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
baseline_file = @baseline_file@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@
......@@ -150,10 +151,6 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
PWD = $${PWDCMD-pwd}
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
baseline_file = @baseline_file@
# Multilib support.
MAKEOVERRIDES =
......@@ -496,22 +493,6 @@ check-script-install: $(top_builddir)/mkcheck
-(chmod + $(top_builddir)/mkcheck; \
cd testsuite; \
@glibcpp_builddir@/mkcheck 1)
check-abi: $(top_builddir)/testsuite/abi_check
-@(cd testsuite; \
@glibcpp_srcdir@/config/abi/extract_symvers \
../src/.libs/libstdc++.so \
./current_symbols.txt && \
./abi_check --check ./current_symbols.txt ${baseline_file})
new-abi-baseline:
-@(output=${baseline_file}; \
if test -f $${output}; then \
output=$${output}.new; \
t=`echo $${output} | sed 's=.*config/abi/=='`; \
echo "Baseline file already exists, writing to $${t} instead."; \
fi; \
@glibcpp_srcdir@/config/abi/extract_symvers \
src/.libs/libstdc++.so $${output})
# These rules are messy, but are hella worth it.
doxygen:
......
......@@ -209,7 +209,7 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
#glibcpp_pch_comp=no
#enable_cheaders=c
#c_compatibility=no
enable_abi_check=no
#enable_abi_check=no
#enable_symvers=no
# Find platform-specific directories containing configuration info. In
......@@ -2049,20 +2049,33 @@ dnl the testsuite_hooks.h header.
dnl
dnl GLIBCPP_CONFIGURE_TESTSUITE [no args]
AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
GLIBCPP_CHECK_SETRLIMIT
# Look for setenv, so that extended locale tests can be performed.
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
if test x"$GLIBCPP_IS_CROSS_COMPILING" = xfalse; then
# Do checks for memory limit functions.
GLIBCPP_CHECK_SETRLIMIT
# Look for setenv, so that extended locale tests can be performed.
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
fi
# Export file names for ABI checking.
baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)/baseline_symbols.txt"
AC_SUBST(baseline_file)
dnl XXX move to configure.host?
case "$target" in
*-*-cygwin* ) enable_abi_check=no ;;
* ) enable_abi_check=yes ;;
esac
# Determine if checking the ABI is desirable.
if test x$enable_symvers = xno; then
enable_abi_check=no
else
case "$host" in
*-*-cygwin*)
enable_abi_check=no ;;
*)
enable_abi_check=yes ;;
esac
fi
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
AM_CONDITIONAL(GLIBCPP_TEST_ABI, test "$enable_abi_check" = yes)
])
......
......@@ -221,7 +221,7 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
#glibcpp_pch_comp=no
#enable_cheaders=c
#c_compatibility=no
enable_abi_check=no
#enable_abi_check=no
#enable_symvers=no
# Find platform-specific directories containing configuration info. In
......@@ -2061,20 +2061,33 @@ dnl the testsuite_hooks.h header.
dnl
dnl GLIBCPP_CONFIGURE_TESTSUITE [no args]
AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
GLIBCPP_CHECK_SETRLIMIT
# Look for setenv, so that extended locale tests can be performed.
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
if test x"$GLIBCPP_IS_CROSS_COMPILING" = xfalse; then
# Do checks for memory limit functions.
GLIBCPP_CHECK_SETRLIMIT
# Look for setenv, so that extended locale tests can be performed.
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
fi
# Export file names for ABI checking.
baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)/baseline_symbols.txt"
AC_SUBST(baseline_file)
dnl XXX move to configure.host?
case "$target" in
*-*-cygwin* ) enable_abi_check=no ;;
* ) enable_abi_check=yes ;;
esac
# Determine if checking the ABI is desirable.
if test x$enable_symvers = xno; then
enable_abi_check=no
else
case "$host" in
*-*-cygwin*)
enable_abi_check=no ;;
*)
enable_abi_check=yes ;;
esac
fi
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
AM_CONDITIONAL(GLIBCPP_TEST_ABI, test "$enable_abi_check" = yes)
])
......
......@@ -431,14 +431,14 @@ else
])
AC_FUNC_MMAP
# Establish limits on memory usage during 'make check'
GLIBCPP_CONFIGURE_TESTSUITE
fi
# This depends on the possibly-skipped linker test above.
# This depends on GLIBCPP_CHECK_LINKER_FEATURES, but without it assumes no.
GLIBCPP_ENABLE_SYMVERS([yes])
# This depends on GLIBCPP_ENABLE_SYMVERS and GLIBCPP_IS_CROSS_COMPILING.
GLIBCPP_CONFIGURE_TESTSUITE
# Propagate the target-specific source directories through the build chain.
# (Nothing currently uses cpu_include_dir directly; only ATOMICITYH
# uses it, and it only gets used in this file.)
......@@ -447,15 +447,11 @@ ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
AC_SUBST(OS_INC_SRCDIR)
AC_SUBST(ATOMICITY_INC_SRCDIR)
# Set up cross-compile flags and all AM_CONDITIONALs.
# Determine cross-compile flags and all AM_CONDITIONALs.
AC_SUBST(GLIBCPP_IS_CROSS_COMPILING)
AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
dnl from GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT:
AM_CONDITIONAL(GLIBCPP_BUILD_LIBMATH, test "$need_libmath" = yes)
dnl from GLIBCPP_CHECK_WCHAR_T_SUPPORT:
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
dnl from GLIBCPP_CONFIGURE_TESTSUITE:
AM_CONDITIONAL(GLIBCPP_BUILD_ABI_CHECK, test "$enable_abi_check" = yes)
AC_CACHE_SAVE
......
......@@ -54,23 +54,67 @@ noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
## Build support utilities.
## Only build this as native, as need to find startup files and libc to link.
if GLIBCPP_BUILD_ABI_CHECK
if GLIBCPP_TEST_ABI
noinst_PROGRAMS = abi_check
else
noinst_PROGRAMS =
endif
abi_check_SOURCES = abi_check.cc
all-local: stamp_wchar
# Enable wchar_t tests if capable.
if GLIBCPP_TEST_WCHAR_T
all-local: stamp_wchar
stamp_wchar:
touch testsuite_wchar_t
else
all-local:
stamp_wchar:
endif
# Override this so local rules are possible.
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU; \
$(MAKE) $(AM_MAKEFLAGS) check-local
check-local: check-abi
baseline_file = @baseline_file@
extract_symvers = @glibcpp_srcdir@/config/abi/extract_symvers
current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
-@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
baseline_symbols:
-@(output=${baseline_file}; \
if test ! -f $${output}; then \
echo "Baseline file doesn't exist."; \
echo "Try 'make new-abi-baseline' to create it."; \
exit 1; \
fi; \
touch baseline_symbols)
new-abi-baseline:
-@(output=${baseline_file}; \
if test -f $${output}; then \
output=$${output}.new; \
t=`echo $${output} | sed 's=.*config/abi/=='`; \
echo "Baseline file already exists, writing to $${t} instead."; \
fi; \
${extract_symvers} ../src/.libs/libstdc++.so $${output})
if GLIBCPP_TEST_ABI
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
check-abi: abi_check baseline_symbols current_symbols.txt
-@(./abi_check --check ./current_symbols.txt ${baseline_file})
check-abi-verbose: abi_check baseline_symbols current_symbols.txt
-@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file})
else
check-abi:
check-abi-verbose:
endif
stamp_wchar:
touch testsuite_wchar_t
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
......
......@@ -120,7 +120,6 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
baseline_file = @baseline_file@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@
......@@ -173,10 +172,13 @@ INCLUDES = \
noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
@GLIBCPP_BUILD_ABI_CHECK_TRUE@noinst_PROGRAMS = @GLIBCPP_BUILD_ABI_CHECK_TRUE@abi_check
@GLIBCPP_BUILD_ABI_CHECK_FALSE@noinst_PROGRAMS =
@GLIBCPP_TEST_ABI_TRUE@noinst_PROGRAMS = @GLIBCPP_TEST_ABI_TRUE@abi_check
@GLIBCPP_TEST_ABI_FALSE@noinst_PROGRAMS =
abi_check_SOURCES = abi_check.cc
baseline_file = @baseline_file@
extract_symvers = @glibcpp_srcdir@/config/abi/extract_symvers
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
testsuite_* site.exp abi_check
......@@ -194,7 +196,7 @@ LIBS = @LIBS@
libv3test_a_LIBADD =
libv3test_a_OBJECTS = testsuite_hooks.$(OBJEXT) \
testsuite_allocator.$(OBJEXT)
@GLIBCPP_BUILD_ABI_CHECK_FALSE@noinst_PROGRAMS =
@GLIBCPP_TEST_ABI_FALSE@noinst_PROGRAMS =
PROGRAMS = $(noinst_PROGRAMS)
abi_check_OBJECTS = abi_check.$(OBJEXT)
......@@ -386,7 +388,7 @@ info: info-am
dvi-am:
dvi: dvi-am
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check-local
check: check-am
installcheck-am:
installcheck: installcheck-am
......@@ -456,19 +458,58 @@ clean-libtool maintainer-clean-libtool mostlyclean-noinstPROGRAMS \
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
maintainer-clean-noinstPROGRAMS tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir check-DEJAGNU info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-info-am \
install-info install-exec-am install-exec install-data-am install-data \
install-am install uninstall-am uninstall all-local all-redirect all-am \
all installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
dvi-am dvi check-local check check-am installcheck-am installcheck \
install-info-am install-info install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-local all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
all-local: stamp_wchar
# Enable wchar_t tests if capable.
@GLIBCPP_TEST_WCHAR_T_TRUE@all-local: stamp_wchar
@GLIBCPP_TEST_WCHAR_T_FALSE@all-local:
@GLIBCPP_TEST_WCHAR_T_TRUE@stamp_wchar:
@GLIBCPP_TEST_WCHAR_T_TRUE@ touch testsuite_wchar_t
@GLIBCPP_TEST_WCHAR_T_FALSE@stamp_wchar:
# Override this so local rules are possible.
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU; \
$(MAKE) $(AM_MAKEFLAGS) check-local
check-local: check-abi
current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
-@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
baseline_symbols:
-@(output=${baseline_file}; \
if test ! -f $${output}; then \
echo "Baseline file doesn't exist."; \
echo "Try 'make new-abi-baseline' to create it."; \
exit 1; \
fi; \
touch baseline_symbols)
new-abi-baseline:
-@(output=${baseline_file}; \
if test -f $${output}; then \
output=$${output}.new; \
t=`echo $${output} | sed 's=.*config/abi/=='`; \
echo "Baseline file already exists, writing to $${t} instead."; \
fi; \
${extract_symvers} ../src/.libs/libstdc++.so $${output})
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
@GLIBCPP_TEST_ABI_TRUE@check-abi: abi_check baseline_symbols current_symbols.txt
@GLIBCPP_TEST_ABI_TRUE@ -@(./abi_check --check ./current_symbols.txt ${baseline_file})
stamp_wchar:
touch testsuite_wchar_t
@GLIBCPP_TEST_ABI_TRUE@check-abi-verbose: abi_check baseline_symbols current_symbols.txt
@GLIBCPP_TEST_ABI_TRUE@ -@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file})
@GLIBCPP_TEST_ABI_FALSE@check-abi:
@GLIBCPP_TEST_ABI_FALSE@check-abi-verbose:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
......@@ -313,17 +313,20 @@ main(int argc, char** argv)
using namespace std;
// Get arguments. (Heading towards getopt_long, I can feel it.)
string argv1;
if (argc < 4 || (string("--help") == (argv1 = argv[1])))
bool verbose = false;
string argv1 = argc > 1 ? argv[1] : "";
if (argv1 == "--help" || argc < 4)
{
cerr << "Usage: abi_check --check cur baseline\n"
" --help\n\n"
"Where CUR is a file containing the current results from\n"
cerr << "usage: abi_check --check current baseline\n"
" --check-verbose current baseline\n"
" --help\n\n"
"Where CURRENT is a file containing the current results from\n"
"extract_symvers, and BASELINE is one from config/abi.\n"
<< endl;
exit(1);
}
else if (argv1 == "--check-verbose")
verbose = true;
// Quick sanity/setup check for arguments.
const char* test_file = argv[2];
......@@ -412,21 +415,21 @@ main(int argc, char** argv)
}
// Report results.
if (added_names.size())
if (verbose && added_names.size())
{
cout << added_names.size() << " added symbols " << endl;
for (size_t j = 0; j < added_names.size() ; ++j)
report_symbol_info(test_symbols[added_names[j]], j + 1);
}
if (missing_names.size())
if (verbose && missing_names.size())
{
cout << missing_names.size() << " missing symbols " << endl;
for (size_t j = 0; j < missing_names.size() ; ++j)
report_symbol_info(baseline_symbols[missing_names[j]], j + 1);
}
if (incompatible.size ())
if (verbose && incompatible.size())
{
cout << incompatible.size() << " incompatible symbols " << endl;
for (size_t j = 0; j < incompatible.size() ; ++j)
......@@ -441,11 +444,13 @@ main(int argc, char** argv)
}
}
cout << "\n\t\t=== libstdc++-v3 check-abi Summary for " << baseline_file
<< " ===" << endl << endl;
cout << "\n\t\t=== libstdc++-v3 check-abi Summary ===" << endl;
cout << endl;
cout << "# of added symbols:\t\t " << added_names.size() << endl;
cout << "# of missing symbols:\t\t " << missing_names.size() << endl;
cout << "# of incompatible symbols:\t " << incompatible.size() << endl;
cout << endl;
cout << "using: " << baseline_file << endl;
return 0;
}
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