Commit 1765b023 by Rasmus Villemoes Committed by Rasmus Villemoes

add support for --disable-gcov

For some targets (in my case VxWorks 5.5), libgcov does not compile due
to missing functions and macros such as getpid() and F_OK.

Incidentally, gcc/Makefile.in already contains comments such as

# Install gcov if it was compiled.

but there is no logic in place to actually allow gcov to not be
compiled.

So add an option for disabling build and install of libgcov and the
related host tools.

From-SVN: r262180
parent ed4e2a17
2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* configure.ac: Add --disable-gcov option.
* configure: Regenerate.
* Makefile.in: Honour @enable_gcov@.
* doc/install.texi: Document --disable-gcov.
2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (cortex-a76): New entry. * config/arm/arm-cpus.in (cortex-a76): New entry.
......
...@@ -137,8 +137,10 @@ SUBDIRS =@subdirs@ build ...@@ -137,8 +137,10 @@ SUBDIRS =@subdirs@ build
# Selection of languages to be made. # Selection of languages to be made.
CONFIG_LANGUAGES = @all_selected_languages@ CONFIG_LANGUAGES = @all_selected_languages@
LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) gcov-tool$(exeext) \ LANGUAGES = c $(CONFIG_LANGUAGES)
$(CONFIG_LANGUAGES) ifeq (@enable_gcov@,yes)
LANGUAGES += gcov$(exeext) gcov-dump$(exeext) gcov-tool$(exeext)
endif
# Default values for variables overridden in Makefile fragments. # Default values for variables overridden in Makefile fragments.
# CFLAGS is for the user to override to, e.g., do a cross build with -O2. # CFLAGS is for the user to override to, e.g., do a cross build with -O2.
......
...@@ -779,6 +779,7 @@ REPORT_BUGS_TEXI ...@@ -779,6 +779,7 @@ REPORT_BUGS_TEXI
REPORT_BUGS_TO REPORT_BUGS_TO
PKGVERSION PKGVERSION
CONFIGURE_SPECS CONFIGURE_SPECS
enable_gcov
enable_shared enable_shared
enable_fixed_point enable_fixed_point
enable_decimal_float enable_decimal_float
...@@ -914,6 +915,7 @@ enable_vtable_verify ...@@ -914,6 +915,7 @@ enable_vtable_verify
enable_objc_gc enable_objc_gc
with_dwarf2 with_dwarf2
enable_shared enable_shared
enable_gcov
with_specs with_specs
with_pkgversion with_pkgversion
with_bugurl with_bugurl
...@@ -1634,6 +1636,7 @@ Optional Features: ...@@ -1634,6 +1636,7 @@ Optional Features:
--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
--disable-gcov don't provide libgcov and related host tools
--enable-languages=LIST specify which front-ends to build --enable-languages=LIST specify which front-ends to build
--disable-rpath do not hardcode runtime library paths --disable-rpath do not hardcode runtime library paths
--enable-sjlj-exceptions --enable-sjlj-exceptions
...@@ -7628,6 +7631,15 @@ fi ...@@ -7628,6 +7631,15 @@ fi
# Check whether --enable-gcov was given.
if test "${enable_gcov+set}" = set; then :
enableval=$enable_gcov;
else
enable_gcov=yes
fi
# Check whether --with-specs was given. # Check whether --with-specs was given.
if test "${with_specs+set}" = set; then : if test "${with_specs+set}" = set; then :
...@@ -18448,7 +18460,7 @@ else ...@@ -18448,7 +18460,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 18451 "configure" #line 18463 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -18554,7 +18566,7 @@ else ...@@ -18554,7 +18566,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 18557 "configure" #line 18569 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
......
...@@ -921,6 +921,11 @@ AC_ARG_ENABLE(shared, ...@@ -921,6 +921,11 @@ AC_ARG_ENABLE(shared,
], [enable_shared=yes]) ], [enable_shared=yes])
AC_SUBST(enable_shared) AC_SUBST(enable_shared)
AC_ARG_ENABLE(gcov,
[ --disable-gcov don't provide libgcov and related host tools],
[], [enable_gcov=yes])
AC_SUBST(enable_gcov)
AC_ARG_WITH(specs, AC_ARG_WITH(specs,
[AS_HELP_STRING([--with-specs=SPECS], [AS_HELP_STRING([--with-specs=SPECS],
[add SPECS to driver command-line processing])], [add SPECS to driver command-line processing])],
......
...@@ -1044,6 +1044,10 @@ virtual calls in verifiable mode at all. However the libvtv library will ...@@ -1044,6 +1044,10 @@ virtual calls in verifiable mode at all. However the libvtv library will
still be built (see @option{--disable-libvtv} to turn off building libvtv). still be built (see @option{--disable-libvtv} to turn off building libvtv).
@option{--disable-vtable-verify} is the default. @option{--disable-vtable-verify} is the default.
@item --disable-gcov
Specify that the run-time library used for coverage analysis
and associated host tools should not be built.
@item --disable-multilib @item --disable-multilib
Specify that multiple target Specify that multiple target
libraries to support different target variants, calling libraries to support different target variants, calling
......
2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* configure.ac: Add --disable-gcov option.
* configure: Regenerate.
* Makefile.in: Honour @enable_gcov@.
2018-06-21 Christophe Lyon <christophe.lyon@linaro.org> 2018-06-21 Christophe Lyon <christophe.lyon@linaro.org>
* config/arm/lib1funcs.S (__ARM_ARCH__): Remove definitions, use * config/arm/lib1funcs.S (__ARM_ARCH__): Remove definitions, use
......
...@@ -36,6 +36,7 @@ SHELL = @SHELL@ ...@@ -36,6 +36,7 @@ SHELL = @SHELL@
cpu_type = @cpu_type@ cpu_type = @cpu_type@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_gcov = @enable_gcov@
double_type_size = @double_type_size@ double_type_size = @double_type_size@
long_double_type_size = @long_double_type_size@ long_double_type_size = @long_double_type_size@
decimal_float = @decimal_float@ decimal_float = @decimal_float@
...@@ -941,7 +942,10 @@ libgcc.a libgcov.a libunwind.a libgcc_eh.a: ...@@ -941,7 +942,10 @@ libgcc.a libgcov.a libunwind.a libgcc_eh.a:
$(RANLIB) $@ $(RANLIB) $@
all: libgcc.a libgcov.a all: libgcc.a
ifeq ($(enable_gcov),yes)
all: libgcov.a
endif
ifneq ($(LIBUNWIND),) ifneq ($(LIBUNWIND),)
all: libunwind.a all: libunwind.a
...@@ -1164,9 +1168,11 @@ install-leaf: $(install-shared) $(install-libunwind) ...@@ -1164,9 +1168,11 @@ install-leaf: $(install-shared) $(install-libunwind)
$(INSTALL_DATA) libgcc.a $(DESTDIR)$(inst_libdir)/ $(INSTALL_DATA) libgcc.a $(DESTDIR)$(inst_libdir)/
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc.a chmod 644 $(DESTDIR)$(inst_libdir)/libgcc.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc.a $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc.a
ifeq ($(enable_libgcov),yes)
$(INSTALL_DATA) libgcov.a $(DESTDIR)$(inst_libdir)/ $(INSTALL_DATA) libgcov.a $(DESTDIR)$(inst_libdir)/
chmod 644 $(DESTDIR)$(inst_libdir)/libgcov.a chmod 644 $(DESTDIR)$(inst_libdir)/libgcov.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
endif
parts="$(INSTALL_PARTS)"; \ parts="$(INSTALL_PARTS)"; \
for file in $$parts; do \ for file in $$parts; do \
......
...@@ -620,6 +620,7 @@ build_cpu ...@@ -620,6 +620,7 @@ build_cpu
build build
with_aix_soname with_aix_soname
enable_vtable_verify enable_vtable_verify
enable_gcov
enable_shared enable_shared
libgcc_topdir libgcc_topdir
target_alias target_alias
...@@ -667,6 +668,7 @@ with_target_subdir ...@@ -667,6 +668,7 @@ with_target_subdir
with_cross_host with_cross_host
with_ld with_ld
enable_shared enable_shared
enable_gcov
enable_vtable_verify enable_vtable_verify
with_aix_soname with_aix_soname
enable_version_specific_runtime_libs enable_version_specific_runtime_libs
...@@ -1306,6 +1308,7 @@ Optional Features: ...@@ -1306,6 +1308,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-shared don't provide a shared libgcc --disable-shared don't provide a shared libgcc
--disable-gcov don't provide libgcov and related host tools
--enable-vtable-verify Enable vtable verification feature --enable-vtable-verify Enable vtable verification feature
--enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory
--enable-maintainer-mode --enable-maintainer-mode
...@@ -2199,6 +2202,15 @@ fi ...@@ -2199,6 +2202,15 @@ fi
# Check whether --enable-gcov was given.
if test "${enable_gcov+set}" = set; then :
enableval=$enable_gcov;
else
enable_gcov=yes
fi
# Check whether --enable-vtable-verify was given. # Check whether --enable-vtable-verify was given.
if test "${enable_vtable_verify+set}" = set; then : if test "${enable_vtable_verify+set}" = set; then :
enableval=$enable_vtable_verify; case "$enableval" in enableval=$enable_vtable_verify; case "$enableval" in
......
...@@ -68,6 +68,11 @@ AC_ARG_ENABLE(shared, ...@@ -68,6 +68,11 @@ AC_ARG_ENABLE(shared,
], [enable_shared=yes]) ], [enable_shared=yes])
AC_SUBST(enable_shared) AC_SUBST(enable_shared)
AC_ARG_ENABLE(gcov,
[ --disable-gcov don't provide libgcov and related host tools],
[], [enable_gcov=yes])
AC_SUBST(enable_gcov)
AC_ARG_ENABLE(vtable-verify, AC_ARG_ENABLE(vtable-verify,
[ --enable-vtable-verify Enable vtable verification feature ], [ --enable-vtable-verify Enable vtable verification feature ],
[case "$enableval" in [case "$enableval" in
......
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