Talk:GCC Tips

From eLinux.org
Revision as of 15:26, 26 July 2008 by Martyl (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I don't see the same output with gcc -###.

Each argument is quoted. It was introduced in 3.x.

: leisner@thinkpad 11:19:21;gcc -### foo.c
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
 "/usr/lib/gcc/i486-linux-gnu/4.1.3/cc1" "-quiet" "foo.c" "-quiet" "-dumpbase" "foo.c" "-mtune=generic" "-auxbase" "foo" "-fstack-protector" "-fstack-protector" "-o" "/tmp/ccHgtcb6.s"
 "as" "--traditional-format" "-Qy" "-o" "/tmp/cc60Wmj2.o" "/tmp/ccHgtcb6.s"
 "/usr/lib/gcc/i486-linux-gnu/4.1.3/collect2" "--eh-frame-hdr" "-m" "elf_i386" "--hash-style=both" "-dynamic-linker" "/lib/ld-linux.so.2" "/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/crt1.o" "/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/crti.o" "/usr/lib/gcc/i486-linux-gnu/4.1.3/crtbegin.o" "-L/usr/X11R6/lib/../lib" "-L/usr/lib/gcc/i486-linux-gnu/4.1.3" "-L/usr/lib/gcc/i486-linux-gnu/4.1.3" "-L/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib" "-L/lib/../lib" "-L/usr/lib/../lib" "/tmp/cc60Wmj2.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/gcc/i486-linux-gnu/4.1.3/crtend.o" "/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/crtn.o"

I've never used this -- but always used gcc -v to see the passes