2

Has anyone any evidence that currently GCC is bootstrapped in non trivial ways to detect bugs for certain features and architectures? Or at least point to some documentation where I can find wich real bootstrap tecniques are used to check for bugs in GCC?

Regular bootstrap

  • Use GCC version (X-1) to compile GCC version (X), call that A
  • A is the new compiler with slow binary.
  • Use the new compiler A to compile itself and produce B
  • B is the new compiler with fast binary
  • let B compile itself and produce C
  • At this point if A is bug free, then binary dump of produced executable of B and C should be the same.

The GCC approach is too keep code features used when developing to a minimum so that if bootstrap succed you know that at least minimal set of features is bug free. (Opposed to Clang where a greater number of features is used just to increase the coverage by simply bootstrapping).

Profile guided optimization boostrap

  • Use A to compile itself using the -fprofile-generate flag and produce B
  • Use B to compile itself (it will generate profile info)
  • Use A to compile itslef using the -fprofile-use and produce B'

  • Use B' to compile itself using the -fprofile-generate flag and produce C

  • Use C to compile itself (it will generate profile info)
  • Use B' to compile itslef using the -fprofile-use and produce C'

  • At this point if A is bug free, then binary dump of produced executable of B' and C' should be the same.

Backward and forward bootstrap

  • Use GCC version X to compile GCC version (X-1) and produce A
  • Then start a regular bootstrap for A
  • Use A to compile GCC version X and produce D
  • Do a regular bootstrap on D.

Off topic: I think it would be nice if someone create a graph of GCC bootstraps keeping into account special bootstraps (like cross-platform builds), and see where bootstraps fails and quickly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.