This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Front-ends


Philip Herron <herron.philip@googlemail.com> writes:

> Anyways so i am starting to play with implementing my own front-end
> into gcc just to get to grips with the api in gcc. So I notice top
> level in the source there is GCC then each lib<lang name> so i am
> working directly in gcc/<new lang name>
>
> As i noticed each language front-end has their own folder in tat
> source folder each with their own main as you would expect. So i made
> my own workspace, and started implementing bits and pieces but i am
> unsure how to link this all in to be compiled.
>
> Because i can't see any Makefile.am in any of those other language
> front-ends source folders. So where should i add my code to be
> compiled or how do i go about this. I am kind of tired now so i guess
> it must be really simple i just needed to read a little more :P

Add an entry to the languages list in the top level configure.ac.
Create gcc/LANG/Make-lang.in and gcc/LANG/config-lang.in.  If you pursue
this you will also want lang-specs.h and lang.opt.  Look at the existing
languages to see what these files look like.  As far as I know none of
this is documented, so you have to be willing to look at the existing
code and figure out what is needed.  Of course, if you produce
documentation on what you do, that would be great.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]