I had asked a similar thing for GDB at: How to build the GDB documentation from source? , and it changed my life, now I want the same for GCC!
I managed to build the docs on Ubuntu 16.04 and gcc 6.4.0 source tree (to match my host) with:
./contrib/download_prerequisites ./configure make host-x86_64-pc-linux-gnu/gcc make html xdg-open HTML/gcc-6.4.0/gcc/index.html
But I could not make it put everything into a single page, I tried:
make html MAKEINFO=makeinfo MAKEINFOFLAGS='--no-split'
but it does not work as for binutils.
If I don't build GCC itself first, and do just
make html directly, it fails with:
checking for x86_64-pc-linux-gnu-gcc... /data/git/gcc/host-x86_64-pc-linux-gnu/gcc/xgcc -B/data/git/gcc/host-x86_64-pc-linux-gnu/gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/ local/x86_64-pc-linux-gnu/sys-include checking for C compiler default output file name... configure: error: in `/data/git/gcc/x86_64-pc-linux-gnu/libgomp': configure: error: C compiler cannot create executables See `config.log' for more details. Makefile:24442: recipe for target 'configure-target-libgomp' failed make: *** [configure-target-libgomp] Error 1 make: Leaving directory '/data/git/gcc' Makefile:1268: recipe for target 'do-html' failed make: *** [do-html] Error 2
The problem is that the file:
does not exist, I wonder why it is needed since all I want is to build the docs.
I would like to obtain the docs available at: https://gcc.gnu.org/onlinedocs/gcc-6.4.0/gcc/ and hopefully other manuals listed at https://gcc.gnu.org/onlinedocs/ such as CPP manual, each of them as a single HTML page that I can Ctrl + F easily on.