diff options
author | Rasmus Villemoes <rv@rasmusvillemoes.dk> | 2018-06-27 12:04:25 +0200 |
---|---|---|
committer | Rasmus Villemoes <villemoes@gcc.gnu.org> | 2018-06-27 10:04:25 +0000 |
commit | 1765b0231029c0479ddcf5d54e8f4882c5feda94 (patch) | |
tree | 12e1333e335da0d5357ee4418e40356b5c9ab765 /gcc | |
parent | ed4e2a178609194673c81a038034e16832a0a9be (diff) | |
download | gcc-1765b0231029c0479ddcf5d54e8f4882c5feda94.zip gcc-1765b0231029c0479ddcf5d54e8f4882c5feda94.tar.gz gcc-1765b0231029c0479ddcf5d54e8f4882c5feda94.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/Makefile.in | 6 | ||||
-rwxr-xr-x | gcc/configure | 16 | ||||
-rw-r--r-- | gcc/configure.ac | 5 | ||||
-rw-r--r-- | gcc/doc/install.texi | 4 |
5 files changed, 34 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 34a0e25..3604fd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +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> * config/arm/arm-cpus.in (cortex-a76): New entry. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index d8f3e88..1f38cac 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -137,8 +137,10 @@ SUBDIRS =@subdirs@ build # Selection of languages to be made. CONFIG_LANGUAGES = @all_selected_languages@ -LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) gcov-tool$(exeext) \ - $(CONFIG_LANGUAGES) +LANGUAGES = c $(CONFIG_LANGUAGES) +ifeq (@enable_gcov@,yes) +LANGUAGES += gcov$(exeext) gcov-dump$(exeext) gcov-tool$(exeext) +endif # Default values for variables overridden in Makefile fragments. # CFLAGS is for the user to override to, e.g., do a cross build with -O2. diff --git a/gcc/configure b/gcc/configure index 60d3739..bfef4be 100755 --- a/gcc/configure +++ b/gcc/configure @@ -779,6 +779,7 @@ REPORT_BUGS_TEXI REPORT_BUGS_TO PKGVERSION CONFIGURE_SPECS +enable_gcov enable_shared enable_fixed_point enable_decimal_float @@ -914,6 +915,7 @@ enable_vtable_verify enable_objc_gc with_dwarf2 enable_shared +enable_gcov with_specs with_pkgversion with_bugurl @@ -1634,6 +1636,7 @@ Optional Features: --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 + --disable-gcov don't provide libgcov and related host tools --enable-languages=LIST specify which front-ends to build --disable-rpath do not hardcode runtime library paths --enable-sjlj-exceptions @@ -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. if test "${with_specs+set}" = set; then : @@ -18448,7 +18460,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18451 "configure" +#line 18463 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18554,7 +18566,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18557 "configure" +#line 18569 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 010ecd2..4fc851c 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -921,6 +921,11 @@ AC_ARG_ENABLE(shared, ], [enable_shared=yes]) 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, [AS_HELP_STRING([--with-specs=SPECS], [add SPECS to driver command-line processing])], diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 7c5cdc7..03eaeed 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -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). @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 Specify that multiple target libraries to support different target variants, calling |