Hi Dave,

Dave McGuire 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.


>    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?


>    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.


>    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.

If we'll solve all the problems, can your machine be used for nightly 
snapshot builds?
I'm very unsatisfied with the current situation, since we have only 
Linux on amd64 and Mac OS X on PPC.
Is Solaris on sparc or x86?

Thanks,
Borut


------------------------------------------------------------------------------
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

Reply via email to