public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* how to compile gcc
@ 2005-08-19 23:26 Jiang Long
  2005-08-20 13:13 ` Rafael Ávila de Espíndola
  2005-08-20 16:46 ` Mike Stump
  0 siblings, 2 replies; 6+ messages in thread
From: Jiang Long @ 2005-08-19 23:26 UTC (permalink / raw)
  To: gcc

Hello,

I 'd like to dig into gcc internals, and would like to compile it with -g. 

I can't find any document on how to do that? I tried 

make BOOT_CFLAGS=-g CFLAGS=-g, 

but it still will add '-O2' later on. 

Any documentation on how GCC is compiled? what are the stages of the
compilation?

Thanks,

-Jiang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to compile gcc
  2005-08-19 23:26 how to compile gcc Jiang Long
@ 2005-08-20 13:13 ` Rafael Ávila de Espíndola
  2005-08-20 13:49   ` drizzle drizzle
  2005-08-20 16:46 ` Mike Stump
  1 sibling, 1 reply; 6+ messages in thread
From: Rafael Ávila de Espíndola @ 2005-08-20 13:13 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

On Friday 19 August 2005 20:26, Jiang Long wrote:
> Hello,
>
> I 'd like to dig into gcc internals, and would like to compile it with -g.
>
> I can't find any document on how to do that? I tried
>
> make BOOT_CFLAGS=-g CFLAGS=-g,
>
> but it still will add '-O2' later on.
>
> Any documentation on how GCC is compiled? what are the stages of the
> compilation?
yes,
http://gcc.gnu.org/install/configure.html
look at --enable-checking
and
http://gcc.gnu.org/install/build.html
There are more cflags...

The gcc/Makefile.in is also a good reference :)

> Thanks,
>
> -Jiang


Rafael

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to compile gcc
  2005-08-20 13:13 ` Rafael Ávila de Espíndola
@ 2005-08-20 13:49   ` drizzle drizzle
  2005-08-22  1:36     ` Yao qi
  2005-08-22  1:36     ` Yao qi
  0 siblings, 2 replies; 6+ messages in thread
From: drizzle drizzle @ 2005-08-20 13:49 UTC (permalink / raw)
  To: Rafael Ávila de Espíndola; +Cc: gcc

If you are objective is to debug gcc, then all the necessary setup is
already done...Check this documentation
 http://gcc.gnu.org/wiki/DebuggingGCC.

dz

On 8/20/05, Rafael Ávila de Espíndola <rafael.espindola@gmail.com> wrote:
> On Friday 19 August 2005 20:26, Jiang Long wrote:
> > Hello,
> >
> > I 'd like to dig into gcc internals, and would like to compile it with -g.
> >
> > I can't find any document on how to do that? I tried
> >
> > make BOOT_CFLAGS=-g CFLAGS=-g,
> >
> > but it still will add '-O2' later on.
> >
> > Any documentation on how GCC is compiled? what are the stages of the
> > compilation?
> yes,
> http://gcc.gnu.org/install/configure.html
> look at --enable-checking
> and
> http://gcc.gnu.org/install/build.html
> There are more cflags...
> 
> The gcc/Makefile.in is also a good reference :)
> 
> > Thanks,
> >
> > -Jiang
> 
> 
> Rafael
> 
> 
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to compile gcc
  2005-08-19 23:26 how to compile gcc Jiang Long
  2005-08-20 13:13 ` Rafael Ávila de Espíndola
@ 2005-08-20 16:46 ` Mike Stump
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Stump @ 2005-08-20 16:46 UTC (permalink / raw)
  To: Jiang Long; +Cc: gcc

On Friday, August 19, 2005, at 04:26  PM, Jiang Long wrote:
> I 'd like to dig into gcc internals, and would like to compile it with 
> -g.

cd <build>/gcc && make cc1 is another way to do it.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to compile gcc
  2005-08-20 13:49   ` drizzle drizzle
