On Mar 15, 2010, at 1:08 PM, Borut Razem wrote: >> I've been working on building sdcc under Solaris with the Sun >> Studio 12 compiler. I've not gotten all the way there, but I've made >> substantial progress. I've detailed a few simple things that need >> fixing for this to work. Most of them seem to come from the autoconf >> scripts' assumption that GCC will be used to compile sdcc. I'm NOT >> asking that sdcc be modified to specifically support Sun's compilers, >> but if autoconf is going to check to see if GCC is in use, and finds >> that it isn't but still allows the user to continue, it shouldn't put >> GCC-specific options into CFLAGS. :) > > Quite some time ago, before the SourceForge Compile Farm died, the > sdcc > nightly builds were done also on Solaris, but, if I remember well, > they > were compiled with gcc.
It really is a shame about that compile farm going away. >> I'm working with 2.9.7, one of the source snapshots from a few >> days ago, 20100313-5734. >> >> The first thing that breaks is the automatic inclusion of -Wall >> (which is GCC-specific) in CFLAGS. >> >> Next comes this line in src/pic/ralloc.c: >> >> #define FENTRY2 1 ? (void)0 : printf >> >> I removed the void cast; that allowed it to compile. > > This should not be a problem. I'll try it on gcc without the cast. We > can still use #ifdef SOLARIS or something. Can you tell me which is > the > most appropriate preprocessor symbol defined by the Sun Studio 12 > compiler? Yes, I usually check for "defined(sun) && defined(__SVR4)". >> The last one is a weird problem that I've not really dug into yet; >> I think it probably has to do with -E handling. The Makefile.dep >> files end up being huge (several megabytes) and contain lots of C >> source code fragments. I ended up just turning that into "touch >> Makefile.dep" in the Makefiles and being careful about doing a "make >> clean" between builds, which is obviously not the correct solution. > > Tis is the hardest one: the gcc preprocessor understands -M command > line > option, which generates the makefile dependencies. I don't know if > Solaris cc can do this. If not, an external toll should be found > and used. It can; the option for thisis "-xM". >> Anyway, as I said, I'm still working on it, and I'm not sure how >> much farther I'm going to get before I need to spend time on other >> things. I'm hoping that someone will be willing to make these >> portability changes whenever he/she has time. > > I hope you'll come to the end. I should be able to spend some more time on it tonight. > If we'll solve all the problems, can your machine be used for nightly > snapshot builds? Yes. We actually talked about this a couple of years ago, then I got busy and couldn't do it on my end. Maybe we can do it now. > I'm very unsatisfied with the current situation, since we have only > Linux on amd64 and Mac OS X on PPC. I understand. I can probably help with this; I've just set up a large VMware host machine here since I now need to support some consulting clients running VMware. It runs full-time, and it is WAY overpowered for my immediate needs (two SCO virtual machines). I can easily spin up a few more VMs on it and get you Solaris/x86, NetBSD/ i386 and possibly FreeBSD, if it runs nicely under VMware (which it probably does). Do you have a shell script or something set up to pull from svn and do a build? If so, and if it were self-contained and relatively portable, it'd make this very easy to set up. > Is Solaris on sparc or x86? This is on UltraSPARC, as that's my primary platform here, as well as that of my employer, so I have plenty of capacity available. -Dave > -- Dave McGuire Port Charlotte, FL ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user