[M3devel] platform/build_dir is a big tuple?

Jay jayk123 at hotmail.com
Tue Jan 22 00:01:44 CET 2008


I just realized...

As I said, there are several variables.


"platform" is a big tuple


architecture -- x86, ppc, sparc
OS -- NT, Linux, Darwin, Solaris
ostype -- win32, posix
  This probably not -- embodied instead by C runtime and threading model
C compiler -- Visual C++, gcc, Sun, Watcom, DigitalMars, Metrowerks
    and version thereof
Linker -- Visual C++, gcc/ld, 
C runtime -- msvc*, linuxlibc6, cygwin (newline)
executable format -- aout, elf, pe (witness the three Linux x86 targets;
  yes, I know aout is dead and the elf target probably also)
oh..maybe object file format -- coff, elf, mach-o
Threading model -- vtalarm, pthreads, Win32
backend -- integrated, gcc, C generating
Windows library -- X Windows, Windows
naming convention -- Unix/Posix, Windows, grumpy Unix


Many combinations make sense and work -- two threading models on most systems.
Many combinations do not -- Win32 threads on most. Maybe call this "native" threads.
Many combinations interoperate -- gcc and Visual C++ output the same .obj file format
But you don't want to mix jmpbuf size with the wrong C runtime
Naming conventions are sometimes arbitrary, sometimes not, depending on
if the linker is given precise paths or like on Mac it probes (is that how a bunch work?).

Each variable could contribute a little bit to BUILD_DIR
OS -- n, l, d, s
  This would probably come first and be spelled out.
   NT, Linux, Solaris
architecture -- x, p, s, mi (mips), a (alpha), m6 (m68k or just 6), a (amd64)
   This might be longer too -- x86, PPC, SPARC
C compiler -- ms6, ms7,ms71, ms8, g2, g3, g4, mw6, mw7, mw8, w
Linker -- g, m
C runtime -- m, g (glibc), c
Executable format -- a, e, p (or w for Windows), m (mach-o), pef
obj format -- c, e, m
threading model -- v, p, w; or v and n (native)
backend -- i, g, c
Windowing library -- x, w
naming convention -- u or p, m (Microsoft) or w (windows), g


Ok, I know, crazy, unwieldy, crazy long directory names, but somehow seems true.


Imagine there was an "integrated linker". It could consume at least three different obj formats
and output at least three different executable formats (elf, pe/coff, mach-o).


A smaller version of this however is to let the user set OSTYPE and NAMING_CONVENTION, and perhaps
a few other variables (Windowing library is one obviously missing), in the config, honor them, and
possibly build up BUILD_DIR in this way.
Several variables can be omited..well mainly obj format. That seems to vary the least or vary
along with compiler/linker.


 - Jay


_________________________________________________________________
Climb to the top of the charts! Play the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080121/2c0693ea/attachment-0001.html>


More information about the M3devel mailing list