--- /dev/null
+
+[i686]
+
+machine = i686
+personality = linux32
+
+cflags = -O2 -fomit-frame-pointer -pipe
+
+
+[i586]
+
+machine = i586
+personality = linux32
+
+cflags = -O2 -fomit-frame-pointer -pipe
+
+
+[i486]
+
+machine = i486
+personality = linux32
+
+cflags = -O2 -fomit-frame-pointer -pipe
+
+
+[alix]
+
+; While i586 works fine on a Geode LX, i486 should be a more performant choice
+; right now due to the way Geode LX CPU pipeline ans scheduling works. glibc
+; i586 assembler optimized routines are measureably slower than the i486 ones on
+; a Geode LX.
+machine = i486
+personality = linux32
+
+cflags = -Os -march=geode -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -fomit-frame-pointer -pipe
+cxxflags = %(cflags)s
+
+
+[x86_64]
+
+machine = x86_64
+personality = linux64
+
+cflags = -O2 -fomit-frame-pointer -pipe
+
+[architecture]
+
+config = config/architectures.conf
+
+arch = i686
+
[distro]
; Name of the distribution we build.
class Environment(object):
def __init__(self, package):
self.package = package
+
+ self.arch = arches.current
self.config = config
self.toolchain = Toolchain()
if not kwargs.has_key("chrootPath"):
kwargs["chrootPath"] = self.chrootPath()
- ret = util.do(command,
+ ret = util.do(command, personality=self.arch["personality"],
shell=shell, env=env, logger=self.log, *args, **kwargs)
finally:
"PARALLELISMFLAGS" : "-j6",
}
+
+class Architectures(object):
+ def __init__(self, configfile):
+ parser = ConfigParser.ConfigParser()
+ parser.read(configfile)
+
+ arches = {}
+ for arch in parser.sections():
+ arches[arch] = { "name" : arch }
+ for key, val in parser.items(arch):
+ arches[arch][key] = val
+
+ self._arches = arches
+ self.__current = None
+
+ def set(self, arch):
+ self.__current = arch
+
+ @property
+ def all(self):
+ return self._arches
+
+ @property
+ def default(self):
+ return self._arches.get("i686")
+
+ @property
+ def current(self):
+ if not self.__current:
+ return self.default
+ return self._arches[self.__current]
+
+ def __getitem__(self, key):
+ return self._arches[key]
+
+
# Create a globally useable instance of the configuration
config = Config()
+
+arches = Architectures(config["architecture_config"])
+arches.set(config["architecture_arch"])
import sys
import time
+from constants import *
from exception import *
from logger import getLog
PER_LINUX32=0x0008
PER_LINUX=0x0000
personality_defs = {
- 'x86_64': PER_LINUX,
- 'ppc64': PER_LINUX,
- 'sparc64': PER_LINUX,
- 'i386': PER_LINUX32,
- 'i586': PER_LINUX32,
- 'i686': PER_LINUX32,
- 'ppc': PER_LINUX32,
- 'sparc': PER_LINUX32,
- 'sparcv9': PER_LINUX32,
- 'ia64' : PER_LINUX,
- 'alpha' : PER_LINUX,
- 's390' : PER_LINUX32,
- 's390x' : PER_LINUX,
+ 'linux64': PER_LINUX,
+ 'linux32': PER_LINUX32,
}
def touch(filename):
os.chdir(cwd)
def condPersonality(per=None):
- if per is None or per in ('noarch',):
+ if not per:
return
if personality_defs.get(per, None) is None:
return