Commit ad103b01 by Rainer Orth Committed by Rainer Orth

Error out on -fvtable-verify without --enable-vtable-verify

	* configure.ac (enable_vtable_verify): Handle --enable-vtable-verify.
	* configure: Regenerate.
	* config.in: Regenerate.
	* gcc.c (VTABLE_VERIFICATION_SPEC) [!ENABLE_VTABLE_VERIFY]: Error
	on -fvtable-verify.
	* config/sol2.h [!ENABLE_VTABLE_VERIFY] (STARTFILE_VTV_SPEC): Define.
	(ENDFILE_VTV_SPEC): Define.

From-SVN: r236029
parent 7972e246
2016-05-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (enable_vtable_verify): Handle --enable-vtable-verify.
* configure: Regenerate.
* config.in: Regenerate.
* gcc.c (VTABLE_VERIFICATION_SPEC) [!ENABLE_VTABLE_VERIFY]: Error
on -fvtable-verify.
* config/sol2.h [!ENABLE_VTABLE_VERIFY] (STARTFILE_VTV_SPEC): Define.
(ENDFILE_VTV_SPEC): Define.
2016-05-09 Kaushik Phatak <kaushik.phatak@kpit.com> 2016-05-09 Kaushik Phatak <kaushik.phatak@kpit.com>
* config/rl78/rl78.c (rl78_expand_prologue): Save the MDUC related * config/rl78/rl78.c (rl78_expand_prologue): Save the MDUC related
......
...@@ -234,6 +234,12 @@ ...@@ -234,6 +234,12 @@
#endif #endif
/* Define 0/1 if vtable verification feature is enabled. */
#ifndef USED_FOR_TARGET
#undef ENABLE_VTABLE_VERIFY
#endif
/* Define to 1 if installation paths should be looked up in the Windows /* Define to 1 if installation paths should be looked up in the Windows
Registry. Ignored on non-Windows hosts. */ Registry. Ignored on non-Windows hosts. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
......
...@@ -166,21 +166,26 @@ along with GCC; see the file COPYING3. If not see ...@@ -166,21 +166,26 @@ along with GCC; see the file COPYING3. If not see
#define STARTFILE_CRTBEGIN_SPEC "crtbegin.o%s" #define STARTFILE_CRTBEGIN_SPEC "crtbegin.o%s"
#endif #endif
#if ENABLE_VTABLE_VERIFY
#if SUPPORTS_INIT_PRIORITY #if SUPPORTS_INIT_PRIORITY
#define STARTFILE_VTV_SPEC \ #define STARTFILE_VTV_SPEC \
"%{fvtable-verify=none:%s; \ "%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_start_preinit.o%s; \ fvtable-verify=preinit:vtv_start_preinit.o%s; \
fvtable-verify=std:vtv_start.o%s}" fvtable-verify=std:vtv_start.o%s}"
#define ENDFILE_VTV_SPEC \ #define ENDFILE_VTV_SPEC \
"%{fvtable-verify=none:%s; \ "%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_end_preinit.o%s; \ fvtable-verify=preinit:vtv_end_preinit.o%s; \
fvtable-verify=std:vtv_end.o%s}" fvtable-verify=std:vtv_end.o%s}"
#else #else /* !SUPPORTS_INIT_PRIORITY */
#define STARTFILE_VTV_SPEC \ #define STARTFILE_VTV_SPEC \
"%{fvtable-verify:%e-fvtable-verify is not supported in this configuration}" "%{fvtable-verify=*: \
%e-fvtable-verify=%* is not supported in this configuration}"
#define ENDFILE_VTV_SPEC "" #define ENDFILE_VTV_SPEC ""
#endif #endif /* !SUPPORTS_INIT_PRIORITY */
#else /* !ENABLE_VTABLE_VERIFY */
#define STARTFILE_VTV_SPEC ""
#define ENDFILE_VTV_SPEC ""
#endif /* !ENABLE_VTABLE_VERIFY */
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */ /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
......
...@@ -904,6 +904,7 @@ enable_decimal_float ...@@ -904,6 +904,7 @@ enable_decimal_float
enable_fixed_point enable_fixed_point
enable_threads enable_threads
enable_tls enable_tls
enable_vtable_verify
enable_objc_gc enable_objc_gc
with_dwarf2 with_dwarf2
enable_shared enable_shared
...@@ -1619,6 +1620,7 @@ Optional Features: ...@@ -1619,6 +1620,7 @@ Optional Features:
package package
--enable-tls enable or disable generation of tls code overriding --enable-tls enable or disable generation of tls code overriding
the assembler check for tls support the assembler check for tls support
--enable-vtable-verify enable vtable verification feature
--enable-objc-gc enable the use of Boehm's garbage collector with the --enable-objc-gc enable the use of Boehm's garbage collector with the
GNU Objective-C runtime GNU Objective-C runtime
--disable-shared don't provide a shared libgcc --disable-shared don't provide a shared libgcc
...@@ -7591,6 +7593,20 @@ else ...@@ -7591,6 +7593,20 @@ else
fi fi
# Check whether --enable-vtable-verify was given.
if test "${enable_vtable_verify+set}" = set; then :
enableval=$enable_vtable_verify;
else
enable_vtable_verify=no
fi
vtable_verify=`if test x$enable_vtable_verify = xyes; then echo 1; else echo 0; fi`
cat >>confdefs.h <<_ACEOF
#define ENABLE_VTABLE_VERIFY $vtable_verify
_ACEOF
# Check whether --enable-objc-gc was given. # Check whether --enable-objc-gc was given.
if test "${enable_objc_gc+set}" = set; then : if test "${enable_objc_gc+set}" = set; then :
enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
...@@ -18458,7 +18474,7 @@ else ...@@ -18458,7 +18474,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 18462 "configure" #line 18477 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -18564,7 +18580,7 @@ else ...@@ -18564,7 +18580,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 18568 "configure" #line 18583 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
......
...@@ -865,6 +865,14 @@ Valid choices are 'yes' and 'no'.]) ;; ...@@ -865,6 +865,14 @@ Valid choices are 'yes' and 'no'.]) ;;
esac esac
], [enable_tls='']) ], [enable_tls=''])
AC_ARG_ENABLE(vtable-verify,
[AS_HELP_STRING([--enable-vtable-verify],
[enable vtable verification feature])],,
[enable_vtable_verify=no])
vtable_verify=`if test x$enable_vtable_verify = xyes; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED(ENABLE_VTABLE_VERIFY, $vtable_verify,
[Define 0/1 if vtable verification feature is enabled.])
AC_ARG_ENABLE(objc-gc, AC_ARG_ENABLE(objc-gc,
[AS_HELP_STRING([--enable-objc-gc], [AS_HELP_STRING([--enable-objc-gc],
[enable the use of Boehm's garbage collector with [enable the use of Boehm's garbage collector with
......
...@@ -989,9 +989,18 @@ proper position among the other output files. */ ...@@ -989,9 +989,18 @@ proper position among the other output files. */
the vtable verification runtime functions are in libstdc++, so we use the vtable verification runtime functions are in libstdc++, so we use
the spec just below this one. */ the spec just below this one. */
#ifndef VTABLE_VERIFICATION_SPEC #ifndef VTABLE_VERIFICATION_SPEC
#if ENABLE_VTABLE_VERIFY
#define VTABLE_VERIFICATION_SPEC "\ #define VTABLE_VERIFICATION_SPEC "\
%{!nostdlib:%{fvtable-verify=std: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}\ %{!nostdlib:%{fvtable-verify=std: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}\
%{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}}" %{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}}"
#else
#define VTABLE_VERIFICATION_SPEC "\
%{fvtable-verify=none:} \
%{fvtable-verify=std: \
%e-fvtable-verify=std is not supported in this configuration} \
%{fvtable-verify=preinit: \
%e-fvtable-verify=preinit is not supported in this configuration}"
#endif
#endif #endif
#ifndef CHKP_SPEC #ifndef CHKP_SPEC
......
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