What is this check error?

Dave Korn dave.korn.cygwin@googlemail.com
Fri Apr 16 15:54:00 GMT 2010

On 16/04/2010 05:47, H.J. Lu wrote:
> On Linux/x86-64, "make check" gave me
> make[6]: *** No rule to make target `check-lto', needed by `check'.
> Where does it come from?

  I saw this too, but now you made me wonder.  So:

  check-lto is in CHECK_TARGETS because all languages are unconditionally
added to check_languages in configure.ac here:

> check_languages=
> for language in $all_selected_languages
> do
> 	check_languages="$check_languages check-$language"
> done

  The check-% targets in Makefile.in are only matched for languages matching

> # This is only used for check-% targets that aren't parallelized.
> $(filter-out $(lang_checks_parallelized),$(lang_checks)): check-% : site.exp
  [ snip ]

> $(patsubst %,%-subtargets,$(filter-out $(lang_checks_parallelized),$(lang_checks))): check-%-subtargets:

and lang_checks is built up from contributions from each Make-lang.in:

> $ grep lang_checks */Ma*
> cp/Make-lang.in:lang_checks += check-g++
> cp/Make-lang.in:lang_checks_parallelized += check-g++
> fortran/Make-lang.in:lang_checks += check-gfortran
> fortran/Make-lang.in:lang_checks_parallelized += check-gfortran
> objc/Make-lang.in:lang_checks += check-objc
> objcp/Make-lang.in:lang_checks += check-obj-c++

  Probably the simplest solution would be for lto/Make-lang.in to add a dummy
check-lto goal that does nothing, I think.  The original error itself is harmless.


More information about the Gcc mailing list