@ 2005-08-22  1:36     ` Yao qi
  2005-08-22  1:36     ` Yao qi
  1 sibling, 0 replies; 6+ messages in thread
From: Yao qi @ 2005-08-22  1:36 UTC (permalink / raw)
  To: drizzle76, rafael.espindola; +Cc: gcc


>From: drizzle drizzle <drizzle76@gmail.com>
>To: Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
>CC: gcc@gcc.gnu.org
>Subject: Re: how to compile gcc
>Date: Sat, 20 Aug 2005 09:48:56 -0400
>
>If you are objective is to debug gcc, then all the necessary setup is
>already done...Check this documentation
>  http://gcc.gnu.org/wiki/DebuggingGCC.

I have tried this method on wiki about GCC debugging.  I am not sure about 
that and mail the procedure here to verify it,  maybe someone of you could 
clarify for me.  Thanks in advance.

Here goes the my procedure on GCC debugging.
1 Generate preprocessed source code wiht option -E and redirect to a file 
named a.c.expand.
2  Debug cc1 by GDB with the arguments "-c a.c.expand" to cc1

Is this a reasonable procedure to debug GCC?

Any suggestion and comments are highly appreciated!
>
>dz
>
>On 8/20/05, Rafael Ávila de Espíndola <rafael.espindola@gmail.com> wrote:
> > http://gcc.gnu.org/install/configure.html
> > look at --enable-checking
> > and
> > http://gcc.gnu.org/install/build.html
> > There are more cflags...
> >
> > The gcc/Makefile.in is also a good reference :)
> >
> > > Thanks,
> > >
> > > -Jiang
> >
> >
> > Rafael
> >

Best Regards
----------------
Yao Qi
Bejing Institute of Technology

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to compile gcc
  2005-08-20 13:49   ` drizzle drizzle
  2005-08-22  1:36     ` Yao qi
@ 2005-08-22  1:36     ` Yao qi
  1 sibling, 0 replies; 6+ messages in thread
From: Yao qi @ 2005-08-22  1:36 UTC (permalink / raw)
  To: drizzle76, rafael.espindola; +Cc: gcc


>From: drizzle drizzle <drizzle76@gmail.com>
>To: Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
>CC: gcc@gcc.gnu.org
>Subject: Re: how to compile gcc
>Date: Sat, 20 Aug 2005 09:48:56 -0400
>
>If you are objective is to debug gcc, then all the necessary setup is
>already done...Check this documentation
>  http://gcc.gnu.org/wiki/DebuggingGCC.

I have tried this method on wiki about GCC debugging.  I am not sure about 
that and mail the procedure here to verify it,  maybe someone of you could 
clarify for me.  Thanks in advance.

Here goes the my procedure on GCC debugging.
1 Generate preprocessed source code wiht option -E and redirect to a file 
named a.c.expand.
2  Debug cc1 by GDB with the arguments "-c a.c.expand" to cc1

Is this a reasonable procedure to debug GCC?

Any suggestion and comments are highly appreciated!
>
>dz
>
>On 8/20/05, Rafael Ávila de Espíndola <rafael.espindola@gmail.com> wrote:
> > http://gcc.gnu.org/install/configure.html
> > look at --enable-checking
> > and
> > http://gcc.gnu.org/install/build.html
> > There are more cflags...
> >
> > The gcc/Makefile.in is also a good reference :)
> >
> > > Thanks,
> > >
> > > -Jiang
> >
> >
> > Rafael
> >

Best Regards
----------------
Yao Qi
Bejing Institute of Technology

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-08-22  1:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-19 23:26 how to compile gcc Jiang Long
2005-08-20 13:13 ` Rafael Ávila de Espíndola
2005-08-20 13:49   ` drizzle drizzle
2005-08-22  1:36     ` Yao qi
2005-08-22  1:36     ` Yao qi
2005-08-20 16:46 ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).