Compiling -- gcc -- Lex & Yacc

Nifty Fedora Mitch niftyfedora at niftyegg.com
Wed Jul 23 19:29:43 UTC 2008


On Tue, Jul 22, 2008 at 04:16:14PM -0430, Patrick O'Callaghan wrote:
......
> 
> > I have gone through 'info gcc' but that does not seem to lead to the
> > answer of my specific question.  I have read as much as I could
> > regarding 'make'.  That didn't seem to have an answer either.  Maybe I
> > missed it!
> 
> 'Make' just calls other programs according to a recipe, some of the
> rules for which are built-in. It has nothing specific to do with the
> actual mechanics of compiling.

make has its own verbose flags.
A Makefile can very much change how a compiler behaves!

......
> 
> "gcc -v prog.c" will show you what's happening in excruciating detail.
> 
> Looking at the source code for 'gcc' is an illuminating experience. Note
> that it's a very large complex program but patience is rewarded.

In some cases "strace" might tell you even more.
Both what it looks for and does not fine as well
as what it does.

Since gcc and friends are 'drivers' you need to follow
parent to child to chile and back....  Compare and contrast...

	$ strace -f -F -o /tmp/tracingGCC  make
	$ strace -f -F -o /tmp/tracingGCC  gcc hello.c
	$ strace -f -F -o /tmp/tracingGCC  gcc -O0 hello.c
	$ strace -f -F -o /tmp/tracingGCC  gcc -no-integrated-cpp  hello.c
	etc...



-- 
	T o m  M i t c h e l l 
	Looking for a place to hang my hat :-(




More information about the fedora-list mailing list