public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* seek advice about GCC learning
@ 2023-01-29  2:27 hmsjwzb
  2023-02-02 13:21 ` Martin Jambor
  0 siblings, 1 reply; 6+ messages in thread
From: hmsjwzb @ 2023-01-29  2:27 UTC (permalink / raw)
  To: gcc; +Cc: hmsjwzb

Hi GCC developers,

	I am learning GCC. But the GCC code is hard to understand.
	I'm reading the c compiler of GCC. It seems the understanding of AST/GENERIC representation is very important.

	Is there a tool can visualize the AST/GENERIC representation?

	Do you have some advice for GCC beginner? Is there some documentations can help in the learning of GCC?

Thanks,
Flint

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

* Re: seek advice about GCC learning
  2023-01-29  2:27 seek advice about GCC learning hmsjwzb
@ 2023-02-02 13:21 ` Martin Jambor
  2023-09-26  2:10   ` weizhe wang
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jambor @ 2023-02-02 13:21 UTC (permalink / raw)
  To: hmsjwzb; +Cc: GCC Mailing List

Hello Flint,

On Sat, Jan 28 2023, hmsjwzb via Gcc wrote:
> Hi GCC developers,
>
> 	I am learning GCC. But the GCC code is hard to understand.

We are delighted you found looking into GCC interesting.  I definitely
agree that GCC source can be hard to read, especially for newcomers but
often even for seasoned contributors when they look at a part they are
not familiar with.  But when you manage to manage to overcome the
difficulty, the project can be very rewarding.  And so not hesitate to
ask us any specific question you may have here on the mailing list or on
IRC.

> 	I'm reading the c compiler of GCC. It seems the understanding of
> 	AST/GENERIC representation is very important. Is there a tool
> 	can visualize the AST/GENERIC representation?

Intermediate representations like GENERIC, GIMPLE and RTL are indeed
fundamental.  In order to see the representation of instructions,
compile a simple program with option -fdump-tree-all and examine the
many files that will appear in your working directory (representation of
things like aggregate data types is unfortunately somewhat missing).

>
> 	Do you have some advice for GCC beginner? Is there some documentations can help in the learning of GCC?

David Malcolm wrote a very nice set of tutorials about various aspects
of starting with GCC:
https://gcc-newbies-guide.readthedocs.io/en/latest/

I believe that is the best generic resource there is.

Good luck,

Martin


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

* Re: seek advice about GCC learning
  2023-02-02 13:21 ` Martin Jambor
@ 2023-09-26  2:10   ` weizhe wang
  2023-09-26  6:40     ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: weizhe wang @ 2023-09-26  2:10 UTC (permalink / raw)
  To: gcc; +Cc: mjambor

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

Hi Guys,



      Can we build risv-32 gcc compiler from official gcc repository ?



Thanks,



Flint



Sent using https://www.zoho.com/mail/








---- On Thu, 02 Feb 2023 05:21:36 -0800 Martin Jambor <mjambor@suse.cz> wrote ---



Hello Flint, 
 
On Sat, Jan 28 2023, hmsjwzb via Gcc wrote: 
> Hi GCC developers, 
> 
>     I am learning GCC. But the GCC code is hard to understand. 
 
We are delighted you found looking into GCC interesting.  I definitely 
agree that GCC source can be hard to read, especially for newcomers but 
often even for seasoned contributors when they look at a part they are 
not familiar with.  But when you manage to manage to overcome the 
difficulty, the project can be very rewarding.  And so not hesitate to 
ask us any specific question you may have here on the mailing list or on 
IRC. 
 
>     I'm reading the c compiler of GCC. It seems the understanding of 
>     AST/GENERIC representation is very important. Is there a tool 
>     can visualize the AST/GENERIC representation? 
 
Intermediate representations like GENERIC, GIMPLE and RTL are indeed 
fundamental.  In order to see the representation of instructions, 
compile a simple program with option -fdump-tree-all and examine the 
many files that will appear in your working directory (representation of 
things like aggregate data types is unfortunately somewhat missing). 
 
> 
>     Do you have some advice for GCC beginner? Is there some documentations can help in the learning of GCC? 
 
David Malcolm wrote a very nice set of tutorials about various aspects 
of starting with GCC: 
https://gcc-newbies-guide.readthedocs.io/en/latest/ 
 
I believe that is the best generic resource there is. 
 
Good luck, 
 
Martin

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

* Re: seek advice about GCC learning
  2023-09-26  2:10   ` weizhe wang
@ 2023-09-26  6:40     ` Jonathan Wakely
  2023-09-26  6:48       ` weizhe wang
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2023-09-26  6:40 UTC (permalink / raw)
  To: weizhe wang; +Cc: gcc

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

On Tue, 26 Sept 2023, 03:11 weizhe wang via Gcc, <gcc@gcc.gnu.org> wrote:

> Hi Guys,
>
>
>
>       Can we build risv-32 gcc compiler from official gcc repository ?
>

Yes, lots of people do that.



