The ubiquitous GNU Compiler Collection is one of the fundamental underpinnings of Open Source and after a quarter of a century of development it is a formidable development tool. William von Hagen has done a masterful job in the second edition of the Definitive Guide to GCC in showing how to make the most of Richard Stallman's gift to the world. Occasionally the Author's sense of humour breaks up what can be a rather dry subject.
After a brief introduction to GCC, the author gets right into how to use GCC to compile C, C++, Fortran and Java respectively in the first four chapters of the book. While most of the book uses C code in examples of compiler usage, the Java chapter contains a good section on creating and using Jar files and Shared Libraries along with a brief section on how GCC supports Java and C++ interoperability. You quickly learn how to correctly use compiler flags to get the results you intend with these languages and gain an understanding of how they should be used. Importantly, without this understanding, it is easy to define flags that do not work as you expect, so the right off, this book can prove its worth. If you don't know what options are being passed to the gcc compiler in your makefile or know exactly what they do, then you aren't really in control of the build process for your code.
A significant change to the first edition was moving the first chapter of that edition, which covers the general use of the GCC compilers, into Appendix A. At 81 pages, this is the real meat in this book and I'm not sure that this was a good move, but it does align better with Appendix B, which covers machine and processor-specific options for GCC and hence can be considered an extension of Appendix A. The appendixes are rounded out with one on how to use GCC's On Line Help plus additional GCC support resources are provided in chapter 10.
My recommendations on how to get the most out of this book:
Read Appendix A, then check out Appendix B for the use of GCC extensions relevant to your particular machine/processor, then read the relevant chapter of the first four chapters for your specific language of interest. If you need to optimise or wish to debug your code using GCC's debugger and the use of gcov and gprof, check out chapters 5 and 6 respectively; I found these chapters particularly interesting. If you have problems that you suspect may be compiler related, chapter 9 covers troubleshooting. If your use of GCC isn't on an x86 IBM PC based computer, then check out Chapter 14, which covers building cross compilers with GCC and use Appendix B as necessary. If your target is an embedded design, this chapter, plus the optimisation chapter 5 along with chapter 13, which covers using alternate C libraries, will give you the background you need to use GCC for your project. Autoconf, automake and Libtool are covered in detail in chapters 7 and 8 and if you are interested in compiling GCC and building and installing Glibc (the author includes some valid reasons to do this), then these are covered in chapters 11 and 12.
Personally, I found the index frustrating to use, which I guess isn't surprising given the difficulty of covering the "1.3 zillion options" provided by GCC. If you heavily use the book, you may be better off purchasing the eBook, so you can search the book directly.