On 2011-11-13, James Harris <> wrote:
> A few people have mentioned MinGW. The whole gcc thing is bulky but I
> do like some of the code generation options it has such as pic, omit
> frame pointer and various optimisations. I'd still rather define the
> calling conventions myself but that's not something C programmers
> typically want to do so is a bit off topic here.
You are not looking for C at all. You are looking for defining your own
ABI and using it on a bunch of systems.
Basically, you're Doing It Wrong. If you want to use C, *USE C*. Work
with the language the way it is designed, rather than trying to outsmart
it.
And that means that you don't waste valuable time and effort trying to
figure out ways to avoid recompiling on new targets, because *that is
silly*. The entire point of C is that you can *recompile* on new targets,
not that you can make magical binaries which are portable across unrelated
targets.
Then, all the "problems" go away. You don't care what compiler any given
target has as long as it supports the standard. You don't care what CPU
is in use, or anything like that. Poof! Problem solved by using the tool
for the purpose it was designed for.
-s
--
Copyright 2011, all wrongs reversed. Peter Seebach /
usenet-
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.