使用命令:gcc -v main.c
也就是gcc -v 有效C源文件
注意-v后面要加有效C源文件后,输出信息才包含系统头文件路径
gcc -v的输出:
使用内建 specs。COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper
目标:i686-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
线程模型:posix
gcc 版本 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
gcc -v main.c的输出:
使用内建 specs。COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper
目标:i686-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
线程模型:posix
gcc 版本 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=i686'
/usr/libexec/gcc/i686-redhat-linux/4.5.1/cc1 -quiet -v main.c -quiet -dumpbase main.c -mtune=generic -march=i686 -auxbase main -version -o /tmp/ccHNJSgt.s
GNU C (GCC) 版本 4.5.1 20100924 (Red Hat 4.5.1-4) (i686-redhat-linux)
由 GNU C 版本 4.5.1 20100924 (Red Hat 4.5.1-4) 编译,GMP 版本 4.3.1,MPFR 版本 2.4.2,MPC 版本 0.8.1
GGC 准则:--param ggc-min-expand=100 --param ggc-min-heapsize=131072
忽略不存在的目录“/usr/lib/gcc/i686-redhat-linux/4.5.1/include-fixed”
忽略不存在的目录“/usr/lib/gcc/i686-redhat-linux/4.5.1/../../../../i686-redhat-linux/include”
#include "..." 搜索从这里开始:
#include <...> 搜索从这里开始:
/usr/local/include
/usr/lib/gcc/i686-redhat-linux/4.5.1/include
/usr/include
搜索列表结束。
GNU C (GCC) 版本 4.5.1 20100924 (Red Hat 4.5.1-4) (i686-redhat-linux)
由 GNU C 版本 4.5.1 20100924 (Red Hat 4.5.1-4) 编译,GMP 版本 4.3.1,MPFR 版本 2.4.2,MPC 版本 0.8.1
GGC 准则:--param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 96e2ff891a3517bf2aed246a142fe05d
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=i686'
as -V -Qy --32 -o /tmp/ccYxkDxw.o /tmp/ccHNJSgt.s
GNU assembler version 2.20.51.0.7 (i686-redhat-linux) using BFD version version 2.20.51.0.7-5.fc14 20100318
COMPILER_PATH=/usr/libexec/gcc/i686-redhat-linux/4.5.1/:/usr/libexec/gcc/i686-redhat-linux/4.5.1/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.5.1/:/usr/lib/gcc/i686-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/i686-redhat-linux/4.5.1/:/usr/lib/gcc/i686-redhat-linux/4.5.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=i686'
/usr/libexec/gcc/i686-redhat-linux/4.5.1/collect2 --build-id --no-add-needed --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcc/i686-redhat-linux/4.5.1/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/4.5.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/4.5.1/crtbegin.o -L/usr/lib/gcc/i686-redhat-linux/4.5.1 -L/usr/lib/gcc/i686-redhat-linux/4.5.1/../../.. /tmp/ccYxkDxw.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/4.5.1/crtend.o /usr/lib/gcc/i686-redhat-linux/4.5.1/../../../crtn.o