<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
truncated, around the cmd/bat stuff<BR><BR><BR><BR><BR><BR><BR>
<HR id=stopSpelling>
From: jay.krell@cornell.edu<BR>To: rcoleburn@scires.com; m3devel@elegosoft.com<BR>Subject: RE: [M3devel] [M3commit] CVS Update: cm3<BR>Date: Wed, 31 Dec 2008 18:34:24 +0000<BR><BR>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
> you've made the CYGWIN implementation "appear" <BR> > be the same as the native Windows implementation.<BR> > But they are not the same.<BR> <BR> <BR>But they mostly are, from the front end's point of view.<BR>They are both little endian, x86, use the same jump_buf size (I grew it to match Cygwin's, which is a deoptimization of stack use on native NT386), the same type sizes and alignments..er..not sure about LONGINT.<BR>They might vary in newline and one uses the internal backend and one the external, however which backend they use is actually minor to the front end, though I think it affects if the front end "deals with" calling conventions, particularly left-to-right vs. right-to-left and struct returns.<BR>Object code produced by one can generally be linked with object code produced by the other.<BR> <BR> <BR>SOLgnu and SOLsun are a better example of this, though they do go ahead and duplicate tons of stuff that if I had implemented them, I would have avoided.<BR>They are truly identical in every respect in the front end and back end.<BR>They only vary in the config file.<BR>This is wasteful, because, "by default", if I'm put together a comprehensive cross build system without being a little smarter, I end up building two identical m3cgs. My config files are willing to "probe across" SOLsun and SOLgnu though, so I need only one m3cg for the two of them.<BR> <BR> <BR>Given that "NT386" can describe a combinatorial explosion of configurations, it makes some sense to keep it just one if possible. The compiler mostly doesn't care.<BR> <BR> <BR>
<DIV> > "- BUILD_DIR does not necessarily equal HOST or TARGET, <BR> > because of how I structured I386_CYGWIN to be a "configuration" <BR> > where TARGET is still NT386." </DIV>
<DIV> > IMO, it would be wrong to change the meaning of things like "BUILD_DIR", "HOST", and "TARGET". </DIV> <BR>BUILD_DIR also does not equal HOST or TARGET when doing profiled builds, which admittedly I never have.<BR>Therefore, BUILD_DIR is arbitrary.<BR>I might be confusing something here though -- since I have never built a profiled build, I also haven't shipped one. It could be that "shipped BUILD_DIR" does equal TARGET, for profiled builds, in which case I did set a precedent. But the "override" code isn't using shipped files, so..<BR>I have to check.<BR> <BR> > as long as it does not compromise the native Windows implementation<BR> <BR>Agreed and it basically doesn't.<BR>Show me where it does.<BR>The only thing I can think of is the jmpbuf size.<BR> <BR> > I don't want to have to install CYGWIN either in order to make<BR> > the native implementation work on Windows.<BR> <BR>Please don't complain about stuff that isn't true or without being more specific.<BR>I know of no dependency by the native implementation on Cygwin.<BR> <BR>In fact, installing Cygwin does tend to break the native implementation, depending on $PATH, because it has a link.exe that is a completely different program (ie: ln.exe).<BR>I tried experimenting with using cl to drive link.exe but couldn't quite get it to work, for stupid reasons related to response files, which surely is fixable by extending response file support in cm3...<BR> <BR>As it is, I usually delete \cygwin\bin\link.exe, or remove cygwin from $PATH.<BR>True, I don't ever uninstall Cygwin for testing, so the dependency could creep in by accident.<BR> <BR> <BR> > I also still prefer the CMINSTALL, CMD, or BAT files<BR> > for install as opposed to having to get Python or something else. Just my 2 cents.<BR> <BR>Once built and installed, there is no dependency on cmd, bat, cminstall, or python.<BR>cminstall is pretty worthless imho, as long as you set PATH, INCLUDE, and LIB.<BR>That is also a competing workaround for paths with spaces.<BR>And allows moving around among different versions of Visual C++, which is good and bad.<BR> Either you can have n installs of cm3, each configured tightly for one specific Visual C++,<BR> or you can have 1 install of cm3, that is flexibly configured, that you "reconfigure" by altering the environment. I do the second.<BR> <BR>If you want to build the system, in a well automated way, with cmd and bat, you are welcome to write them.<BR> Maybe the ones I left in the tree work, but i never use them any longer.<BR> I use the Python all the time.<BR> <BR>Or you can manually cd around (as I suspect Tony does).<BR>Personally I find cmd/bat among the worst programming languages ever and would rather not write it.<BR>jscript via cscript.exe would be a good alternative, it is always there at least as of Windows 2000 or perhaps with IE installed on older versions, but then you have to duplicate work across Unix and Windows.<BR>That is, for Windows-only no-cmd, no-install command line automation, JScript and VBScript are good choices, but Windows-only rules them out. The install is worth it.<BR>Python is a very decent programming language that is very portable across "all" systems.<BR>Perl would be the next best choice, though..I just don't like much.<BR>sh/bash requires an install on Windows, so its built-inness on Posix I claim isn't a conclusive win.<BR>I strongly encourage you to try out Python.<BR> <BR>Another avenue is to merge the sh/cmd/python into cm3 itself.<BR>It shouldn't be all that hard.<BR> <BR>Modula-3 still needs a C linker.<BR>And there is C code that I didn't put in -- hand.c and dtoa.c.<BR>If someone writes a linker in Modula-3, or gets the .obj loader working, I'll be more open to eliminating C.<BR> <BR>But using C is much less error prone and much more portable, in some parts of the system.<BR> <BR>You may label C as "evil", but the other "evil" I am battling is tedious error prone "header cloning".<BR>You pretty much must chose one.<BR>The header cloning can be reduced, and its error proned-ness and difficulty various per system, depending on how gnarled up the headers are with ifdefs, compatibility hacks, processor-specificty, "cleansing" (where the installed headers are processor specific, deriving from #ifdef'ed or somesuch other files, but now I argue both sides, #ifdef is hard to read, but removing them removes information unless you track further back), etc. For example the OpenBSD headers are much more readable. I suspect NetBSD are too but haven't looked yet. The Linux headers contain a lot of #ifdef and they are also processor-specific I think -- you know, my /usr/include/errno.h on one system I think didn't show that x86 and SPARC use different values.<BR> <BR> <BR> - Jay<BR><BR><BR>
<HR id=EC_stopSpelling>
<BR>Date: Wed, 31 Dec 2008 10:28:37 -0500<BR>From: rcoleburn@scires.com<BR>To: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] [M3commit] CVS Update: cm3<BR><BR><BR>
<DIV>Jay:</DIV>
<DIV> </DIV>
<DIV>Please explain what you mean by: </DIV>
<DIV> </DIV>
<DIV>"- BUILD_DIR does not necessarily equal HOST or TARGET,<BR>because of how I structured I386_CYGWIN to be a "configuration"<BR>where TARGET is still NT386."</DIV>
<DIV> </DIV>
<DIV>IMO, it would be wrong to change the meaning of things like "BUILD_DIR", "HOST", and "TARGET". Indeed, I have stuff that depends on the meaning of these things. Your statement seems to imply that "under the covers" you've made the CYGWIN implementation "appear" to be the same as the native Windows implementation. But they are not the same.</DIV>
<DIV> </DIV>
<DIV>On another note, All this CYGWIN stuff may be a nice way for die-hard Unix fans to run Modula-3 on Windows, and I have no objection to providing it, as long as it does not compromise the native Windows implementation. My main concern is the native implementation of Modula-3 on Windows. My preference would be to keep the NT386 implementation's dependencies on other stuff to a bare minimum, i.e., don't introduce anything that would require someone to have to acquire something besides what comes in the standard Windows OS in order to make Modula-3 run. As it is now, we already have to get a C compiler and linker. Fortunately, Microsoft has made the Visual Studio Express editions a free download, so this is not too bad. I don't want to have to install CYGWIN either in order to make the native implementation work on Windows. I also still prefer the CMINSTALL, CMD, or BAT files for install as opposed to having to get Python or something else. Just my 2 cents.</DIV>
<DIV> </DIV>
<DIV>Finally, I would go a step further and suggest that the Modula-3 implementation on every platform should strive to require minimal dependencies on anything not provided standard with that platform's operating system.</DIV>
<DIV> </DIV>
<DIV>Call me an idealist, but it just galls me that I have to have a C compiler/linker to build Modula-3. Modula-3 is a systems programming language. It should stand on its own. From a purely economical viewpoint, why should I have to buy something I don't want (C language development environment) in order to have the privilege of using what I do want (Modula-3 language development environment).</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy<BR><BR>>>> Jay Krell <jkrell@elego.de> 12/31/2008 11:52 AM >>><BR>CVSROOT:/usr/cvs<BR>Changes by:jkrell@birch.08/12/31 11:52:08<BR><BR>Modified files:<BR>cm3/m3-comm/netobj/src/: netobj-ov.tmpl <BR>cm3/m3-comm/sharedobj/src/: sharedobj-ov.tmpl <BR>cm3/m3-libs/libm3/src/bundleintf/: bundle-ov.tmpl <BR>cm3/m3-ui/zeus/src/: m3zume-ov.tmpl <BR>cm3/m3-ui/juno-2/juno-app/src/: m3makefile <BR><BR>Log message:<BR>Partly kinda sorta fix some cross build scenarios, without<BR>affecting native builds.<BR><BR>It's a larger more general problem though.<BR><BR>- BUILD_DIR does not necessarily equal HOST or TARGET,<BR>because of how I structured I386_CYGWIN to be a "configuration"<BR>where TARGET is still NT386.<BR><BR>- a cross build can run the shipped binary anyway,<BR>and probably should (I didn't have the unshipped binaries around)<BR><BR>- There should probably be automation to ensure all the tools are build.<BR>ie: do-cm3-tools or do-cm3-crosstools. ie: build just the needed packages,<BR>for the sniffed native platform.<BR><BR>Cross builds have other problems.<BR><BR>I keep hitting the following annoyances:<BR><BR>ignoring foo/bar override when foo\bar already overridden<BR>override paths should either be canonicalized to one slash type<BR>or at least when there is a duplicate, canonicalize then and only<BR>complain if canonicals vary<BR>This is due to mixing I386_NT and I386_CYGWIN.<BR>Similarly the problem demonstrated regarding m3unix.h in Uwaitpid.quake.<BR><BR>Perhaps the change I made to allow forward slashes on Win32 was not good, esp. due to<BR>its apparent inadequacy.<BR><BR>The "lib" directory, specifically \cm3\lib\hand.obj is target..er, configuration dependent<BR>the gcc hand.obj cannot be directly linked by Visual C++, for reasons to do with libgcc<BR><BR>lib should probably have "target" or "build_dir" under it<BR><BR>and/or hand.obj specifically should be merged into m3core.lib<BR><BR>The mentor quake code generally fails in cross environments, probably due to slashes.<BR><BR>host=NT386 (GNU?), target=LINUXLIBC6 m3zume is access violating<BR><BR>I'm also highly suspicious of all this "override" stuff.<BR>It clearly causes too much duplication and distribution of information.<BR>I shouldn't have to know the directory structure of my dependencies,<BR>and even if I do, I should be able to share that knowledge with their many<BR>other dependents. The "scripts" directory also figures this sort of stuff out automatically..<BR>Being able to have multiple package stores is well and good.<BR>I'm not sure they need to ever be used in an "unshipped" form, but instead just<BR>use alternate roots and create new empty roots as needed. ?<BR><BR><BR></DIV></body>
</html>