2077db1be5
Commit the vtable verification feature. This feature is designed to detect, at run time, if/when the vtable pointer in a C++ object has been corrupted, before allowing virtual calls through that pointer. If pointer corruption is detected, execution of the program is halted. libstdc++-v3 ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * fragment.am: Add XTEMPLATE_FLAGS. * configure.ac: Add definitions for --enable-vtable-verify. * acinclude.m4: Add --enable-vtable-verify and --disable-vtable-verify; define --enable-vtable-verify; define VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS. * config/abi/pre/gnu.ver: Export symbols for vtable verification. * libsupc++/Makefile.am: Define vtv_sources and add it to libsupc___la_SOURCES and libsupc__convenience_la_SOURCES. * libsupc++/vtv_stubs.cc: New file. * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS. * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXLINKFLAGS to CXXLINK. * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK. * src/C++11/Makefile.am: Ditto. * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify. * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS. * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate libvtv if --enable-vtable-verify was used; set cxxvtvflags; add cxxvtvflags to cxx_final. * testsuite/18_support/bad_exception/23591_thread-1.c: Add -fvtable-verify=none to compiler flags. * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none to compiler flags. * configure: Regenerated. * Makefile.in: Regenerated. * python/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * config.h.in: Regenerated. * po/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. top level ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * configure.ac: Add target-libvtv to target_libraries; disable libvtv on non-linux systems; add target-libvtv to noconfigdirs; add libsupc++/.libs to C++ library search paths. * configure: Regenerated. * Makefile.def: Add libvtv to target_modules; make libvtv depend on libstdc++ and libgcc. * Makefile.in: Regenerated. include/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * vtv-change-permission.h: New file. contrib/ChangeLog: 2013-08-06 Caroline Tice4 <cmtice@google.com> * gcc_update: Add libvtv files. libgcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> config.host (extra_parts): Add vtv_start.o, vtv_end.o vtv_start_preinit.o and vtv_end_preinit.o. configure.ac: Add code to check/set enable_vtable_verify. Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is true. vtv_start_preinit.c: New file. vtv_end_preinit.c: New file. vtv_start.c: New file. vtv_end.c: New file. configure: Regenerated. gcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * gcc.c (VTABLE_VERIFICATION_SPEC): New definition. (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC. * tree-pass.h: Add pass_vtable_verify. * varasm.c (assemble_variable): Add code to properly set the comdat section and name for the .vtable_map_vars section. (assemble_vtyv_preinit_initializer): New function. (default_sectin_type_flags): Make sure .vtable_map_vars section has LINK_ONCE flag. * output.h: Add function decl for assemble_vtv_preinit_initializer. * vtable-verify.c: New file. * vtable-verify.h: New file. * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify initialiation levels. * timevar.def (TV_VTABLE_VERIFICATION): New definition. * passes.def: Insert pass_vtable_verify. * aclocal.m4: Reorder includes. * doc/invoke.texi: Add documentation for the flags -fvtable-verify=, -fvtv-debug and -fvtv-counts. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o, as appropriate, if -fvtable-verify=... is used. (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if -fvtable-verify=... is used. * Makefile.in (OBJS): Add vtable-verify.o to list. (vtable-verify.o): Add new build rule. (GTFILES): Add vtable-verify.c to list. * common.opt (fvtable-verify=): New flag. (vtv_priority): Values for fvtable-verify= flag. (fvtv-counts): New flag. (fvtv-debug): New flag. * tree.h (save_vtable_map_decl): New extern function decl. gcc/cp/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to list. (vtable-class-hierarchy.o): Add build rule. * cp-tree.h (vtv_start_verification_constructor_init_function): New extern function decl. (vtv_finish_verification_constructor_init_function): New extern function decl. (build_vtbl_address): New extern function decl. (get_mangled_vtable_map_var_name): New extern function decl. (vtv_compute_class_hierarchy_transitive_closure): New extern function decl. (vtv_generate_init_routine): New extern function decl. (vtv_save_class_info): New extern function decl. (vtv_recover_class_info): New extern function decl. (vtv_build_vtable_verify_fndecl): New extern function decl. * class.c (finish_struct_1): Add call to vtv_save_class_info if flag_vtable_verify is true. * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list. * vtable-class-hierarchy.c: New file. * mangle.c (get_mangled_vtable_map_var_name): New function. * decl2.c (start_objects): Update function comment. (cp_write_global_declarations): Call vtv_recover_class_info, vtv_compute_class_hierarchy_transitive_closure and vtv_build_vtable_verify_fndecl, before calling finalize_compilation_unit, and call vtv_generate_init_rount after, IFF flag_vtable_verify is true. (vtv_start_verification_constructor_init_function): New function. (vtv_finish_verification_constructor_init_function): New function. * init.c (build_vtbl_address): Remove static qualifier from function. libvtv/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> Initial check-in of new vtable verification feature. * configure.ac : New file. * acinclude.m4 : New file. * Makefile.am : New file. * aclocal.m4 : New file. * configure.tgt : New file. * configure: New file (generated). * Makefile.in: New file (generated). * vtv_set.h : New file. * vtv_utils.cc : New file. * vtv_utils.h : New file. * vtv_malloc.cc : New file. * vtv_rts.cc : New file. * vtv_malloc.h : New file. * vtv_rts.h : New file. * vtv_fail.cc : New file. * vtv_fail.h : New file. * vtv_map.h : New file. * scripts/run-testsuite.sh : New file. * scripts/sum-vtv-counts.c : New file. * testsuite/parts-test-main.h : New file. * testusite/dataentry.cc : New file. * testsuite/temp_deriv.cc : New file. * testsuite/register_pair.cc : New file. * testsuite/virtual_inheritance.cc : New file. * testsuite/field-test.cc : New file. * testsuite/nested_vcall_test.cc : New file. * testsuite/template-list-iostream.cc : New file. * testsuite/register_pair_inserts.cc : New file. * testsuite/register_pair_inserts_mt.cc : New file. * testsuite/event.list : New file. * testsuite/parts-test-extra-parts-views.cc : New file. * testsuite/parts-test-extra-parts-views.h : New file. * testsuite/environment-fail-32.s : New file. * testsuite/parts-test-extra-parts.h : New file. * testsuite/temp_deriv2.cc : New file. * testsuite/dlopen_mt.cc : New file. * testsuite/event.h : New file. * testsuite/template-list.cc : New file. * testsuite/replace-fail.cc : New file. * testsuite/Makefile.am : New file. * testsuite/Makefile.in: New file (generated). * testsuite/mempool_negative.c : New file. * testsuite/parts-test-main.cc : New file. * testsuite/event-private.cc : New file. * testsuite/thunk.cc : New file. * testsuite/event-defintiions.cc : New file. * testsuite/event-private.h : New file. * testsuite/parts-test.list : New file. * testusite/register_pair_mt.cc : New file. * testsuite/povray-derived.cc : New file. * testsuite/event-main.cc : New file. * testsuite/environment.cc : New file. * testsuite/template-list2.cc : New file. * testsuite/thunk_vtable_map_attack.cc : New file. * testsuite/parts-test-extra-parts.cc : New file. * testsuite/environment-fail-64.s : New file. * testsuite/dlopen.cc : New file. * testsuite/so.cc : New file. * testsuite/temp_deriv3.cc : New file. * testsuite/const_vtable.cc : New file. * testsuite/mempool_positive.c : New file. * testsuite/dup_name.cc : New file. From-SVN: r201555
684 lines
22 KiB
Makefile
684 lines
22 KiB
Makefile
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
|
# @configure_input@
|
|
|
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
|
# Inc.
|
|
# This Makefile.in is free software; the Free Software Foundation
|
|
# gives unlimited permission to copy and/or distribute it,
|
|
# with or without modifications, as long as this notice is preserved.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
# PARTICULAR PURPOSE.
|
|
|
|
@SET_MAKE@
|
|
VPATH = @srcdir@
|
|
pkgdatadir = $(datadir)/@PACKAGE@
|
|
pkgincludedir = $(includedir)/@PACKAGE@
|
|
pkglibdir = $(libdir)/@PACKAGE@
|
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
install_sh_DATA = $(install_sh) -c -m 644
|
|
install_sh_PROGRAM = $(install_sh) -c
|
|
install_sh_SCRIPT = $(install_sh) -c
|
|
INSTALL_HEADER = $(INSTALL_DATA)
|
|
transform = $(program_transform_name)
|
|
NORMAL_INSTALL = :
|
|
PRE_INSTALL = :
|
|
POST_INSTALL = :
|
|
NORMAL_UNINSTALL = :
|
|
PRE_UNINSTALL = :
|
|
POST_UNINSTALL = :
|
|
build_triplet = @build@
|
|
host_triplet = @host@
|
|
target_triplet = @target@
|
|
DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
|
|
$(srcdir)/Makefile.am
|
|
subdir = testsuite
|
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
|
|
$(top_srcdir)/../config/enable.m4 \
|
|
$(top_srcdir)/../config/futex.m4 \
|
|
$(top_srcdir)/../config/iconv.m4 \
|
|
$(top_srcdir)/../config/lead-dot.m4 \
|
|
$(top_srcdir)/../config/lib-ld.m4 \
|
|
$(top_srcdir)/../config/lib-link.m4 \
|
|
$(top_srcdir)/../config/lib-prefix.m4 \
|
|
$(top_srcdir)/../config/lthostflags.m4 \
|
|
$(top_srcdir)/../config/multi.m4 \
|
|
$(top_srcdir)/../config/no-executables.m4 \
|
|
$(top_srcdir)/../config/override.m4 \
|
|
$(top_srcdir)/../config/stdint.m4 \
|
|
$(top_srcdir)/../config/unwind_ipinfo.m4 \
|
|
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
|
|
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
|
|
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
|
|
$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
|
|
$(top_srcdir)/../config/gc++filt.m4 \
|
|
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
|
|
$(top_srcdir)/configure.ac
|
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
$(ACLOCAL_M4)
|
|
CONFIG_HEADER = $(top_builddir)/config.h
|
|
CONFIG_CLEAN_FILES =
|
|
CONFIG_CLEAN_VPATH_FILES =
|
|
depcomp =
|
|
am__depfiles_maybe =
|
|
SOURCES =
|
|
ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
|
|
ACLOCAL = @ACLOCAL@
|
|
ALLOCATOR_H = @ALLOCATOR_H@
|
|
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
|
AMTAR = @AMTAR@
|
|
AR = @AR@
|
|
AS = @AS@
|
|
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
|
|
ATOMIC_FLAGS = @ATOMIC_FLAGS@
|
|
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
|
|
AUTOCONF = @AUTOCONF@
|
|
AUTOHEADER = @AUTOHEADER@
|
|
AUTOMAKE = @AUTOMAKE@
|
|
AWK = @AWK@
|
|
BASIC_FILE_CC = @BASIC_FILE_CC@
|
|
BASIC_FILE_H = @BASIC_FILE_H@
|
|
CC = @CC@
|
|
CCODECVT_CC = @CCODECVT_CC@
|
|
CCOLLATE_CC = @CCOLLATE_CC@
|
|
CCTYPE_CC = @CCTYPE_CC@
|
|
CFLAGS = @CFLAGS@
|
|
CLOCALE_CC = @CLOCALE_CC@
|
|
CLOCALE_H = @CLOCALE_H@
|
|
CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
|
|
CMESSAGES_CC = @CMESSAGES_CC@
|
|
CMESSAGES_H = @CMESSAGES_H@
|
|
CMONEY_CC = @CMONEY_CC@
|
|
CNUMERIC_CC = @CNUMERIC_CC@
|
|
CPP = @CPP@
|
|
CPPFLAGS = @CPPFLAGS@
|
|
CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
|
|
CPU_OPT_BITS_RANDOM = @CPU_OPT_BITS_RANDOM@
|
|
CPU_OPT_EXT_RANDOM = @CPU_OPT_EXT_RANDOM@
|
|
CSTDIO_H = @CSTDIO_H@
|
|
CTIME_CC = @CTIME_CC@
|
|
CTIME_H = @CTIME_H@
|
|
CXX = @CXX@
|
|
CXXCPP = @CXXCPP@
|
|
CXXFILT = @CXXFILT@
|
|
CXXFLAGS = @CXXFLAGS@
|
|
CYGPATH_W = @CYGPATH_W@
|
|
C_INCLUDE_DIR = @C_INCLUDE_DIR@
|
|
DBLATEX = @DBLATEX@
|
|
DEBUG_FLAGS = @DEBUG_FLAGS@
|
|
DEFS = @DEFS@
|
|
DOT = @DOT@
|
|
DOXYGEN = @DOXYGEN@
|
|
DSYMUTIL = @DSYMUTIL@
|
|
DUMPBIN = @DUMPBIN@
|
|
ECHO_C = @ECHO_C@
|
|
ECHO_N = @ECHO_N@
|
|
ECHO_T = @ECHO_T@
|
|
EGREP = @EGREP@
|
|
ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
|
|
EXEEXT = @EXEEXT@
|
|
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
|
|
FGREP = @FGREP@
|
|
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
|
|
GLIBCXX_LIBS = @GLIBCXX_LIBS@
|
|
GREP = @GREP@
|
|
HWCAP_FLAGS = @HWCAP_FLAGS@
|
|
INSTALL = @INSTALL@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
LD = @LD@
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBICONV = @LIBICONV@
|
|
LIBOBJS = @LIBOBJS@
|
|
LIBS = @LIBS@
|
|
LIBTOOL = @LIBTOOL@
|
|
LIPO = @LIPO@
|
|
LN_S = @LN_S@
|
|
LTLIBICONV = @LTLIBICONV@
|
|
LTLIBOBJS = @LTLIBOBJS@
|
|
MAINT = @MAINT@
|
|
MAKEINFO = @MAKEINFO@
|
|
MKDIR_P = @MKDIR_P@
|
|
NM = @NM@
|
|
NMEDIT = @NMEDIT@
|
|
OBJDUMP = @OBJDUMP@
|
|
OBJEXT = @OBJEXT@
|
|
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
|
|
OPT_LDFLAGS = @OPT_LDFLAGS@
|
|
OS_INC_SRCDIR = @OS_INC_SRCDIR@
|
|
OTOOL = @OTOOL@
|
|
OTOOL64 = @OTOOL64@
|
|
PACKAGE = @PACKAGE@
|
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
PACKAGE_NAME = @PACKAGE_NAME@
|
|
PACKAGE_STRING = @PACKAGE_STRING@
|
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
PACKAGE_URL = @PACKAGE_URL@
|
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
PDFLATEX = @PDFLATEX@
|
|
RANLIB = @RANLIB@
|
|
SECTION_FLAGS = @SECTION_FLAGS@
|
|
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
|
SED = @SED@
|
|
SET_MAKE = @SET_MAKE@
|
|
SHELL = @SHELL@
|
|
STRIP = @STRIP@
|
|
SYMVER_FILE = @SYMVER_FILE@
|
|
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
|
|
USE_NLS = @USE_NLS@
|
|
VERSION = @VERSION@
|
|
VTV_CXXFLAGS = @VTV_CXXFLAGS@
|
|
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
|
|
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
|
|
WARN_FLAGS = @WARN_FLAGS@
|
|
WERROR = @WERROR@
|
|
XMLLINT = @XMLLINT@
|
|
XSLTPROC = @XSLTPROC@
|
|
XSL_STYLE_DIR = @XSL_STYLE_DIR@
|
|
abs_builddir = @abs_builddir@
|
|
abs_srcdir = @abs_srcdir@
|
|
abs_top_builddir = @abs_top_builddir@
|
|
abs_top_srcdir = @abs_top_srcdir@
|
|
ac_ct_CC = @ac_ct_CC@
|
|
ac_ct_CXX = @ac_ct_CXX@
|
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
|
am__leading_dot = @am__leading_dot@
|
|
am__tar = @am__tar@
|
|
am__untar = @am__untar@
|
|
baseline_dir = @baseline_dir@
|
|
baseline_subdir_switch = @baseline_subdir_switch@
|
|
bindir = @bindir@
|
|
build = @build@
|
|
build_alias = @build_alias@
|
|
build_cpu = @build_cpu@
|
|
build_os = @build_os@
|
|
build_vendor = @build_vendor@
|
|
builddir = @builddir@
|
|
check_msgfmt = @check_msgfmt@
|
|
datadir = @datadir@
|
|
datarootdir = @datarootdir@
|
|
docdir = @docdir@
|
|
dvidir = @dvidir@
|
|
enable_shared = @enable_shared@
|
|
enable_static = @enable_static@
|
|
exec_prefix = @exec_prefix@
|
|
glibcxx_MOFILES = @glibcxx_MOFILES@
|
|
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
|
|
glibcxx_POFILES = @glibcxx_POFILES@
|
|
glibcxx_builddir = @glibcxx_builddir@
|
|
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
|
|
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
|
|
glibcxx_localedir = @glibcxx_localedir@
|
|
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
|
|
glibcxx_prefixdir = @glibcxx_prefixdir@
|
|
glibcxx_srcdir = @glibcxx_srcdir@
|
|
glibcxx_toolexecdir = @glibcxx_toolexecdir@
|
|
glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
|
|
gxx_include_dir = @gxx_include_dir@
|
|
host = @host@
|
|
host_alias = @host_alias@
|
|
host_cpu = @host_cpu@
|
|
host_os = @host_os@
|
|
host_vendor = @host_vendor@
|
|
htmldir = @htmldir@
|
|
includedir = @includedir@
|
|
infodir = @infodir@
|
|
install_sh = @install_sh@
|
|
libdir = @libdir@
|
|
libexecdir = @libexecdir@
|
|
libtool_VERSION = @libtool_VERSION@
|
|
localedir = @localedir@
|
|
localstatedir = @localstatedir@
|
|
lt_host_flags = @lt_host_flags@
|
|
mandir = @mandir@
|
|
mkdir_p = @mkdir_p@
|
|
multi_basedir = @multi_basedir@
|
|
oldincludedir = @oldincludedir@
|
|
pdfdir = @pdfdir@
|
|
port_specific_symbol_files = @port_specific_symbol_files@
|
|
prefix = @prefix@
|
|
program_transform_name = @program_transform_name@
|
|
psdir = @psdir@
|
|
python_mod_dir = @python_mod_dir@
|
|
sbindir = @sbindir@
|
|
sharedstatedir = @sharedstatedir@
|
|
srcdir = @srcdir@
|
|
sysconfdir = @sysconfdir@
|
|
target = @target@
|
|
target_alias = @target_alias@
|
|
target_cpu = @target_cpu@
|
|
target_os = @target_os@
|
|
target_vendor = @target_vendor@
|
|
thread_header = @thread_header@
|
|
top_build_prefix = @top_build_prefix@
|
|
top_builddir = @top_builddir@
|
|
top_srcdir = @top_srcdir@
|
|
toplevel_builddir = @toplevel_builddir@
|
|
toplevel_srcdir = @toplevel_srcdir@
|
|
AUTOMAKE_OPTIONS = nostdinc
|
|
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
|
|
EXPECT = expect
|
|
|
|
# May be used by various substitution variables.
|
|
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
|
MAINT_CHARSET = latin1
|
|
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
|
|
PWD_COMMAND = $${PWDCMD-pwd}
|
|
STAMP = echo timestamp >
|
|
toolexecdir = $(glibcxx_toolexecdir)
|
|
toolexeclibdir = $(glibcxx_toolexeclibdir)
|
|
@ENABLE_WERROR_FALSE@WERROR_FLAG =
|
|
@ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR)
|
|
@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS =
|
|
@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates
|
|
|
|
# These bits are all figured out from configure. Look in acinclude.m4
|
|
# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
|
|
CONFIG_CXXFLAGS = \
|
|
$(SECTION_FLAGS) $(HWCAP_FLAGS) -frandom-seed=$@
|
|
|
|
WARN_CXXFLAGS = \
|
|
$(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once
|
|
|
|
|
|
# -I/-D flags to pass when compiling.
|
|
AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
|
|
|
# Generated lists of files to run. All of these names are valid make
|
|
# targets, if you wish to generate a list manually.
|
|
lists_of_files = \
|
|
testsuite_files \
|
|
testsuite_files_interactive \
|
|
testsuite_files_performance
|
|
|
|
extract_symvers = $(glibcxx_builddir)/scripts/extract_symvers
|
|
baseline_subdir := $(shell $(CXX) $(baseline_subdir_switch))
|
|
check_DEJAGNU_normal_targets = $(patsubst %,check-DEJAGNUnormal%,0 1 2 3 4 5 6 7 8 9)
|
|
|
|
# Runs the testsuite, but in compile only mode.
|
|
# Can be used to test sources with non-GNU FE's at various warning
|
|
# levels and for checking compile time across releases.
|
|
# See script.
|
|
compile_script = ${glibcxx_srcdir}/scripts/check_compile
|
|
|
|
# Runs the testsuite/performance tests.
|
|
# Some of these tests create large (~75MB) files, allocate huge
|
|
# ammounts of memory, or otherwise tie up machine resources. Thus,
|
|
# running this is off by default.
|
|
# XXX Need to add dependency on libtestc++.a
|
|
check_performance_script = ${glibcxx_srcdir}/scripts/check_performance
|
|
|
|
# Runs the testsuite in debug mode.
|
|
debug_flags = "unix/-D_GLIBCXX_DEBUG"
|
|
|
|
# Runs the testsuite in parallel mode.
|
|
libgomp_dir = ${glibcxx_builddir}/../libgomp
|
|
libgomp_flags = -B${glibcxx_builddir}/../libgomp \
|
|
-I${glibcxx_builddir}/../libgomp \
|
|
-L${glibcxx_builddir}/../libgomp/.libs -lgomp
|
|
|
|
atomic_flags = $(ATOMIC_FLAGS)
|
|
parallel_flags = "unix/-D_GLIBCXX_PARALLEL/-fopenmp"
|
|
|
|
# Runs the testsuite in profile mode.
|
|
profile_flags = "unix/-D_GLIBCXX_PROFILE"
|
|
|
|
# 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 baseline_symbols *TEST* *.dat \
|
|
*.ii *.s *.o *.cc *.x *.a *.so *.xml *.raw *.out *.gdb
|
|
|
|
all: all-am
|
|
|
|
.SUFFIXES:
|
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps)
|
|
@for dep in $?; do \
|
|
case '$(am__configure_deps)' in \
|
|
*$$dep*) \
|
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
|
exit 1;; \
|
|
esac; \
|
|
done; \
|
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps testsuite/Makefile'; \
|
|
$(am__cd) $(top_srcdir) && \
|
|
$(AUTOMAKE) --foreign --ignore-deps testsuite/Makefile
|
|
.PRECIOUS: Makefile
|
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
@case '$?' in \
|
|
*config.status*) \
|
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
|
*) \
|
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
|
esac;
|
|
|
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
|
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
$(am__aclocal_m4_deps):
|
|
|
|
mostlyclean-libtool:
|
|
-rm -f *.lo
|
|
|
|
clean-libtool:
|
|
-rm -rf .libs _libs
|
|
tags: TAGS
|
|
TAGS:
|
|
|
|
ctags: CTAGS
|
|
CTAGS:
|
|
|
|
check-am: all-am
|
|
check: check-am
|
|
all-am: Makefile
|
|
installdirs:
|
|
install: install-am
|
|
install-exec: install-exec-am
|
|
install-data: install-data-am
|
|
uninstall: uninstall-am
|
|
|
|
install-am: all-am
|
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
|
|
|
installcheck: installcheck-am
|
|
install-strip:
|
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
|
`test -z '$(STRIP)' || \
|
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
|
mostlyclean-generic:
|
|
|
|
clean-generic:
|
|
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
|
|
|
distclean-generic:
|
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
|
|
|
maintainer-clean-generic:
|
|
@echo "This command is intended for maintainers to use"
|
|
@echo "it deletes files that may require special tools to rebuild."
|
|
clean: clean-am
|
|
|
|
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
|
|
|
distclean: distclean-am
|
|
-rm -f Makefile
|
|
distclean-am: clean-am distclean-generic
|
|
|
|
dvi: dvi-am
|
|
|
|
dvi-am:
|
|
|
|
html: html-am
|
|
|
|
html-am:
|
|
|
|
info: info-am
|
|
|
|
info-am:
|
|
|
|
install-data-am:
|
|
|
|
install-dvi: install-dvi-am
|
|
|
|
install-dvi-am:
|
|
|
|
install-exec-am:
|
|
|
|
install-html: install-html-am
|
|
|
|
install-html-am:
|
|
|
|
install-info: install-info-am
|
|
|
|
install-info-am:
|
|
|
|
install-man:
|
|
|
|
install-pdf: install-pdf-am
|
|
|
|
install-pdf-am:
|
|
|
|
install-ps: install-ps-am
|
|
|
|
install-ps-am:
|
|
|
|
installcheck-am:
|
|
|
|
maintainer-clean: maintainer-clean-am
|
|
-rm -f Makefile
|
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
|
|
|
mostlyclean: mostlyclean-am
|
|
|
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
|
|
|
pdf: pdf-am
|
|
|
|
pdf-am:
|
|
|
|
ps: ps-am
|
|
|
|
ps-am:
|
|
|
|
uninstall-am:
|
|
|
|
.MAKE: install-am install-strip
|
|
|
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
|
clean-local distclean distclean-generic distclean-libtool dvi \
|
|
dvi-am html html-am info info-am install install-am \
|
|
install-data install-data-am install-dvi install-dvi-am \
|
|
install-exec install-exec-am install-html install-html-am \
|
|
install-info install-info-am install-man install-pdf \
|
|
install-pdf-am install-ps install-ps-am install-strip \
|
|
installcheck installcheck-am installdirs maintainer-clean \
|
|
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
|
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
|
|
|
|
|
# This rule generates all of the testsuite_files* lists at once.
|
|
${lists_of_files}:
|
|
${glibcxx_srcdir}/scripts/create_testsuite_files \
|
|
${glibcxx_srcdir}/testsuite `${PWD_COMMAND}`
|
|
|
|
# We need more things in site.exp, but automake completely controls the
|
|
# creation of that file; there's no way to append to it without messing up
|
|
# the dependancy chains. So we overrule automake. This rule is exactly
|
|
# what it would have generated, plus our own additions.
|
|
site.exp: Makefile
|
|
@echo 'Making a new site.exp file...'
|
|
@echo '## these variables are automatically generated by make ##' >site.tmp
|
|
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
|
|
@echo '# edit the last section' >>site.tmp
|
|
@echo 'set srcdir $(srcdir)' >>site.tmp
|
|
@echo "set objdir `pwd`" >>site.tmp
|
|
@echo 'set build_alias "$(build_alias)"' >>site.tmp
|
|
@echo 'set build_triplet $(build_triplet)' >>site.tmp
|
|
@echo 'set host_alias "$(host_alias)"' >>site.tmp
|
|
@echo 'set host_triplet $(host_triplet)' >>site.tmp
|
|
@echo 'set target_alias "$(target_alias)"' >>site.tmp
|
|
@echo 'set target_triplet $(target_triplet)' >>site.tmp
|
|
@echo 'set target_triplet $(target_triplet)' >>site.tmp
|
|
@echo 'set libiconv "$(LIBICONV)"' >>site.tmp
|
|
@echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
|
|
@echo 'set baseline_subdir_switch "$(baseline_subdir_switch)"' >> site.tmp
|
|
@echo 'set TEST_GCC_EXEC_PREFIX "$(libdir)/gcc/"' >> site.tmp
|
|
@echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
|
|
@test ! -f site.exp || \
|
|
sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
|
|
@-rm -f site.bak
|
|
@test ! -f site.exp || mv site.exp site.bak
|
|
@mv site.tmp site.exp
|
|
|
|
baseline_symbols:
|
|
-@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \
|
|
if test ! -f $${output}; then \
|
|
echo "Baseline file doesn't exist."; \
|
|
echo "Try 'make new-abi-baseline' to create it."; \
|
|
exit 1; \
|
|
fi; true)
|
|
|
|
new-abi-baseline:
|
|
-@$(mkinstalldirs) ${baseline_dir}/${baseline_subdir}
|
|
-@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \
|
|
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})
|
|
|
|
%/site.exp: site.exp
|
|
-test -d $* || mkdir $*
|
|
@srcdir=`cd $(srcdir); ${PWD_COMMAND}`;
|
|
objdir=`${PWD_COMMAND}`/$*; \
|
|
sed -e "s|^set srcdir .*$$|set srcdir $$srcdir|" \
|
|
-e "s|^set objdir .*$$|set objdir $$objdir|" \
|
|
site.exp > $*/site.exp.tmp
|
|
@-rm -f $*/site.bak
|
|
@test ! -f $*/site.exp || mv $*/site.exp $*/site.bak
|
|
@mv $*/site.exp.tmp $*/site.exp
|
|
$(check_DEJAGNU_normal_targets): check-DEJAGNUnormal%: normal%/site.exp
|
|
|
|
# Run the testsuite in normal mode.
|
|
check-DEJAGNU $(check_DEJAGNU_normal_targets): check-DEJAGNU%: site.exp
|
|
AR="$(AR)"; export AR; \
|
|
RANLIB="$(RANLIB)"; export RANLIB; \
|
|
if [ -z "$*$(filter-out --target_board=%, $(RUNTESTFLAGS))" ] \
|
|
&& [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \
|
|
$(MAKE) $(AM_MAKEFLAGS) $(check_DEJAGNU_normal_targets); \
|
|
for idx in 0 1 2 3 4 5 6 7 8 9; do \
|
|
mv -f normal$$idx/libstdc++.sum normal$$idx/libstdc++.sum.sep; \
|
|
mv -f normal$$idx/libstdc++.log normal$$idx/libstdc++.log.sep; \
|
|
done; \
|
|
mv -f libstdc++.sum libstdc++.sum.sep; \
|
|
mv -f libstdc++.log libstdc++.log.sep; \
|
|
$(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \
|
|
libstdc++.sum.sep normal[0-9]/libstdc++.sum.sep > libstdc++.sum; \
|
|
$(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \
|
|
libstdc++.log.sep normal[0-9]/libstdc++.log.sep > libstdc++.log; \
|
|
exit 0; \
|
|
fi; \
|
|
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
|
|
EXPECT=$(EXPECT); export EXPECT; \
|
|
runtest=$(RUNTEST); \
|
|
if [ -z "$$runtest" ]; then runtest=runtest; fi; \
|
|
tool=libstdc++; \
|
|
dirs=; \
|
|
case "$*" in \
|
|
normal0) \
|
|
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
|
$$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) \
|
|
$(RUNTESTFLAGS) abi.exp prettyprinters.exp; \
|
|
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
|
fi; \
|
|
dirs="`cd $$srcdir; echo [013-9][0-9]_*/*`";; \
|
|
normal1) \
|
|
dirs="`cd $$srcdir; echo [ab]* de* [ep]*/*`";; \
|
|
normal2) \
|
|
dirs="`cd $$srcdir; echo 2[01]_*/*`";; \
|
|
normal3) \
|
|
dirs="`cd $$srcdir; echo 22_*/*`";; \
|
|
normal4) \
|
|
dirs="`cd $$srcdir; echo 23_*/[a-km-tw-z]*`";; \
|
|
normal5) \
|
|
dirs="`cd $$srcdir; echo 23_*/[luv]*`";; \
|
|
normal6) \
|
|
dirs="`cd $$srcdir; echo 2[459]_*/*`";; \
|
|
normal7) \
|
|
dirs="`cd $$srcdir; echo 2[68]_*/*`";; \
|
|
normal8) \
|
|
dirs="`cd $$srcdir; echo 27_*/*`";; \
|
|
normal9) \
|
|
dirs="`cd $$srcdir; echo t*/*`";; \
|
|
esac; \
|
|
if [ -n "$*" ]; then cd "$*"; fi; \
|
|
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
|
if [ -n "$$dirs" ]; then \
|
|
$$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) \
|
|
$(RUNTESTFLAGS) \
|
|
"conformance.exp=`echo $$dirs | sed 's/ /* /g;s/$$/*/'`"; \
|
|
else \
|
|
$$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) \
|
|
$(RUNTESTFLAGS); \
|
|
fi; \
|
|
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
|
fi
|
|
|
|
check-am:
|
|
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
|
|
.PHONY: check-DEJAGNU
|
|
|
|
# Use 'new-abi-baseline' to create an initial symbol file. Then run
|
|
# 'check-abi' to test for changes against that file.
|
|
check-abi: site.exp baseline_symbols
|
|
-@runtest $(AM_RUNTESTFLAGS) --tool libstdc++ $(RUNTESTFLAGS) abi.exp
|
|
check-compile: testsuite_files ${compile_script}
|
|
-@(chmod + ${compile_script}; \
|
|
${compile_script} ${glibcxx_srcdir} ${glibcxx_builddir})
|
|
check-performance: testsuite_files_performance ${performance_script}
|
|
-@(chmod + ${check_performance_script}; \
|
|
${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
|
|
|
|
check-debug: site.exp
|
|
outputdir=debug; export outputdir; \
|
|
if test ! -d $${outputdir}; then \
|
|
mkdir $${outputdir}; \
|
|
fi; \
|
|
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
|
|
EXPECT=$(EXPECT); export EXPECT; \
|
|
$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(debug_flags)" check-DEJAGNU;
|
|
|
|
check-parallel: site.exp
|
|
-@(if test ! -d $${libgomp_dir}; then \
|
|
echo "Testing parallel mode failed as libgomp not present."; \
|
|
exit 1; \
|
|
fi; \
|
|
outputdir=parallel; export outputdir; \
|
|
if test ! -d $${outputdir}; then \
|
|
mkdir $${outputdir}; \
|
|
fi; \
|
|
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
|
|
EXPECT=$(EXPECT); export EXPECT; \
|
|
$(MAKE) CXXFLAGS="$(atomic_flags) $(libgomp_flags)" RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(parallel_flags)" check-DEJAGNU; )
|
|
|
|
check-performance-parallel: testsuite_files_performance ${performance_script}
|
|
-@(chmod + ${check_performance_script}; \
|
|
CXXFLAGS="-D_GLIBCXX_PARALLEL -fopenmp $(atomic_flags) $(libgomp_flags)"; export CXXFLAGS; \
|
|
${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
|
|
|
|
check-profile: site.exp
|
|
-@(outputdir=profile; export outputdir; \
|
|
if test ! -d $${outputdir}; then \
|
|
mkdir $${outputdir}; \
|
|
fi; \
|
|
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
|
|
EXPECT=$(EXPECT); export EXPECT; \
|
|
$(MAKE) CXXFLAGS="$(atomic_flags) " RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(profile_flags)" check-DEJAGNU; )
|
|
|
|
.PHONY: baseline_symbols new-abi-baseline \
|
|
check-abi check-compile check-performance check-parallel check-profile
|
|
|
|
# To remove directories.
|
|
clean-local:
|
|
rm -rf de fr debug parallel profile binaries normal*
|
|
|
|
# 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.
|
|
.NOEXPORT:
|