diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2013-07-29 14:20:54 -0700 |
---|---|---|
committer | Benjamin Kosnik <bkoz@redhat.com> | 2013-07-29 14:20:54 -0700 |
commit | 0a36ea1495579da9f58f3948dd25480c0973f039 (patch) | |
tree | b3c4afb3a24ca57535da7d860496def9af58db2c | |
parent | fa0cbe4ef6479ee73d8c616af12ced2d44ad42e7 (diff) | |
download | gcc-0a36ea1495579da9f58f3948dd25480c0973f039.tar.gz |
2013-07-29 Benjamin Kosnik <bkoz@redhat.com>
* Makefile.am (libvtv_include_HEADERS, libvtv_la_SOURCES): Make
conditional on enable-vtable-verify.
* acinclude.m4 (LIBVTV_CONFIGURE): Add check for --enable-vtable-verify.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* scripts/run-testsuite.sh: Add LDFLAGS.
* testsuite/Makefile.am (check-am): Conditionalize on
enable_vtable_verify check.
* testsuite/Makefile.in: Regenerate.
-rw-r--r-- | ChangeLog.vtv | 6 | ||||
-rw-r--r-- | libvtv/ChangeLog | 23 | ||||
-rw-r--r-- | libvtv/Makefile.am | 10 | ||||
-rw-r--r-- | libvtv/Makefile.in | 12 | ||||
-rw-r--r-- | libvtv/acinclude.m4 | 11 | ||||
-rwxr-xr-x | libvtv/configure | 33 | ||||
-rwxr-xr-x | libvtv/scripts/run-testsuite.sh | 2 | ||||
-rw-r--r-- | libvtv/testsuite/Makefile.am | 4 | ||||
-rw-r--r-- | libvtv/testsuite/Makefile.in | 7 |
9 files changed, 86 insertions, 22 deletions
diff --git a/ChangeLog.vtv b/ChangeLog.vtv index 756d98166a5..31d8a15f1db 100644 --- a/ChangeLog.vtv +++ b/ChangeLog.vtv @@ -10,9 +10,3 @@ * configure: Regenerate. * Makefile.in: Regenerate. * contrib/gcc_update: Add libvtv to touch data. - -2013-06-16 Caroline Tice <cmtice@google.com> - - ? (XXX currently not applied) - * configure (CXX_FOR_TARGET): Add libstdc++-v3/libsupc++/.libs to the - library search path. diff --git a/libvtv/ChangeLog b/libvtv/ChangeLog index 3d669d14ff4..13f786ad842 100644 --- a/libvtv/ChangeLog +++ b/libvtv/ChangeLog @@ -1,10 +1,25 @@ +2013-07-29 Benjamin Kosnik <bkoz@redhat.com> + + * Makefile.am (libvtv_include_HEADERS, libvtv_la_SOURCES): Make + conditional on enable-vtable-verify. + * acinclude.m4 (LIBVTV_CONFIGURE): Add check for --enable-vtable-verify. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * scripts/run-testsuite.sh: Add LDFLAGS. + + * testsuite/Makefile.am (check-am): Conditionalize on + enable_vtable_verify check. + * testsuite/Makefile.in: Regenerate. + 2013-07-26 Caroline Tice <cmtice@google.com> * doc/VtableVerification-FeatureProposal.pdf: New. * doc/VtableVerification-PartialVerificationProblem.pdf: New. * doc/VtableVerification-UsersGuide.pdf: New. -2013-07-26 Benjamin Kosnik <bkoz@adair> +2013-07-26 Benjamin Kosnik <bkoz@redhat.com> * Makefile.am * Makefile.in: Regenerate. @@ -16,7 +31,7 @@ * testsuite/Makefile.in: Regenerate. 2013-07-26 Caroline Tice <cmtice@google.com> - Benjamin Kosnik <bkoz@adair> + Benjamin Kosnik <bkoz@redhat.com> * scripts/run-testsuite.sh: Test harness. @@ -64,7 +79,7 @@ * testsuite/thunk_vtable_map_attack.cc: Same. * testsuite/virtual_inheritance.cc: Same. -2013-07-24 Benjamin Kosnik <bkoz@adair> +2013-07-24 Benjamin Kosnik <bkoz@redhat.com> * vtv_rts.cc: Remove unused variables. * vtv_malloc.cc: Same. @@ -125,7 +140,7 @@ (vtv_add_to_log): Uglify to __vtv_add_to_log. (__vtv_log_verification): New. -2013-07-11 Benjamin Kosnik <bkoz@adair> +2013-07-11 Benjamin Kosnik <bkoz@redhat.com> * libvtv/vtv_rts.cc: Remove unused variables. diff --git a/libvtv/Makefile.am b/libvtv/Makefile.am index 720e111bbc4..1a0dbd7a2d2 100644 --- a/libvtv/Makefile.am +++ b/libvtv/Makefile.am @@ -48,10 +48,16 @@ vtv_sources = \ vtv_rts.cc \ vtv_utils.cc -libvtv_la_SOURCES = $(vtv_sources) - libvtv_includedir = $(includedir) + +if ENABLE_VTABLE_VERIFY +libvtv_la_SOURCES = $(vtv_sources) libvtv_include_HEADERS = $(vtv_headers) +else +libvtv_la_SOURCES = +libvtv_include_HEADERS = +endif + # By adding these files here, automake will remove them for 'make clean' CLEANFILES = stamp-* diff --git a/libvtv/Makefile.in b/libvtv/Makefile.in index 3f54902879f..8feff7084f8 100644 --- a/libvtv/Makefile.in +++ b/libvtv/Makefile.in @@ -40,7 +40,7 @@ subdir = . DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/../mkinstalldirs $(srcdir)/../depcomp \ - $(libvtv_include_HEADERS) + $(am__libvtv_include_HEADERS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ @@ -85,7 +85,7 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \ LTLIBRARIES = $(toolexeclib_LTLIBRARIES) libvtv_la_LIBADD = am__objects_1 = vtv_malloc.lo vtv_rts.lo vtv_utils.lo -am_libvtv_la_OBJECTS = $(am__objects_1) +@ENABLE_VTABLE_VERIFY_TRUE@am_libvtv_la_OBJECTS = $(am__objects_1) libvtv_la_OBJECTS = $(am_libvtv_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../depcomp @@ -108,6 +108,8 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__libvtv_include_HEADERS_DIST = vtv_map.h vtv_malloc.h vtv_fail.h \ + vtv_set.h vtv_utils.h vtv_rts.h HEADERS = $(libvtv_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -276,9 +278,11 @@ vtv_sources = \ vtv_rts.cc \ vtv_utils.cc -libvtv_la_SOURCES = $(vtv_sources) libvtv_includedir = $(includedir) -libvtv_include_HEADERS = $(vtv_headers) +@ENABLE_VTABLE_VERIFY_FALSE@libvtv_la_SOURCES = +@ENABLE_VTABLE_VERIFY_TRUE@libvtv_la_SOURCES = $(vtv_sources) +@ENABLE_VTABLE_VERIFY_FALSE@libvtv_include_HEADERS = +@ENABLE_VTABLE_VERIFY_TRUE@libvtv_include_HEADERS = $(vtv_headers) # By adding these files here, automake will remove them for 'make clean' CLEANFILES = stamp-* diff --git a/libvtv/acinclude.m4 b/libvtv/acinclude.m4 index 53e62d24c11..6faca986edd 100644 --- a/libvtv/acinclude.m4 +++ b/libvtv/acinclude.m4 @@ -30,6 +30,17 @@ dnl - lots of tools, like CC and CXX dnl AC_DEFUN([LIBVTV_CONFIGURE], [ + # Use same top-level configure hooks in libgcc/libstdc++/libvtv. + AC_ARG_ENABLE(vtable-verify, + [ --enable-vtable-verify Enable vtable verification feature ], + [case "$enableval" in + yes) enable_vtable_verify=yes ;; + no) enable_vtable_verify=no ;; + *) enable_vtable_verify=no;; + esac], + [enable_vtable_verify=no]) + AM_CONDITIONAL(ENABLE_VTABLE_VERIFY, test $enable_vtable_verify = yes) + # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. diff --git a/libvtv/configure b/libvtv/configure index fff09de5abc..2aeb42cb39b 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -608,6 +608,8 @@ toplevel_srcdir toplevel_builddir libvtv_srcdir libvtv_builddir +ENABLE_VTABLE_VERIFY_FALSE +ENABLE_VTABLE_VERIFY_TRUE XCFLAGS libtool_VERSION enable_static @@ -752,6 +754,7 @@ with_pic enable_fast_install with_gnu_ld enable_libtool_lock +enable_vtable_verify ' ac_precious_vars='build_alias host_alias @@ -1390,6 +1393,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-vtable-verify Enable vtable verification feature Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -11213,7 +11217,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11216 "configure" +#line 11220 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11319,7 +11323,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11322 "configure" +#line 11326 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14590,6 +14594,27 @@ fi + # Use same top-level configure hooks in libgcc/libstdc++/libvtv. + # Check whether --enable-vtable-verify was given. +if test "${enable_vtable_verify+set}" = set; then : + enableval=$enable_vtable_verify; case "$enableval" in + yes) enable_vtable_verify=yes ;; + no) enable_vtable_verify=no ;; + *) enable_vtable_verify=no;; + esac +else + enable_vtable_verify=no +fi + + if test $enable_vtable_verify = yes; then + ENABLE_VTABLE_VERIFY_TRUE= + ENABLE_VTABLE_VERIFY_FALSE='#' +else + ENABLE_VTABLE_VERIFY_TRUE='#' + ENABLE_VTABLE_VERIFY_FALSE= +fi + + # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. @@ -14783,6 +14808,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_VTABLE_VERIFY_TRUE}" && test -z "${ENABLE_VTABLE_VERIFY_FALSE}"; then + as_fn_error "conditional \"ENABLE_VTABLE_VERIFY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${VTV_SUPPORTED_TRUE}" && test -z "${VTV_SUPPORTED_FALSE}"; then as_fn_error "conditional \"VTV_SUPPORTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/libvtv/scripts/run-testsuite.sh b/libvtv/scripts/run-testsuite.sh index 9f644b8bdd1..4388850b803 100755 --- a/libvtv/scripts/run-testsuite.sh +++ b/libvtv/scripts/run-testsuite.sh @@ -17,7 +17,7 @@ shift flags_script=$BUILD_DIR/../libstdc++-v3/scripts/testsuite_flags INCLUDES=`$flags_script --build-includes` COMPILER=`$flags_script --build-cxx` -CXX="$COMPILER $INCLUDES" +CXX="$COMPILER $INCLUDES -L$BUILD_DIR/.libs" echo "compiler config is:" echo $CXX diff --git a/libvtv/testsuite/Makefile.am b/libvtv/testsuite/Makefile.am index 56f76a79f5b..5f6ab0a037f 100644 --- a/libvtv/testsuite/Makefile.am +++ b/libvtv/testsuite/Makefile.am @@ -39,8 +39,12 @@ check-script: ${testing_script} stamp-subdir -@(chmod +x ${testing_script}; \ ${testing_script} ${libvtv_srcdir} ${libvtv_builddir}) +if ENABLE_VTABLE_VERIFY check-am: $(MAKE) $(AM_MAKEFLAGS) check-script +else +check-am: +endif .PHONY: check-script diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in index f27d8ce1dad..2992a905142 100644 --- a/libvtv/testsuite/Makefile.in +++ b/libvtv/testsuite/Makefile.in @@ -365,13 +365,14 @@ check-script: ${testing_script} stamp-subdir -@(chmod +x ${testing_script}; \ ${testing_script} ${libvtv_srcdir} ${libvtv_builddir}) -check-am: - $(MAKE) $(AM_MAKEFLAGS) check-script +@ENABLE_VTABLE_VERIFY_TRUE@check-am: +@ENABLE_VTABLE_VERIFY_TRUE@ $(MAKE) $(AM_MAKEFLAGS) check-script +@ENABLE_VTABLE_VERIFY_FALSE@check-am: .PHONY: check-script # To remove directories. -clean-local: +clean-local: rm -rf lib* # Tell versions [3.59,3.63) of GNU make to not export all variables. |