"g++ --verbose" - GCC Compiler Steps and Settings

Provides a tutorial example on how to dump GCC compiler steps and settings using the 'g++ --verbose' command option.

If you are running into issues with the GCC C++ compiler, you may want to use the "g++ --verbose" to dump all current settings from the compiler.

herong$ g++ --verbose hello.cpp

Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto ...

/usr/libexec/gcc/x86_64-redhat-linux/8/cc1plus -quiet -v -D_GNU_SOURCE hello.cpp
   -quiet -dumpbase hello.cpp -mtune=generic -march=x86-64 -auxbase hello -version
   -o /tmp/cceaNqFM.s
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed"
ignoring nonexistent directory "/usr/x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...>  search starts here:
End of search list.

as -v --64 -o /tmp/ccGgvc09.o /tmp/cceaNqFM.s

COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/: ...

/usr/libexec/gcc/x86_64-redhat-linux/8/collect2 -plugin \
   /usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so ...

So the "g++" command actually runs 3 commands: cc1plus, as, collect2.

Table of Contents

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Software Package Manager on CentOS - DNF and YUM

 Running Apache Web Server (httpd) on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

 Email Client Tools - Mail User Agents (MUA)

GCC - C/C++ Compiler

 Install GCC C/C++ Compilers

"g++ --verbose" - GCC Compiler Steps and Settings

 "g++ -I..." and CPATH Environment Variable

 "g++ -l..." to Link with Library Files

 "g++ -c" and "ar src" to Build Static Library

 "g++ -shared" to Build Dynamic Library

 "ldd" - Dynamic Library Dependency Checker

 "make" - Manage Program Build Process

 Conda - Environment and Package Manager

 Tools and Utilities


 Full Version in PDF/EPUB