Minimal D Cross Compiler
Gregor Richards
Richards at codu.org
Fri Sep 14 10:33:24 PDT 2007
Brian Madden wrote:
> Gregor Richards wrote:
>> Brian Madden wrote:
>>> Just recompiled a D cross compiler from scratch using gcc 4.1.2 and
>>> gdc .24.
>>>
>>> Compiled fine after a bit of a tweak, but I still got this error again:
>>>
>>> canora-dubh:~/private/projects/d untwisted$ x86_64-pc-elf-gdc test.d
>>> <built-in>:0: internal compiler error: Bus error
>>> Please submit a full bug report,
>>> with preprocessed source if appropriate.
>>> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>>> canora-dubh:~/private/projects/d untwisted$
>>>
>>> Sad, I really wanted to use D, and was hoping it would just work! :(
>>
>> Backtrace.
>>
>> - Gregor Richards
>
> I tried to get a backtrace in gdb using the backtrace command, but
> didn't get anything. I'm not entirely sure how to go about getting any
> useful info other than that. I tried some of the flags that gdc has,
> but most of them didn't give me anything useful either. The best I got
> was this:
>
> dhcpw210:~/private/projects/d untwisted$ x86_64-pc-elf-gdc -dH test.d
> <built-in>:0: internal compiler error: Bus error
> x86_64-pc-elf-gdc: Internal error: Abort trap (program cc1d)
> Please submit a full bug report.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> dhcpw210:~/private/projects/d untwisted$
>
> If you can suggest something better, let me know and I'll be happy to
> share my findings.
>
> Thanks for all your help!
>
> -Brian
`gdc` is just a driver for a compiler, assembler and linker, namely
cc1d, as and ld. So, when you backtrace gdc itself, you won't get
anything useful (GDC didn't fail, cc1d did).
Use GDC's (well, really, GCC's) verbose output to tell you what the real
compilation command is, and backtrace that in gdb.
$ x86_64-pc-elf-gdc -dH -v test.d
<tons of garbage output>
cc1d <huge input here>
<more garbage output>
- Gregor Richards
More information about the Digitalmars-d
mailing list