Kevin O'Connor escreveu:
> On Mon, Nov 20, 2006 at 02:27:59PM +0000, Pedro Alves wrote:
>   
>> Pedro Alves escreveu:
>>     
>>> Kevin O'Connor escreveu:
>>>   
>>>       
>>>> On Mon, Nov 20, 2006 at 01:18:21AM +0000, Pedro Alves wrote:
>>>>   
>>>>     
>>>>         
>>>>> I have never seen a WinCE < 3 machine, and I don't really know for sure 
>>>>> what may be different there.
>>>>> Currently all the toolchain is built with CE 3 as the default (linker 
>>>>> and headers).
>>>>>     
>>>>>       
>>>>>           
>>>> I was looking at this a little further.  It seems the mingw code is
>>>> calling GetCommandLine.  However, that function was introduced in CE3:
>>>>         
>
> Hi Pedro,
>
> I have confirmation that the app works on the WinCE 2.1 strongarm
> processor if we bypass the WinMainCRTStartup and explicitly call
> __gccmain from WinMain.
>
> As to a fix - I'm a bit confused by the current mingw crt1.c code.
> Why do we have WinMainCRTStartup call main() which then calls WinMain.
> Wouldn't it be simpler to have a dummy WinMain that calls main().
> This way, the code doesn't have to scan all the command-line arguments
> if the application isn't interested in them.
>
>   
Yes, I also think it would be simpler. But, it requires a gcc change
(simple one, I think). Currently the __gccmain call is emitted on main,
and we would need to change it to be emitted on WinMain, because then
a main may not even exist. I have been thinking about this
for a few days, and as a coincidence I am fixing a pair of bugs in gcc
and gdb that somewhat touches these fields:
(Actually I have the fixes, I just need the harddrive space to
bootstrap/regtest gcc :) )
http://sources.redhat.com/ml/gdb/2006-11/msg00134.html

Before doing the main/WinMain WinMain/main change, I want to ask the
MinGW guys why they didn't do it that way in the first place, as we may
be missing something obvious.

> Also, what are the requirements in these files for 386 compatibility?
> It seems like there isn't that much overlap between between desktop
> windows and ce windows.  
In overview there is :) Well the steps are the same, but yes, a lot if
#ifdef'ed out. Fortunately, this is code that we shouldn't need to
look at much. :)

> I find the ifdefs to be hard to follow - in
> particular because there are a number of ifdefs (MSV_CRT, UNDER_CE,
> COREDLL) and it isn't clear which are actually in effect on CE.  I
> wonder if it be simpler to have a ce specific crt1.c file.
>
>   
In stock MinGW, they support two different MSFT runtimes. msvcrt.dll and
crtdll.dll. We added a third: coredll.dll. That's where the __MSVCRT__,
__CRTDLL__ and __COREDLL__ come from.
The UNDER_CE ones I guess could be changed into __COREDLL__.

> Finally, is this something you're willing to fix?
>
>   

Sure, but probably only in a week unfortunately.

Cheers,
Pedro Alves



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to