[M3devel] pieces of TARGET?

Jay jay.krell at cornell.edu
Mon Apr 13 11:46:22 CEST 2009


We have:
 TARGET= NT386, LINUXLIBC6, AMD64_DARWIN, etc.
 OS_TYPE= Win32 or POSIX
 I added HOST, HOST_OS_TYPE, etc.
 
 
We should also have
  TARGET_ARCHITECTURE=X86,AMD64,SPARC32,SPARC64,PPC32,PPC64,MIP32,MIP64,etc.
    probably defined be whatever preceded the first underscore in new
    consistently named targets (X86 or I386?)
 
    Because already have WORD_SIZE, can probably refine this to just:
     X86,AMD64,SPARC,PPC,MIPS, no general need for "32" and "64" variants.
     (I hesitate to point out that neither ALPHA nor IA64 imply WORD_SIZE=64.
     NT on Alpha had 32bit and 64bit variants, HP-UX on IA64 ditto for usermode).
     Maybe even can drop AMD64 from this list.
 
 
  TARGET_OS or TARGET_KERNEL or somesuch=NT,LINUX,SOLARIS,DARWIN,CYGWIN, etc.
    probably defined to be whatever follows the lone underscore in
    new consistently named targets, with a single underscore
 
 
 Leaving unspecified what to do about ARM and its competing calling
    conventions and C runtimes
 
 
Then we can check, for example, if TARGET_OS == "FREEBSD" and get all architectures
at once.
 
 
There isn't a huge need for this, but some.
 
Besides, TARGET_ENDIAN= BIG or LITTLE should probably be exposed.
You know, if you look at the lists of platforms, both in Target.m3
and the various m3makefiles, sometimes they can be shortened.
 
 
Sometimes all that is needed is the "OS" (e.g. the time/date stuff)
or the endian or architecture(the float stuff).
 
 
I realize there aren't tons of these lists, so it's not a huge deal.
 
Let me know if any objections are strong opinions on nailing some of the details.
 
My biggest objection is there is always a lag from the time compiler
changes are in, until you can/should depend on them.
Building newer code with older compiler and such.
It makes it such that it seems sometimes not worth changing anything.
 
 
Thanks,
 - Jay


More information about the M3devel mailing list