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:

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/
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[1]: *** [configure-target-libgomp] Error 1
make[1]: 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.


this worked for me:

cd /path/to/gcc-8.2.0/gcc
make gcc-vers.texi
mkdir HTML
makeinfo --html --no-split -Idoc -Idoc/include -o HTML doc/gcc.texi

Same for gccint.html, cpp.html, etc. gcc's makefiles ignore the MAKEINFOFLAGS variable.

  • Thanks, this worked for gcc. I couldn't get it to work for libstdc++-v3 though, but it is already a big progress. – Ciro Santilli 新疆改造中心996ICU六四事件 Jan 8 at 11:45
  • 1
    It seems that libstdc++ docs aren't built from Texinfo at all, but from DocBook via XSLT which is a completely different problem. (probably installing docbook-utils and then using docbook2html -u should do it, but I haven't tried it). – mosvy Jan 8 at 17:50

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.