Commit 598a1586 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS override USE_PT_GNU_EH_FRAME.

	* crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS
	override USE_PT_GNU_EH_FRAME.
	[__LIBGCC_EH_FRAME_SECTION_NAME__ && !USE_PT_GNU_EH_FRAME]: Sanity-
	check USE_EH_FRAME_REGISTRY_ALWAYS against
	__LIBGCC_EH_FRAME_SECTION_NAME__, emit error if unsane.
	* Makefile.in (FORCE_EXPLICIT_EH_REGISTRY): New
	variable for substituted force_explicit_eh_registry.
	(CRTSTUFF_CFLAGS): Add FORCE_EXPLICIT_EH_REGISTRY.
	* configure.ac (explicit-exception-frame-registration):
	New AC_ARG_ENABLE.
	* configure: Regenerate.

From-SVN: r215443
parent 794eb939
2014-09-22 Hans-Peter Nilsson <hp@axis.com>
* crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS
override USE_PT_GNU_EH_FRAME.
[__LIBGCC_EH_FRAME_SECTION_NAME__ && !USE_PT_GNU_EH_FRAME]: Sanity-
check USE_EH_FRAME_REGISTRY_ALWAYS against
__LIBGCC_EH_FRAME_SECTION_NAME__, emit error if unsane.
* Makefile.in (FORCE_EXPLICIT_EH_REGISTRY): New
variable for substituted force_explicit_eh_registry.
(CRTSTUFF_CFLAGS): Add FORCE_EXPLICIT_EH_REGISTRY.
* configure.ac (explicit-exception-frame-registration):
New AC_ARG_ENABLE.
* configure: Regenerate.
2014-09-19 Olivier Hainque <hainque@adacore.com> 2014-09-19 Olivier Hainque <hainque@adacore.com>
* config.host (powerpc-wrs-vxworksmils): New configuration, * config.host (powerpc-wrs-vxworksmils): New configuration,
......
...@@ -50,6 +50,8 @@ target_noncanonical = @target_noncanonical@ ...@@ -50,6 +50,8 @@ target_noncanonical = @target_noncanonical@
# The rules for compiling them should be in the t-* file for the machine. # The rules for compiling them should be in the t-* file for the machine.
EXTRA_PARTS = @extra_parts@ EXTRA_PARTS = @extra_parts@
FORCE_EXPLICIT_EH_REGISTRY = @force_explicit_eh_registry@
extra-parts = libgcc-extra-parts extra-parts = libgcc-extra-parts
# Multilib support variables. # Multilib support variables.
...@@ -283,7 +285,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ ...@@ -283,7 +285,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
-finhibit-size-directive -fno-inline -fno-exceptions \ -finhibit-size-directive -fno-inline -fno-exceptions \
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
-fbuilding-libgcc -fno-stack-protector \ -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
$(INHIBIT_LIBC_CFLAGS) $(INHIBIT_LIBC_CFLAGS)
# Extra flags to use when compiling crt{begin,end}.o. # Extra flags to use when compiling crt{begin,end}.o.
......
...@@ -566,6 +566,7 @@ sfp_machine_header ...@@ -566,6 +566,7 @@ sfp_machine_header
set_use_emutls set_use_emutls
set_have_cc_tls set_have_cc_tls
vis_hide vis_hide
force_explicit_eh_registry
fixed_point fixed_point
enable_decimal_float enable_decimal_float
decimal_float decimal_float
...@@ -664,6 +665,7 @@ with_build_libsubdir ...@@ -664,6 +665,7 @@ with_build_libsubdir
enable_decimal_float enable_decimal_float
with_system_libunwind with_system_libunwind
enable_sjlj_exceptions enable_sjlj_exceptions
enable_explicit_exception_frame_registration
enable_tls enable_tls
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
...@@ -1301,6 +1303,10 @@ Optional Features: ...@@ -1301,6 +1303,10 @@ Optional Features:
to use to use
--enable-sjlj-exceptions --enable-sjlj-exceptions
force use of builtin_setjmp for exceptions force use of builtin_setjmp for exceptions
--enable-explicit-exception-frame-registration
register exception tables explicitly at module
start, for use e.g. for compatibility with
installations without PT_GNU_EH_FRAME support
--enable-tls Use thread-local storage [default=yes] --enable-tls Use thread-local storage [default=yes]
Optional Packages: Optional Packages:
...@@ -4270,6 +4276,22 @@ no) ...@@ -4270,6 +4276,22 @@ no)
;; ;;
esac esac
# Check whether --enable-explicit-exception-frame-registration was given.
if test "${enable_explicit_exception_frame_registration+set}" = set; then :
enableval=$enable_explicit_exception_frame_registration;
force_explicit_eh_registry=
if test "$enable_explicit_exception_frame_registration" = yes; then
if test "$enable_sjlj_exceptions" = yes; then
as_fn_error "Can't enable both of --enable-sjlj-exceptions
and --enable-explicit-exception-frame-registration" "$LINENO" 5
fi
force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${acl_cv_prog_gnu_ld+set}" = set; then : if test "${acl_cv_prog_gnu_ld+set}" = set; then :
......
...@@ -262,6 +262,22 @@ no) ...@@ -262,6 +262,22 @@ no)
;; ;;
esac esac
AC_ARG_ENABLE([explicit-exception-frame-registration],
[AC_HELP_STRING([--enable-explicit-exception-frame-registration],
[register exception tables explicitly at module start, for use
e.g. for compatibility with installations without PT_GNU_EH_FRAME support])],
[
force_explicit_eh_registry=
if test "$enable_explicit_exception_frame_registration" = yes; then
if test "$enable_sjlj_exceptions" = yes; then
AC_MSG_ERROR([Can't enable both of --enable-sjlj-exceptions
and --enable-explicit-exception-frame-registration])
fi
force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS
fi
])
AC_SUBST([force_explicit_eh_registry])
AC_LIB_PROG_LD_GNU AC_LIB_PROG_LD_GNU
AC_MSG_CHECKING([for thread model used by GCC]) AC_MSG_CHECKING([for thread model used by GCC])
......
...@@ -131,7 +131,12 @@ call_ ## FUNC (void) \ ...@@ -131,7 +131,12 @@ call_ ## FUNC (void) \
# define USE_PT_GNU_EH_FRAME # define USE_PT_GNU_EH_FRAME
#endif #endif
#if defined(__LIBGCC_EH_FRAME_SECTION_NAME__) && !defined(USE_PT_GNU_EH_FRAME) #ifdef USE_EH_FRAME_REGISTRY_ALWAYS
# ifndef __LIBGCC_EH_FRAME_SECTION_NAME__
# error "Can't use explicit exception-frame-registration without __LIBGCC_EH_FRAME_SECTION_NAME__"
# endif
#endif
#if defined(__LIBGCC_EH_FRAME_SECTION_NAME__) && (!defined(USE_PT_GNU_EH_FRAME) || defined(USE_EH_FRAME_REGISTRY_ALWAYS))
# define USE_EH_FRAME_REGISTRY # define USE_EH_FRAME_REGISTRY
#endif #endif
#if defined(__LIBGCC_EH_FRAME_SECTION_NAME__) \ #if defined(__LIBGCC_EH_FRAME_SECTION_NAME__) \
......
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