May 28, 2011 Re: MinGW64 Build Instructions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 5/28/2011 1:53 AM, Vladimir Panteleev wrote:
> On Sat, 28 May 2011 06:32:02 +0300, Daniel Green <venix1@gmail.com> wrote:
>
>> You have to change os_query_staticdataseg in win32.d it's done in the
>> patch.
>
> Thanks, didn't expect that part to be that simple.
>
> The next obstacle seems to be _aApplycdzd/_aApplywdzd linking errors. I
> have no idea where gdc is getting that function name from. It seems to
> want _aApplycd1 and _aApplywd1 from internal/aApply.d, but I've no idea
> where the "zd" is coming from.
I think the problem is likely to be the Win64 calling convention. Win64 no longer uses _ prefix for symbol names. Can dump the symbols for the object file and see if "aApplycdzd" exists?
|
May 29, 2011 Re: MinGW64 Build Instructions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Green | On Sat, 28 May 2011 22:46:17 +0300, Daniel Green <venix1@gmail.com> wrote: > On 5/28/2011 1:53 AM, Vladimir Panteleev wrote: >> On Sat, 28 May 2011 06:32:02 +0300, Daniel Green <venix1@gmail.com> wrote: >> >>> You have to change os_query_staticdataseg in win32.d it's done in the >>> patch. >> >> Thanks, didn't expect that part to be that simple. >> >> The next obstacle seems to be _aApplycdzd/_aApplywdzd linking errors. I >> have no idea where gdc is getting that function name from. It seems to >> want _aApplycd1 and _aApplywd1 from internal/aApply.d, but I've no idea >> where the "zd" is coming from. > > I think the problem is likely to be the Win64 calling convention. Win64 no longer uses _ prefix for symbol names. Can dump the symbols for the object file and see if "aApplycdzd" exists? Pretty sure it's not the calling convention. aApplycdzd exists only in the object files for modules which use foreach (dchar c; someString). -- Best regards, Vladimir mailto:vladimir@thecybershadow.net |
June 02, 2011 Re: MinGW64 Build Instructions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev Attachments: | On 5/29/2011 4:20 AM, Vladimir Panteleev wrote:
> Pretty sure it's not the calling convention. aApplycdzd exists only in the object files for modules which use foreach (dchar c; someString).
I looked into the issue and the problem lines with the use of sprintf in the compiler source. Line 1833 of statement.c.
---
int j = sprintf(fdname, "_aApply%s%.*s%zd", r, 2, fntab[flag], dim);
---
%zd is not supported by MSVCRT sprintf causing _aApplycdzd. What I'm curious about is why this issue only surfaced with 64-bit support.
I've included a patch that solves the issue by enabling MinGW's ANSI printf replacements. I'll apply it to the the repository later.
|
Copyright © 1999-2021 by the D Language Foundation