From: Dave M. <mc...@ne...> - 2010-03-15 15:10:16
|
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. :) 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. 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. 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. -Dave -- Dave McGuire Port Charlotte, FL |