"Internal error: backend\cod1.c 1895" when trying to build DMD/Druntime/Phobos from source
Walter Bright
newshound2 at digitalmars.com
Mon Jan 31 19:29:31 PST 2011
Vladimir Panteleev wrote:
> On Tue, 01 Feb 2011 00:30:27 +0200, Walter Bright
> <newshound2 at digitalmars.com> wrote:
>
>> Vladimir Panteleev wrote:
>>> On Mon, 31 Jan 2011 06:13:54 +0200, Walter Bright
>>> <newshound2 at digitalmars.com> wrote:
>>>
>>>> Vladimir Panteleev wrote:
>>>>> Compiling the source from the .zip still yields a broken dmd.exe.
>>>>> My version and the one from the .zip seem to differ in many small
>>>>> ways. The first difference is that in main(), the .zip version
>>>>> calls a function to get the address of errno, while my .exe
>>>>> accesses a variable directly.
>>>>
>>>> Check your dmc's errno.h. It should call a function.
>>> It's declared as follows:
>
> Actually, it's declared in three files: errno.h, stdlib.h and stddef.h.
> mars.c uses only the last two.
>
>> _MT and __cplusplus
>
> Why should _MT be enabled? There is no -D_MT in win32.mak. Are we using
> different makefiles?
>
> root/async.c sets _MT explicitly, but the example at hand is from mars.c.
>
> If I add -D_MT to CFLAGS in the makefile, I still get a lot of
> differences. The first difference is now one in a function's
> prologue/epilogue - the binary from the .zip saves/restores the ECX
> register, while my binary doesn't. The functions are otherwise identical.
>
This just makes no sense to me. I still suspect your setup is pulling in some
other compiler's #include's.
More information about the Digitalmars-d
mailing list