Article 6CNBC gcc options: --save-temps, --verbose; and redirection operator.

gcc options: --save-temps, --verbose; and redirection operator.

by
ajiten
from LinuxQuestions.org on (#6CNBC)
I have a quicksort.c file, that compiled using, the below commands:

Code:$ gcc --save-temps --verbose quicksort.c -o quicksort> quicksort.txtThe gcc command options (a) --save-temps, & (b) --verbose; are taken from a book, that states:
Code:# Compiling with verbose option and preserving the intermediate files
$ gcc --save-temps --verbose ex1.c -o ex1
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/cpp0.exe -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -
D_X86_=1 -D_X86_=1 -Asystem(winnt) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -
Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -
D__stdcall=__attribute__((__stdcall_)) -D__cdecl=__attribute__((__cdecl__)) -
D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -
D__declspec(x)=__attribute__((x)) -D__CYGWIN32__ -D__CYG WIN__ -Dunix -D__unix__ -D__unix -isystem/
usr/local/include -idirafter /usr/include -idirafter /usr/include/w32api ex1.c ex1.i
GNU CPP version 2.95.3-5 (cygwin special) (80386, BSD syntax)
#include ..." search starts here:
#include <...> search starts here:
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/include
/usr/include
/usr/include/w32api
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/cc1.exe ex1.i -quiet -dumpbase ex1.c -version -o ex1.s
GNU C version 2.95.3-5 (cygwin special) (i686-pc-cygwin) compiled by GNU C version 2.95.3-5
cygwin special).
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/as.exe -o ex1.o ex1.s
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/collect2. exe -Bdynamic --dll-search-pref x=cyg -o
ex1.exe /usr/lib/crt0.o -L/usr/local/lib -L/usr/lib -L/usr/lib/w32api -L/usr/lib/gcc-lib/i686-pc -
cygwin/2.95.3-5 ex1.o -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgccBut, don't remember from where took the subscript of redirection: > text_file; i.e.: > quicksort.txt

So, two doubts:
1. Unable to grasp the full significance, and how to use for debug, or other purposes, the significance of the two options; i.e., (a): --save-temps, &: (b) --verbose.
2. The purpose of the redirection, at the end of the command; as if get compilation done correctly, or wromg; it has empty file; here: quicksort.txt.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments