diff options
author | Chris Gianelloni <wolf31o2@gentoo.org> | 2008-02-06 23:36:22 +0000 |
---|---|---|
committer | Chris Gianelloni <wolf31o2@gentoo.org> | 2008-02-06 23:36:22 +0000 |
commit | 4db65217ed36ae864f145be3f46c760b1e54c64b (patch) | |
tree | d2eb7aa853af9e0803dd02350f7ef4ac5ca84475 /arch | |
parent | Did a little cleanup on the x86.py to remove some redundant entries and added... (diff) | |
download | catalyst-4db65217ed36ae864f145be3f46c760b1e54c64b.tar.gz catalyst-4db65217ed36ae864f145be3f46c760b1e54c64b.tar.bz2 catalyst-4db65217ed36ae864f145be3f46c760b1e54c64b.zip |
Merged ppc.py and ppc64.py into powerpc.py and merged sparc.py and sparc64.py into sparc.py, so we have a cleaner set of arch files.
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1280 d1e1f19c-881f-0410-ab34-b69fee027534
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc.py | 125 | ||||
-rw-r--r-- | arch/ppc.py | 62 | ||||
-rw-r--r-- | arch/ppc64.py | 68 | ||||
-rw-r--r-- | arch/sparc.py | 19 | ||||
-rw-r--r-- | arch/sparc64.py | 21 |
5 files changed, 142 insertions, 153 deletions
diff --git a/arch/powerpc.py b/arch/powerpc.py new file mode 100644 index 00000000..fff7c857 --- /dev/null +++ b/arch/powerpc.py @@ -0,0 +1,125 @@ + +import os,builder +from catalyst_support import * + +class generic_ppc(builder.generic): + "abstract base class for all 32-bit powerpc builders" + def __init__(self,myspec): + builder.generic.__init__(self,myspec) + self.settings["CHOST"]="powerpc-unknown-linux-gnu" + if self.settings["buildarch"]=="ppc64": + if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"): + raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)" + self.settings["CHROOT"]="linux32 chroot" + self.settings["crosscompile"] = False; + else: + self.settings["CHROOT"]="chroot" + +class generic_ppc64(builder.generic): + "abstract base class for all 64-bit powerpc builders" + def __init__(self,myspec): + builder.generic.__init__(self,myspec) + self.settings["CHROOT"]="chroot" + +class arch_970(arch_ppc64): + "builder class for 970 aka G5 under ppc64" + def __init__(self,myspec): + arch_ppc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -pipe -mcpu=970 -mtune=970" + self.settings["HOSTUSE"]=["altivec"] + +class arch_cell(arch_ppc64): + "builder class for cell under ppc64" + def __init__(self,myspec): + arch_ppc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -pipe -mcpu=cell -mtune=cell" + self.settings["HOSTUSE"]=["altivec","ibm"] + +class arch_g3(generic_ppc): + def __init__(self,myspec): + generic_ppc.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -mcpu=G3 -mtune=G3 -fno-strict-aliasing -pipe" + +class arch_g4(generic_ppc): + def __init__(self,myspec): + generic_ppc.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" + self.settings["HOSTUSE"]=["altivec"] + +class arch_g5(generic_ppc): + def __init__(self,myspec): + generic_ppc.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -mcpu=G5 -mtune=G5 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" + self.settings["HOSTUSE"]=["altivec"] + +class arch_power(generic_ppc): + "builder class for generic power" + def __init__(self,myspec): + generic_ppc.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -mcpu=power -mtune=power -fno-strict-aliasing -pipe" + +class arch_power_ppc(generic_ppc): + "builder class for generic powerpc/power" + def __init__(self,myspec): + generic_ppc.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -mcpu=common -mtune=common -fno-strict-aliasing -pipe" + +class arch_power3(arch_ppc64): + "builder class for power3 under ppc64" + def __init__(self,myspec): + arch_ppc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -pipe -mcpu=power3 -mtune=power3" + self.settings["HOSTUSE"]=["ibm"] + +class arch_power4(arch_ppc64): + "builder class for power4 under ppc64" + def __init__(self,myspec): + arch_ppc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -pipe -mcpu=power4 -mtune=power4" + self.settings["HOSTUSE"]=["ibm"] + +class arch_power5(arch_ppc64): + "builder class for power5 under ppc64" + def __init__(self,myspec): + arch_ppc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -pipe -mcpu=power5 -mtune=power5" + self.settings["HOSTUSE"]=["ibm"] + +class arch_power6(arch_ppc64): + "builder class for power6 under ppc64" + def __init__(self,myspec): + arch_ppc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -pipe -mcpu=power6 -mtune=power6" + self.settings["HOSTUSE"]=["altivec","ibm"] + +class arch_ppc(generic_ppc): + "builder class for generic powerpc" + def __init__(self,myspec): + generic_ppc.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -mcpu=powerpc -mtune=powerpc -fno-strict-aliasing -pipe" + +class arch_ppc64(generic_ppc64): + "builder class for generic ppc64" + def __init__(self,myspec): + generic_ppc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -pipe" + self.settings["CHOST"]="powerpc64-unknown-linux-gnu" + +def register(): + "Inform main catalyst program of the contents of this plugin." + return ({ + "970" : arch_970, + "cell" : arch_cell, + "g3" : arch_g3, + "g4" : arch_g4, + "g5" : arch_g5, + "power" : arch_power, + "power-ppc" : arch_power_ppc, + "power3" : arch_power3, + "power4" : arch_power4, + "power5" : arch_power5, + "power6" : arch_power6, + "ppc" : arch_ppc, + "ppc64" : arch_ppc64 + }, ("ppc","ppc64","powerpc","powerpc64")) + diff --git a/arch/ppc.py b/arch/ppc.py deleted file mode 100644 index 7afd8b06..00000000 --- a/arch/ppc.py +++ /dev/null @@ -1,62 +0,0 @@ - -import os,builder -from catalyst_support import * - -# gcc-3.3.3 is required to do G5 optimizations -# install a 32bit kernel personality changer (that works) before building on a -# ppc64 host new gcc optimization feature requires -fno-strict-aliasing needed, -# otherwise code complains use the experimental thing for nptl builds - -class generic_ppc(builder.generic): - "abstract base class for all ppc builders" - def __init__(self,myspec): - builder.generic.__init__(self,myspec) - self.settings["CHOST"]="powerpc-unknown-linux-gnu" - if self.settings["buildarch"]=="ppc64": - if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"): - raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)" - self.settings["CHROOT"]="linux32 chroot" - self.settings["crosscompile"] = False; - else: - self.settings["CHROOT"]="chroot" - -class arch_power_ppc(generic_ppc): - "builder class for generic powerpc/power" - def __init__(self,myspec): - generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=common -mtune=common -fno-strict-aliasing -pipe" - -class arch_ppc(generic_ppc): - "builder class for generic powerpc" - def __init__(self,myspec): - generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=powerpc -mtune=powerpc -fno-strict-aliasing -pipe" - -class arch_power(generic_ppc): - "builder class for generic power" - def __init__(self,myspec): - generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=power -mtune=power -fno-strict-aliasing -pipe" - -class arch_g3(generic_ppc): - def __init__(self,myspec): - generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=G3 -mtune=G3 -fno-strict-aliasing -pipe" - -class arch_g4(generic_ppc): - def __init__(self,myspec): - generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" - self.settings["HOSTUSE"]=["altivec"] - -class arch_g5(generic_ppc): - def __init__(self,myspec): - generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=G5 -mtune=G5 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" - self.settings["HOSTUSE"]=["altivec"] - -def register(): - "Inform main catalyst program of the contents of this plugin." - return ({"ppc":arch_ppc,"power":arch_power,"power-ppc":arch_power_ppc,"g3":arch_g3,"g4":arch_g4,"g5":arch_g5}, - ("ppc","powerpc")) - diff --git a/arch/ppc64.py b/arch/ppc64.py deleted file mode 100644 index 40750341..00000000 --- a/arch/ppc64.py +++ /dev/null @@ -1,68 +0,0 @@ - -import builder - -class generic_ppc64(builder.generic): - "abstract base class for all ppc64 builders" - def __init__(self,myspec): - builder.generic.__init__(self,myspec) - self.settings["CHROOT"]="chroot" - -class arch_ppc64(generic_ppc64): - "builder class for generic ppc64" - def __init__(self,myspec): - generic_ppc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -pipe" - self.settings["CHOST"]="powerpc64-unknown-linux-gnu" - -class arch_970(arch_ppc64): - "builder class for 970 aka G5 under ppc64" - def __init__(self,myspec): - arch_ppc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -pipe -mcpu=970 -mtune=970" - self.settings["HOSTUSE"]=["altivec"] - -class arch_cell(arch_ppc64): - "builder class for cell under ppc64" - def __init__(self,myspec): - arch_ppc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -pipe -mcpu=cell -mtune=cell" - self.settings["HOSTUSE"]=["altivec"] - -class arch_power3(arch_ppc64): - "builder class for power3 under ppc64" - def __init__(self,myspec): - arch_ppc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -pipe -mcpu=power3 -mtune=power3" - -class arch_power4(arch_ppc64): - "builder class for power4 under ppc64" - def __init__(self,myspec): - arch_ppc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -pipe -mcpu=power4 -mtune=power4" - -class arch_power5(arch_ppc64): - "builder class for power5 under ppc64" - def __init__(self,myspec): - arch_ppc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -pipe -mcpu=power5 -mtune=power5" - -class arch_power6(arch_ppc64): - "builder class for power6 under ppc64" - def __init__(self,myspec): - arch_ppc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -pipe -mcpu=power6 -mtune=power6" - self.settings["HOSTUSE"]=["altivec"] - -def register(): - "Inform main catalyst program of the contents of this plugin." - return ({ - "ppc64": arch_ppc64, - "970": arch_970, - "cell": arch_cell, - "power3": arch_power3, - "power4": arch_power4, - "power5": arch_power5, - "power6": arch_power6 - }, ("ppc64","powerpc64")) - - diff --git a/arch/sparc.py b/arch/sparc.py index adde6cdb..5eb5344c 100644 --- a/arch/sparc.py +++ b/arch/sparc.py @@ -14,14 +14,29 @@ class generic_sparc(builder.generic): else: self.settings["CHROOT"]="chroot" +class generic_sparc64(builder.generic): + "abstract base class for all sparc64 builders" + def __init__(self,myspec): + builder.generic.__init__(self,myspec) + self.settings["CHROOT"]="chroot" + class arch_sparc(generic_sparc): "builder class for generic sparc (sun4cdm)" def __init__(self,myspec): generic_sparc.__init__(self,myspec) self.settings["CFLAGS"]="-O2 -pipe" - self.settings["CXXFLAGS"]="-O2 -pipe" + self.settings["CHOST"]="sparc-unknown-linux-gnu" + +class arch_sparc64(generic_sparc64): + "builder class for generic sparc64 (sun4u)" + def __init__(self,myspec): + generic_sparc64.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -mcpu=ultrasparc -pipe" self.settings["CHOST"]="sparc-unknown-linux-gnu" def register(): "Inform main catalyst program of the contents of this plugin." - return ({"sparc":arch_sparc}, ("sparc", )) + return ({ + "sparc" : arch_sparc, + "sparc64" : arch_sparc64 + }, ("sparc","sparc64", )) diff --git a/arch/sparc64.py b/arch/sparc64.py deleted file mode 100644 index df8b8e91..00000000 --- a/arch/sparc64.py +++ /dev/null @@ -1,21 +0,0 @@ - -import builder,os -from catalyst_support import * - -class generic_sparc64(builder.generic): - "abstract base class for all sparc64 builders" - def __init__(self,myspec): - builder.generic.__init__(self,myspec) - self.settings["CHROOT"]="chroot" - -class arch_sparc64(generic_sparc64): - "builder class for generic sparc64 (sun4u)" - def __init__(self,myspec): - generic_sparc64.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=ultrasparc -pipe" - self.settings["CXXFLAGS"]="-O2 -mcpu=ultrasparc -pipe" - self.settings["CHOST"]="sparc-unknown-linux-gnu" - -def register(): - "Inform main catalyst program of the contents of this plugin." - return ({"sparc64":arch_sparc64}, ("sparc64", )) |