# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 06 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> +arch/powerpc.py,
+ -arch/ppc.py, -arch/ppc64.py, arch/sparc.py, -arch/sparc64.py:
+ 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.
+
06 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> arch/amd64.py,
arch/x86.py:
Did a little cleanup on the x86.py to remove some redundant entries and
--- /dev/null
+
+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"))
+
+++ /dev/null
-
-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"))
-
+++ /dev/null
-
-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"))
-
-
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", ))
+++ /dev/null
-
-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", ))