--- /dev/null
+class generic_target:
+ def __init__(self):
+ self.settings={}
+
+class base_x86(generic_target):
+ def __init__(self):
+ self.settings["mainarch"]="x86"
+
+class arch_x86(base_x86):
+ def __init__(self):
+ base_x86.__init__(self)
+ self.settings["CFLAGS"]="-O2 -mcpu=i686 -fomit-frame-pointer"
+
+class arch_pentium4(base_x86):
+ def __init__(self):
+ base_x86.__init__(self)
+ self.settings["CFLAGS"]="-O2 -mcpu=i686 -fomit-frame-pointer"
+ self.settings["CHOST"]="i686-pc-linux-gnu"
+ self.settings["HOSTUSE"]=["mmx","sse"]
+
+class x86_factory:
+ def __init__(self):
+ self.subarchdict={"x86":arch_x86,"pentium4":arch_pentium4}
+ def get_target(self,target):
+ if self.subarchdict.has_key(target):
+ return self.subarchdict[target]()
+ def is_target(self,target):
+ return target in self.subarchdict.keys()
+
+
+
--- /dev/null
+#!/usr/bin/python
+
+import os,sys,imp,string
+
+machinemap={ "i386" : "x86",
+ "i486" : "x86",
+ "i586" : "x86",
+ "i686" : "x86",
+ "x86_64" : "amd64"
+ }
+
+targetmap={ "x86" : ["x86"],
+ "amd64" : ["x86","amd64"]
+ }
+
+mymachine=os.uname()[4]
+if not machinemap.has_key(mymachine):
+ print "Unknown machine type:",mymachine
+ sys.exit(1)
+hostarch=machinemap[mymachine]
+print "Host architecture:",hostarch
+print "Supported architecture targets:",string.join(targetmap[hostarch])
+print "Loading plugins:",
+archmap={}
+for x in targetmap[hostarch]:
+ fh=open("arch/"+x+".py")
+ archmap[x]=imp.load_module(x,fh,"arch/"+x+".py",(".py","r",imp.PY_SOURCE))
+ fh.close()
+ print x,
+print
+
rel_type default user (from spec) (was BUILDTYPE)
rel_version 1.4 user (from spec) (was MAINVERSION)
snapshot 20031016 user (from spec)
-source default-x86-1.4/stage2-pentium4-20031016 user (from spec)
+source_subpath default-x86-1.4/stage2-pentium4-20031016 user (from spec)
target_subpath default-x86-1.4/stage3-pentium4-20031016
chroot_path /var/tmp/catalyst/tmp/default-x86-1.4/stage3-pentium4-20031016
storedir+"/tmp/"+target_subpath
+pkgcache_path /var/tmp/catalyst/packages/default-x86-1.4/stage3-pentium4-20031016
+ storedir+"/packages/"+target_subpath
locals, auto-generated:
-pkgdir default (package cache dir)
mainarch x86 auto
-catdirname default-x86-1.4/stage3-pentium4-20031016 auto
-cflags -O2 auto
-cxxflags -O2 auto
-hostuse mmx sse auto
-chost i686-pc-linux-gnu auto
+cflags -O2 auto, or user
+cxxflags -O2 auto, or user
+hostuse mmx sse auto, or user
+chost i686-pc-linux-gnu auto, or user
makeopts -j2 auto (but overridable from catalyst.conf)
chroot chroot auto (linux32 chroot or chroot)