[M3devel] nt386gnu is posix or win32?

Mika Nystrom mika at async.caltech.edu
Fri Jan 11 09:25:22 CET 2008


ThreadWin32, I think.  That's supposed to be one of the benefits
of using Modula-3 under Windows :-)

Tony Hosking writes:
>
>On Jan 9, 2008, at 6:08 PM, Jay wrote:
...
>> that pthreads can work easily, increasing the dependency on  
>> cygwin1.dll.
>
>User-level (ThreadPosix) threads might work (using setjmp/longjmp for  
>thread switching -- I guess that is what PM3 used to do).  Or did it  
>use ThreadWin32?   I doubt ThreadPThread will work since I don't  
>think there is a pthreads binding for Win32 threads on NT, or is there?
>
>> While this is the "other" direction, given the dependency on as,  
>> and gcc to build m3cg, probably the horse is out of the barn.
>> This is arguably a simpler answer, less hybrid.
>
>My strong preference is to tread NT386GNU (i.e., Cygwin based) as a  
>POSIX target, which might happen to use ThreadWin32.  That way, the  
>usual POSIX/Cygwin flavor of things is preserved.
>
>>
>>
>> I think the analogy to cygwin/mingwin holds, possibly perfectly.
>>
>> Maybe this is two targets.
>>   NT386CYGWIN  ?
>>   NT386MINGWIN ?
>>
>> (Which begs the point -- target naming.... NT386 vs. PPC_LINUX...OS 
>> +ARCH vs. ARCH + _ + OS, etc... but ARCH and OS aren't it, there is  
>> toolchain and C runtime in the mix..)
>>
>> Obviously SOMETHING is better than NOTHING and I have no useful  
>> binary distribution yet to show, so these questions are all very  
>> premature.
>>
>> I'm also unsure as to the "seriousness" of using the GNU tools.
>> a) There don't seem to be many users of Modula-3 on Win32.
>> b) Will such users accept/trust a non Microsoft toolchain?
>> (Just what to do folks do with cygwin/mingwin? Build/ship real  
>> software?)
>>
>> From my point of view, the attractive thing about m3cg is I get the  
>> int64 stuff arguably out of the way easier. :)
>>
>> Licensing wise..probably a dependency on cygwin1.dll is not desirable.
>>
>> When I'm further along, er, actually, with my existing libm3.dll/ 
>> m3core.dll, I can see what the dependencies are.
>> If it's just setjmp/lonjmp/memset, maybe try static linking (what  
>> is the licensing of that?) or link to msvcr*.dll.
>>
>> Maybe see if I can configure to use mingwin to compile/link except  
>> for m3cc. That sounds excellent.
>> You would configure a CYGWIN_ROOT (gcc, ld, make, sh, libs) and a  
>> MINGWIN_ROOT (gcc, ld, libs). CYGWIN_ROOT would be required for  
>> building m3cc, and either could be used for building anything  
>> else. ?? That seems good, though I just thought of it, need more  
>> time to think and investigate.
>>
>> Later..
>>  - Jay
>>
>>
>> Share life as it happens with the new Windows Live. Start sharing!



More information about the M3devel mailing list