|
发表于 2006-2-17 17:42:54
|
显示全部楼层
- [matt@localhost tmp]$ cat main.c
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- int i;
- i = pow(2,2);
- printf("2x2 is %d", i);
- return 0;
- }
- [matt@localhost tmp]$ gcc -v main.c
- 使用内建 specs。
- 目标:i386-redhat-linux
- 配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
- 线程模型:posix
- gcc 版本 4.0.2 20051125 (Red Hat 4.0.2-8)
- /usr/libexec/gcc/i386-redhat-linux/4.0.2/cc1 -quiet -v main.c -quiet -dumpbase main.c -auxbase main -version -o /tmp/cckRAKQI.s
- 忽略不存在的目录“/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../i386-redhat-linux/include”
- #include "..." 搜索从这里开始:
- #include <...> 搜索从这里开始:
- /usr/local/include
- /usr/lib/gcc/i386-redhat-linux/4.0.2/include
- /usr/include
- 搜索列表结束。
- GNU C version 4.0.2 20051125 (Red Hat 4.0.2-8) (i386-redhat-linux)
- compiled by GNU C version 4.0.2 20051125 (Red Hat 4.0.2-8).
- GGC 准则:--param ggc-min-expand=99 --param ggc-min-heapsize=129201
- as -V -Qy -o /tmp/ccpKSXRl.o /tmp/cckRAKQI.s
- GNU assembler version 2.15.94.0.2.2 (i386-redhat-linux) using BFD version 2.15.94.0.2.2 20041220
- /usr/libexec/gcc/i386-redhat-linux/4.0.2/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcc/i386-redhat-linux/4.0.2/../../../crt1.o /usr/lib/gcc/i386-redhat-linux/4.0.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.0.2/crtbegin.o -L/usr/lib/gcc/i386-redhat-linux/4.0.2 -L/usr/lib/gcc/i386-redhat-linux/4.0.2 -L/usr/lib/gcc/i386-redhat-linux/4.0.2/../../.. /tmp/ccpKSXRl.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i386-redhat-linux/4.0.2/crtend.o /usr/lib/gcc/i386-redhat-linux/4.0.2/../../../crtn.o
- [matt@localhost tmp]$ ./a.out
- 2x2 is 4[matt@localhost tmp]$
复制代码 |
|