>
>
> Thanks,
>
>
>
> Flint
>
>
>
> Sent using https://www.zoho.com/mail/
>
>
>
>
>
>
>
>
> ---- On Thu, 02 Feb 2023 05:21:36 -0800 Martin Jambor <mjambor@suse.cz>
> wrote ---
>
>
>
> Hello Flint,
>
> On Sat, Jan 28 2023, hmsjwzb via Gcc wrote:
> > Hi GCC developers,
> >
> >     I am learning GCC. But the GCC code is hard to understand.
>
> We are delighted you found looking into GCC interesting.  I definitely
> agree that GCC source can be hard to read, especially for newcomers but
> often even for seasoned contributors when they look at a part they are
> not familiar with.  But when you manage to manage to overcome the
> difficulty, the project can be very rewarding.  And so not hesitate to
> ask us any specific question you may have here on the mailing list or on
> IRC.
>
> >     I'm reading the c compiler of GCC. It seems the understanding of
> >     AST/GENERIC representation is very important. Is there a tool
> >     can visualize the AST/GENERIC representation?
>
> Intermediate representations like GENERIC, GIMPLE and RTL are indeed
> fundamental.  In order to see the representation of instructions,
> compile a simple program with option -fdump-tree-all and examine the
> many files that will appear in your working directory (representation of
> things like aggregate data types is unfortunately somewhat missing).
>
> >
> >     Do you have some advice for GCC beginner? Is there some
> documentations can help in the learning of GCC?
>
> David Malcolm wrote a very nice set of tutorials about various aspects
> of starting with GCC:
> https://gcc-newbies-guide.readthedocs.io/en/latest/
>
> I believe that is the best generic resource there is.
>
> Good luck,
>
> Martin
>

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

* Re: seek advice about GCC learning
  2023-09-26  6:40     ` Jonathan Wakely
@ 2023-09-26  6:48       ` weizhe wang
  2023-09-27 17:12         ` David Brown
  0 siblings, 1 reply; 6+ messages in thread
From: weizhe wang @ 2023-09-26  6:48 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc

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

Thanks for your reply. Is there some guide for building rv32 cross compiler gcc ? I encounter some error in the building progress.







Sent using https://www.zoho.com/mail/








---- On Mon, 25 Sep 2023 23:40:51 -0700 Jonathan Wakely <jwakely.gcc@gmail.com> wrote ---







On Tue, 26 Sept 2023, 03:11 weizhe wang via Gcc, <mailto:gcc@gcc.gnu.org> wrote:

Hi Guys,
 
 
 
       Can we build risv-32 gcc compiler from official gcc repository ?









Yes, lots of people do that.








Thanks,
 
 
 
 Flint
 
 
 
 Sent using https://www.zoho.com/mail/
 
 
 
 
 
 
 
 
 ---- On Thu, 02 Feb 2023 05:21:36 -0800 Martin Jambor <mailto:mjambor@suse.cz> wrote ---
 
 
 
 Hello Flint, 
 
 On Sat, Jan 28 2023, hmsjwzb via Gcc wrote: 
 > Hi GCC developers, 
 > 
 >     I am learning GCC. But the GCC code is hard to understand. 
 
 We are delighted you found looking into GCC interesting.  I definitely 
 agree that GCC source can be hard to read, especially for newcomers but 
 often even for seasoned contributors when they look at a part they are 
 not familiar with.  But when you manage to manage to overcome the 
 difficulty, the project can be very rewarding.  And so not hesitate to 
 ask us any specific question you may have here on the mailing list or on 
 IRC. 
 
 >     I'm reading the c compiler of GCC. It seems the understanding of 
 >     AST/GENERIC representation is very important. Is there a tool 
 >     can visualize the AST/GENERIC representation? 
 
 Intermediate representations like GENERIC, GIMPLE and RTL are indeed 
 fundamental.  In order to see the representation of instructions, 
 compile a simple program with option -fdump-tree-all and examine the 
 many files that will appear in your working directory (representation of 
 things like aggregate data types is unfortunately somewhat missing). 
 
 > 
 >     Do you have some advice for GCC beginner? Is there some documentations can help in the learning of GCC? 
 
 David Malcolm wrote a very nice set of tutorials about various aspects 
 of starting with GCC: 
 https://gcc-newbies-guide.readthedocs.io/en/latest/ 
 
 I believe that is the best generic resource there is. 
 
 Good luck, 
 
 Martin

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

* Re: seek advice about GCC learning
  2023-09-26  6:48       ` weizhe wang
@ 2023-09-27 17:12         ` David Brown
  0 siblings, 0 replies; 6+ messages in thread
From: David Brown @ 2023-09-27 17:12 UTC (permalink / raw)
  To: gcc

On 26/09/2023 08:48, weizhe wang via Gcc wrote:
> Thanks for your reply. Is there some guide for building rv32 cross compiler gcc ? I encounter some error in the building progress.
> 
> 

You might find useful information here:


<https://github.com/riscv-collab/riscv-gnu-toolchain>
<https://github.com/stnolting/riscv-gcc-prebuilt>
<https://gist.github.com/franzflasch/02a8aeb2f6ec8e942b14ee9929db38e9>
<https://gnutoolchains.com/risc-v/>


I can recommend google.  It took me perhaps 10 seconds to find these sites.



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

end of thread, other threads:[~2023-09-27 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-29  2:27 seek advice about GCC learning hmsjwzb
2023-02-02 13:21 ` Martin Jambor
2023-09-26  2:10   ` weizhe wang
2023-09-26  6:40     ` Jonathan Wakely
2023-09-26  6:48       ` weizhe wang
2023-09-27 17:12         ` David Brown

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).