<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Randy, yes, that is my same understanding, from fairly recent experience.<BR>
<BR>
<BR>
They ship the kernel as a bunch of static libraries, and one C source file with just tunable data:<BR>
extern const int max_this = 100;<BR>
extern const int max_that = 200;<BR>
etc.<BR>
<BR>
<BR>
Certain updates involve changes to that file, recompile it, relink.<BR>
As such, not much of a C compiler is needed.<BR>
<BR>
<BR>
On Itanium they do give you an ANSI compiler.<BR>
<BR>
<BR>
The K&R compiler is enough of a compile to compile some gcc 3.x, from which you can compile current gcc (or just stick with 3.x I guess).<BR>
I was able to do that.<BR>
<BR>
<BR>
The K&R compiler I think is also enough to do 64bit work, but I think offers no shared libraries and no optimization.<BR>
<BR>
<BR>
I haven't booted my HP-UX/hppa in months now, I doubt anyone cares much, and if anyone did, we could probably require either the ANSI compiler or gcc. Perhaps perhaps perhaps I'll bring the system back up and make sure our stuff all compiles ok K&R. Perhaps. It kind of muddies the code and even e.g. gcc 4.x can't be compiled with a K&R compiler, not even with the ansi2kr build-time conversion thingy -- which, btw, I'd <BR>
be willing to try to use as a compromise.<BR>
<BR>
<BR>
Anyway, while supporting HP-UX/hppa/itanium is on some "list", it might never make it to the top.<BR>
Nobody seems interested in it.<BR>
<BR>
<BR>
The great thing about a C generating backend if you can fairly honestly claim to support "all" systems while doing "zero" work.<BR>
You know, consider:<BR>
<BR>
#include <stdio.h><BR>
int main() { printf("hello\n"); return 0; }<BR>
<BR>
<BR>
What does it work on? Pretty much "everything" -- everything with a C compiler and stdio. How much porting work? Pretty much "zero".<BR>
<BR>
<BR>
I say "fairly honestly" because there is still a small amount of #ifdef in the C code.<BR>
Though the amount of #ifdef we have at present is fairly small and the number of systems it supports is fairly large.<BR>
<BR>
And even the generated C code might have some system-dependencies to be smushed out perhaps.<BR>
autoconf might help.<BR>
<BR>
<BR>
The C-generating backend would theoretically and really probably for real work with HP-UX, AIX, Irix, Android, iPhone, VMS, etc. besides the usual assortment of NT (including AMD64, IA64), Linux, Solaris, FreeBSD, NetBSD, OpenBSD (modulo the threading/context problems), Darwin.<BR>
(iPhone has a problem with the signal headers perhaps).<BR>
<BR>
<BR>
- Jay<BR> <BR>
<HR id=stopSpelling>
From: rcolebur@SCIRES.COM<BR>To: m3devel@elegosoft.com<BR>Date: Mon, 23 Aug 2010 18:10:15 -0400<BR>Subject: Re: [M3devel] main in C or not?<BR><BR>
<META name=Generator content="Microsoft SafeHTML">
<STYLE>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass span.ecxEmailStyle18
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;}
.ExternalClass div.ecxWordSection1
{page:WordSection1;}
</STYLE>
<DIV class=ecxWordSection1>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Jay,</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">My recollection on HPUX is that the K&R cc was provided mainly just to rebuild the kernel and that if you wanted to do any real C development, HP stood ready to sell you an ANSI C compiler. We purchased the ANSI C, but still had to use the K&R for kernel adjustments. But, this was many years ago (circa HPUX v9).</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Regards,</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Randy</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN></P>
<DIV>
<DIV style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P style="MARGIN-LEFT: 0.5in" class=ecxMsoNormal><B><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> jayk123@hotmail.com [mailto:jayk123@hotmail.com] <B>On Behalf Of </B>Jay K<BR><B>Sent:</B> Monday, August 23, 2010 5:52 PM<BR><B>To:</B> Olaf; m3devel<BR><B>Subject:</B> Re: [M3devel] main in C or not?</SPAN></P></DIV></DIV>
<P style="MARGIN-LEFT: 0.5in" class=ecxMsoNormal> </P>
<P style="MARGIN-LEFT: 0.5in" class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Hm. Interesting subtle angle you point out.<BR>I have seen very few systems with ld but not cc. e.g. OLPC default install.<BR>My HP-UX/hppa machine came with only a K&R cc.<BR>Irix might have come with no official cc, but hunting around I found one that worked well enough to build gcc.<BR>AIX maybe also.<BR>We could potentially call ld directly.<BR> But in general I don't write the configuration files that way, they run cc for linking.<BR>*.c is used a bunch in m3core but not much else.<BR><BR><BR>On the other hand:<BR> cc is fairly ubiquitous.<BR> We have a "plan" for a "new distribution format" that will require cc -- users will build more of the<BR> system. Though we'll still provide binaries for some systems.<BR><BR><BR>I'm *really* interested in a C-generating backend, which will subsume this.<BR>Except perhaps systems like NT386, and maybe we'll expand that set.<BR>I'm becoming increasingly frustrated with the gcc backend.<BR><BR><BR>I can compromise and leave the code in m3linker, but I still like the change in cm3 where the configuration<BR>is ignored.<BR><BR><BR>I'll still go ahead and make the C code typesafe via ANSI prototypes.<BR> (potentially breaking HP-UX/hppa, but when I get back to that system I'll probably #ifdef<BR>all the breakage, or require an ANSI compiler such as gcc; I assume nobody really<BR>cares about K&R).<BR><BR><BR> Generating main in C seems to help some platforms, e.g. SOLgnu, SOLsun, SPARC32_LINUX,<BR>but I admit I didn't fully debug these. And then, removing variations among configurations, I like.<BR>But that can be achieved via the small change for now and leaving the support in.<BR><BR><BR> - Jay<BR><BR>> Date: Mon, 23 Aug 2010 13:57:01 +0200<BR>> From: wagner@elegosoft.com<BR>> To: m3devel@elegosoft.com<BR>> Subject: Re: [M3devel] main in C or not?<BR>> <BR>> Quoting Jay K <jay.krell@cornell.edu>:<BR>> <BR>> > There has long been a configuration variable: MAIN_IN_C.<BR>> ><BR>> > I propose that main always be in C. I made that so already, a small change.<BR>> ><BR>> > I further propose that the support for main to not be in C be removed.<BR>> ><BR>> > "Not in C" is "generating it via the backend", directly an .obj for NT386, or<BR>> > going through the gcc backend for Posix.<BR>> ><BR>> > Furthermore, I'll cleanup the C to be more typesafe by using ANSI C.<BR>> ><BR>> > I have this change about ready.<BR>> ><BR>> > I don't think avoiding C is valuable and I'd rather have fewer <BR>> > configuration variables.<BR>> > Pick one approach that works reasonably always.<BR>> <BR>> This requires that every user must have a C compiler in addition to<BR>> cm3. I thought the default was not to generate C, and just require<BR>> a C compiler for special runtime support.<BR>> <BR>> I'm not sure if this really a valid argument for the systems we support<BR>> though, as we also need a system linker, and that is probably bundled with<BR>> the C compiler in a development package.<BR>> <BR>> Olaf<BR>> -- <BR>> Olaf Wagner -- elego Software Solutions GmbH<BR>> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<BR>> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95<BR>> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin<BR>> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<BR>> </SPAN></P></DIV> </body>
</html>