Commit 5a460280 by Ilia Diachkov Committed by Jim Wilson

Add --disable-tm-clone-registry libgcc configure option.

This patch adds libgcc configuration option to disable TM clone 
registry. This option helps to reduce code size for embedded targets 
which do not need transactional memory support.

	gcc/
	* doc/install.texi: Document --disable-tm-clone-registry.
	libgcc/
	* Makefile.in (USE_TM_CLONE_REGISTRY): New.
	(CRTSTUFF_CFLAGS): Use USE_TM_CLONE_REGISTRY.
	* configure.ac: Add --disable-tm-clone-registry option.
	* configure: Regenerate.

From-SVN: r272769
parent 7ffc7de5
2019-06-27 Ilia Diachkov <ilia.diachkov@optimitech.com>
* doc/install.texi: Document --disable-tm-clone-registry.
2019-06-27 Jakub Jelinek <jakub@redhat.com> 2019-06-27 Jakub Jelinek <jakub@redhat.com>
PR c++/91024 PR c++/91024
......
...@@ -1284,6 +1284,11 @@ assumptions made by the configure test are incorrect. ...@@ -1284,6 +1284,11 @@ assumptions made by the configure test are incorrect.
Specify that the target does not support TLS. Specify that the target does not support TLS.
This is an alias for @option{--enable-tls=no}. This is an alias for @option{--enable-tls=no}.
@item --disable-tm-clone-registry
Disable TM clone registry in libgcc. It is enabled in libgcc by default.
This option helps to reduce code size for embedded targets which do
not use transactional memory.
@item --with-cpu=@var{cpu} @item --with-cpu=@var{cpu}
@itemx --with-cpu-32=@var{cpu} @itemx --with-cpu-32=@var{cpu}
@itemx --with-cpu-64=@var{cpu} @itemx --with-cpu-64=@var{cpu}
......
2019-06-27 Ilia Diachkov <ilia.diachkov@optimitech.com>
* Makefile.in (USE_TM_CLONE_REGISTRY): New.
(CRTSTUFF_CFLAGS): Use USE_TM_CLONE_REGISTRY.
* configure.ac: Add --disable-tm-clone-registry option.
* configure: Regenerate.
2019-06-27 Martin Liska <mliska@suse.cz> 2019-06-27 Martin Liska <mliska@suse.cz>
* libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously * libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously
......
...@@ -259,6 +259,8 @@ PICFLAG = @PICFLAG@ ...@@ -259,6 +259,8 @@ PICFLAG = @PICFLAG@
CET_FLAGS = @CET_FLAGS@ CET_FLAGS = @CET_FLAGS@
USE_TM_CLONE_REGISTRY = @use_tm_clone_registry@
# Defined in libgcc2.c, included only in the static library. # Defined in libgcc2.c, included only in the static library.
LIB2FUNCS_ST = _eprintf __gcc_bcmp LIB2FUNCS_ST = _eprintf __gcc_bcmp
...@@ -299,7 +301,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ...@@ -299,7 +301,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
$(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \ $(NO_PIE_CFLAGS) -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 $(FORCE_EXPLICIT_EH_REGISTRY) \ -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
$(INHIBIT_LIBC_CFLAGS) $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
# Extra flags to use when compiling crt{begin,end}.o. # Extra flags to use when compiling crt{begin,end}.o.
CRTSTUFF_T_CFLAGS = CRTSTUFF_T_CFLAGS =
......
...@@ -604,6 +604,7 @@ vis_hide ...@@ -604,6 +604,7 @@ vis_hide
solaris_ld_v2_maps solaris_ld_v2_maps
real_host_noncanonical real_host_noncanonical
accel_dir_suffix accel_dir_suffix
use_tm_clone_registry
force_explicit_eh_registry force_explicit_eh_registry
CET_FLAGS CET_FLAGS
fixed_point fixed_point
...@@ -712,6 +713,7 @@ enable_decimal_float ...@@ -712,6 +713,7 @@ enable_decimal_float
with_system_libunwind with_system_libunwind
enable_cet enable_cet
enable_explicit_exception_frame_registration enable_explicit_exception_frame_registration
enable_tm_clone_registry
with_glibc_version with_glibc_version
enable_tls enable_tls
with_gcc_major_version_only with_gcc_major_version_only
...@@ -1355,6 +1357,7 @@ Optional Features: ...@@ -1355,6 +1357,7 @@ Optional Features:
register exception tables explicitly at module register exception tables explicitly at module
start, for use e.g. for compatibility with start, for use e.g. for compatibility with
installations without PT_GNU_EH_FRAME support installations without PT_GNU_EH_FRAME support
--disable-tm-clone-registry disable TM clone registry
--enable-tls Use thread-local storage [default=yes] --enable-tls Use thread-local storage [default=yes]
Optional Packages: Optional Packages:
...@@ -4953,6 +4956,18 @@ fi ...@@ -4953,6 +4956,18 @@ fi
# Check whether --enable-tm-clone-registry was given.
if test "${enable_tm_clone_registry+set}" = set; then :
enableval=$enable_tm_clone_registry;
use_tm_clone_registry=
if test "$enable_tm_clone_registry" = no; then
use_tm_clone_registry=-DUSE_TM_CLONE_REGISTRY=0
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 ${acl_cv_prog_gnu_ld+:} false; then : if ${acl_cv_prog_gnu_ld+:} false; then :
......
...@@ -261,6 +261,16 @@ fi ...@@ -261,6 +261,16 @@ fi
]) ])
AC_SUBST([force_explicit_eh_registry]) AC_SUBST([force_explicit_eh_registry])
AC_ARG_ENABLE([tm-clone-registry],
[ --disable-tm-clone-registry disable TM clone registry],
[
use_tm_clone_registry=
if test "$enable_tm_clone_registry" = no; then
use_tm_clone_registry=-DUSE_TM_CLONE_REGISTRY=0
fi
])
AC_SUBST([use_tm_clone_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])
......
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