Front end development question

Josh Reese
Tue Jul 10 14:59:00 GMT 2012

Ah perfect. It turns out there was a typo in my so oasspec.c wasn't getting recompiled. 
If I can trouble you with a couple more questions. The first is simple:  for what architecture was gcalc 
developed? I am not able to compile some of it natively on OS X. Second, I am wondering at what point
gcc calls lang_parse_file()? My goal for this front end is to parse a language I wrote into C and then have 
gcc take over from there. So, if there is anything in there that you might have some advice about I would be
most appreciative.

As always thank you for your time,

On Jul 9, 2012, at 5:08 PM, Philip Herron wrote:

> Your going to want to copy and paste
> That into your oasspec.c just be careful towards the end since you
> dont have a runtime library you can not sure if you have to comment
> out some of the code wanting to append the minus L's to link in your
> library.
> --Phil
> On 9 July 2012 12:19, Josh Reese <> wrote:
>> Hello again,
>> I've put all my code on github which I think might be a little bit easier than pastebin.
>> Cheers,
>> Josh
>> On Jul 5, 2012, at 2:18 PM, Philip Herron wrote:
>>> Yeah i was playing around with the autoconf setup a while back but i
>>> have it fixed now i have emoved gmp and mpfr from my runtime library
>>> so i will put up the patch soon.
>>> On 5 July 2012 13:35, Josh Reese <> wrote:
>>>> Ah, apologies for the second email I should've included this in my last…but its not entirely related. I have been looking at the python front end you mentioned previously and am attempting to build it but getting an error about gmp.h:
>>>> ../../../srcdir/libgpython/runtime/py-obj_class.c:26:17: fatal error: gmp.h: No such file or directory
>>>> Is this something you have seen before? Once again, I do appreciate you taking the time to answer my questions.
>>>> Cheers,
>>>> Josh
>>>> On Jul 4, 2012, at 7:48 PM, Philip Herron wrote:
>>>>> Hey
>>>>> I'd say you should chuck up your code somewhere so we can see.
>>>>> --Phil
>>>>> On 2 July 2012 21:26, Josh Reese <> wrote:
>>>>>> Thanks again for the responses. It looks like what happened was I had mixed up my driver and compiler in the lang-spec.h file. So, after looking much through gcalc I realized my error and was able to get everything running for the most part. However, once everything was installed and I run my driver:
>>>>>> ./goas -v test.oas
>>>>>> it doesn't appear that the lang_specific_driver function is being called at all. I've created basically a skeleton version of gcalc but am not sure what is preventing gcc from calling my driver. I haven't seen anything in the language configuration files or anything that seems to have any relevance to this. I'm wondering if you guys have any ideas on this one. Thanks again for the help, I do sincerely appreciate it.
>>>>>> Cheers,
>>>>>> Josh
>>>>>> On Jun 30, 2012, at 5:00 PM, Philip Herron wrote:
>>>>>>> You should look at some of Andi's and my work
>>>>>>> check out the 2 branches
>>>>>>> gcalc and the documentation one. The gcalc front-end is a very simple
>>>>>>> basic front-end with no frills. Or even check out gccpy or golang.
>>>>>>> Fortran and Java front-ends are good when you start to get more
>>>>>>> comfortable with front-end development.
>>>>>>> Hope this helps. Looks like you may have some problems in your compiler driver.
>>>>>>> --Phil
>>>>>>> On 28 June 2012 19:18, Ian Lance Taylor <> wrote:
>>>>>>>> Josh Reese <> writes:
>>>>>>>>> Thanks for your prompt reply. I've tried running my driver the following ways:
>>>>>>>>> ./gcc test.oas
>>>>>>>>> ./goas test.oas
>>>>>>>>> ./x86_64-apple-darwin11.4.0-goas test.'s
>>>>>>>>> As per your suggestion I have tried with -v but unfortunately this hasn't shed any light on the problem for me:
>>>>>>>>> 11:21@legolas:.+4.7.0/local/bin$ ./gcc -v test.oas
>>>>>>>>> Using built-in specs.
>>>>>>>>> COLLECT_GCC=./gcc
>>>>>>>>> COLLECT_LTO_WRAPPER=/Users/jreese/Documents/school/edinburgh/project/builds/oas-gcc4.7.0/local/libexec/gcc/x86_64-apple-darwin11.4.0/4.7.0/lto-wrapper
>>>>>>>>> Target: x86_64-apple-darwin11.4.0
>>>>>>>>> Configured with: ../srcdir/configure --prefix=/Users/jreese/Documents/school/edinburgh/project/builds/oas-gcc4.7.0/local --enable-languages=oas --disable-bootstrap
>>>>>>>>> Thread model: posix
>>>>>>>>> gcc version 4.7.0 (GCC)
>>>>>>>>> COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.7.4' '-v' '-mtune=core2'
>>>>>>>>> /Users/jreese/Documents/school/edinburgh/project/builds/oas-gcc4.7.0/local/libexec/gcc/x86_64-apple-darwin11.4.0/4.7.0/./goas test.oas -o /var/folders/vt/hvgcc42n5md9_c94crkb1j9h0000gn/T//ccUJwJ7w.s
>>>>>>>>> goas: error: vfork: Operation timed out
>>>>>>>>> (I've also done this for the other permutations of executing the driver…but it appears they are all doing the same thing in essence).
>>>>>>>>> Is there something in this that perhaps makes sense to you? Thanks again for the reply.
>>>>>>>> This does not make sense to me.  Sorry.  I think you are going to have
>>>>>>>> to debug the driver program.  The error is most likely being generated
>>>>>>>> in the function pex_unix_exec_child.
>>>>>>>> Ian

More information about the Gcc-help mailing list