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
This commit is contained in:
parent
7972e24663
commit
ad103b0153
6 changed files with 60 additions and 6 deletions
|
@ -1,3 +1,13 @@
|
|||
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>
|
||||
|
||||
* config/rl78/rl78.c (rl78_expand_prologue): Save the MDUC related
|
||||
|
|
|
@ -234,6 +234,12 @@
|
|||
#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
|
||||
Registry. Ignored on non-Windows hosts. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
|
|
|
@ -166,21 +166,26 @@ along with GCC; see the file COPYING3. If not see
|
|||
#define STARTFILE_CRTBEGIN_SPEC "crtbegin.o%s"
|
||||
#endif
|
||||
|
||||
#if ENABLE_VTABLE_VERIFY
|
||||
#if SUPPORTS_INIT_PRIORITY
|
||||
#define STARTFILE_VTV_SPEC \
|
||||
"%{fvtable-verify=none:%s; \
|
||||
fvtable-verify=preinit:vtv_start_preinit.o%s; \
|
||||
fvtable-verify=std:vtv_start.o%s}"
|
||||
|
||||
#define ENDFILE_VTV_SPEC \
|
||||
"%{fvtable-verify=none:%s; \
|
||||
fvtable-verify=preinit:vtv_end_preinit.o%s; \
|
||||
fvtable-verify=std:vtv_end.o%s}"
|
||||
#else
|
||||
#else /* !SUPPORTS_INIT_PRIORITY */
|
||||
#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 ""
|
||||
#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. */
|
||||
#undef STARTFILE_SPEC
|
||||
|
|
20
gcc/configure
vendored
20
gcc/configure
vendored
|
@ -904,6 +904,7 @@ enable_decimal_float
|
|||
enable_fixed_point
|
||||
enable_threads
|
||||
enable_tls
|
||||
enable_vtable_verify
|
||||
enable_objc_gc
|
||||
with_dwarf2
|
||||
enable_shared
|
||||
|
@ -1619,6 +1620,7 @@ Optional Features:
|
|||
package
|
||||
--enable-tls enable or disable generation of tls code overriding
|
||||
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
|
||||
GNU Objective-C runtime
|
||||
--disable-shared don't provide a shared libgcc
|
||||
|
@ -7591,6 +7593,20 @@ else
|
|||
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.
|
||||
if test "${enable_objc_gc+set}" = set; then :
|
||||
enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
|
||||
|
@ -18458,7 +18474,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 18462 "configure"
|
||||
#line 18477 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -18564,7 +18580,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 18568 "configure"
|
||||
#line 18583 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
|
|
@ -865,6 +865,14 @@ Valid choices are 'yes' and 'no'.]) ;;
|
|||
esac
|
||||
], [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,
|
||||
[AS_HELP_STRING([--enable-objc-gc],
|
||||
[enable the use of Boehm's garbage collector with
|
||||
|
|
|
@ -989,9 +989,18 @@ proper position among the other output files. */
|
|||
the vtable verification runtime functions are in libstdc++, so we use
|
||||
the spec just below this one. */
|
||||
#ifndef VTABLE_VERIFICATION_SPEC
|
||||
#if ENABLE_VTABLE_VERIFY
|
||||
#define VTABLE_VERIFICATION_SPEC "\
|
||||
%{!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}}"
|
||||
#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
|
||||
|
||||
#ifndef CHKP_SPEC
|
||||
|
|
Loading…
Add table
Reference in a new issue