Updating x86/amd64 arch support. Original patches by William Cooke <gentoo@wcooke...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 30 Jul 2008 16:32:27 +0000 (09:32 -0700)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 30 Jul 2008 16:32:27 +0000 (09:32 -0700)
ChangeLog
arch/amd64.py
arch/x86.py

index 55ebdfc8cc900227affb7104581a5124340aaa39..95e2e0c50063f618d11353ecce8f27c8707d3c4d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  30 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> arch/amd64.py,
+  arch/x86.py:
+  Updating x86/amd64 arch support. Original patches by William Cooke
+  <gentoo@wcooke.org> and reported to Gentoo bug #224429, modified by me.
+
   28 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org>
   modules/generic_stage_target.py, modules/livecd_stage2_target.py,
   modules/snapshot_target.py, modules/stage4_target.py,
index 2ede817ebf4f42fb5a7be3c9eeec49b7dcaddf40..40593cfc0be86ab0195c2913ed4f4d7f7556ee47 100644 (file)
@@ -8,28 +8,67 @@ class generic_amd64(builder.generic):
                self.settings["CHROOT"]="chroot"
 
 class arch_amd64(generic_amd64):
-       "builder class for generic amd64 (athlon64/opteron)"
+       "builder class for generic amd64 (Intel and AMD)"
        def __init__(self,myspec):
                generic_amd64.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -pipe"
                self.settings["CHOST"]="x86_64-pc-linux-gnu"
                self.settings["HOSTUSE"]=["mmx","sse","sse2"]
 
-#class arch_nocona(generic_x86):
-#      def __init__(self,myspec):
-#              generic_amd64.__init__(self,myspec)
-#              self.settings["CFLAGS"]="-O2 -march=nocona -pipe"
-#              self.settings["HOSTUSE"]=["mmx","sse","sse2"]
+class arch_nocona(generic_amd64):
+       "improved version of Intel Pentium 4 CPU with 64-bit extensions, MMX, SSE, SSE2 and SSE3 support"
+       def __init__(self,myspec):
+               generic_amd64.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=nocona -pipe"
+               self.settings["HOSTUSE"]=["mmx","sse","sse2"]
 
-#class arch_core2(generic_x86):
-#      def __init__(self,myspec):
-#              generic_amd64.__init__(self,myspec)
-#              self.settings["CFLAGS"]="-O2 -march=core2 -pipe"
-#              self.settings["HOSTUSE"]=["mmx","sse","sse2"]
+# Requires gcc 4.3 to use this class
+class arch_core2(generic_amd64):
+       "Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 support"
+       def __init__(self,myspec):
+               generic_amd64.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=core2 -pipe"
+               self.settings["HOSTUSE"]=["mmx","sse","sse2","ssse3"]
+
+class arch_k8(generic_amd64):
+       "generic k8, opteron and athlon64 support"
+       def __init__(self,myspec):
+               generic_amd64.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=k8 -pipe"
+               self.settings["CHOST"]="x86_64-pc-linux-gnu"
+               self.settings["HOSTUSE"]=["mmx","sse","sse2","3dnow"]
+
+class arch_k8_sse3(generic_amd64):
+       "improved versions of k8, opteron and athlon64 with SSE3 support"
+       def __init__(self,myspec):
+               generic_amd64.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=k8-sse3 -pipe"
+               self.settings["CHOST"]="x86_64-pc-linux-gnu"
+               self.settings["HOSTUSE"]=["mmx","sse","sse2","3dnow"]
+
+class arch_amdfam10(generic_amd64):
+       "AMD Family 10h core based CPUs with x86-64 instruction set support"
+       def __init__(self,myspec):
+               generic_amd64.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=amdfam10 -pipe"
+               self.settings["CHOST"]="x86_64-pc-linux-gnu"
+               self.settings["HOSTUSE"]=["mmx","sse","sse2","3dnow"]
 
 def register():
-       "Inform main catalyst program of the contents of this plugin."
+       "inform main catalyst program of the contents of this plugin"
        return ({
-               "amd64"         : arch_amd64
-       }, ("x86_64", ))
+               "amd64"         : arch_amd64,
+               "k8"            : arch_k8,
+               "opteron"       : arch_k8,
+               "athlon64"      : arch_k8,
+               "athlonfx"      : arch_k8
+               "nocona"        : arch_nocona,
+# uncomment when gcc 4.3 is stable and delete this line
+#              "core2"         : arch_core2,
+#              "k8-sse3"       : arch_k8_sse3,
+#              "opteron-sse3"  : arch_k8_sse3,
+#              "athlon64-sse3" : arch_k8_sse3,
+#              "amdfam10"      : arch_amdfam10,
+#              "barcelona"     : arch_amdfam10
+       }, ("x86_64","amd64","nocona"))
 
index 23f7d190026eeeacd0b2c3e7dfea9ea2e8d892e5..9f3d39d3a3702b79f7e8c1b6fc0ae81384b2f07a 100644 (file)
@@ -1,6 +1,6 @@
 
 import builder,os
-from catalyst_support import *
+from catalyst_supportimport *
 
 class generic_x86(builder.generic):
        "abstract base class for all x86 builders"
@@ -22,73 +22,107 @@ class arch_x86(generic_x86):
                self.settings["CHOST"]="i386-pc-linux-gnu"
 
 class arch_i386(generic_x86):
+       "Intel i386 CPU"
        def __init__(self,myspec):
                generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=i386 -pipe"
                self.settings["CHOST"]="i386-pc-linux-gnu"
 
 class arch_i486(generic_x86):
+       "Intel i486 CPU"
        def __init__(self,myspec):
                generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=i486 -pipe"
                self.settings["CHOST"]="i486-pc-linux-gnu"
 
 class arch_i586(generic_x86):
+       "Intel Pentium CPU"
        def __init__(self,myspec):
                generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=i586 -pipe"
                self.settings["CHOST"]="i586-pc-linux-gnu"
 
 class arch_i686(generic_x86):
+       "Intel Pentium Pro CPU"
        def __init__(self,myspec):
                generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=i686 -pipe"
                self.settings["CHOST"]="i686-pc-linux-gnu"
 
-class arch_athlon(generic_x86):
-       def __init__(self,myspec):
-               generic_x86.__init__(self,myspec)
-               self.settings["CFLAGS"]="-O2 -march=athlon -pipe"
-               self.settings["CHOST"]="i686-pc-linux-gnu"
-               self.settings["HOSTUSE"]=["mmx","3dnow"]
-
-class arch_athlon_xp(generic_x86):
+class arch_pentium_mmx(generic_x86):
+       "Intel Pentium MMX CPU with MMX support"
        def __init__(self,myspec):
                generic_x86.__init__(self,myspec)
-               self.settings["CFLAGS"]="-O2 -march=athlon-xp -pipe"
-               self.settings["CHOST"]="i686-pc-linux-gnu"
-               self.settings["HOSTUSE"]=["mmx","3dnow","sse"]
-
-class arch_pentium_mmx(arch_i586):
-       def __init__(self,myspec):
-               arch_i586.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=pentium-mmx -pipe"
                self.settings["HOSTUSE"]=["mmx"]
        
 class arch_pentium2(generic_x86):
+       "Intel Pentium 2 CPU with MMX support"
        def __init__(self,myspec):
-               arch_i686.__init__(self,myspec)
+               generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=pentium2 -pipe"
                self.settings["HOSTUSE"]=["mmx"]
 
 class arch_pentium3(generic_x86):
+       "Intel Pentium 3 CPU with MMX and SSE support"
        def __init__(self,myspec):
-               arch_i686.__init__(self,myspec)
+               generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=pentium3 -pipe"
                self.settings["HOSTUSE"]=["mmx","sse"]
 
 class arch_pentium4(generic_x86):
+       "Intel Pentium 4 CPU with MMX, SSE and SSE2 support"
        def __init__(self,myspec):
-               arch_i686.__init__(self,myspec)
+               generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=pentium4 -pipe"
                self.settings["HOSTUSE"]=["mmx","sse","sse2"]
 
+class arch_pentium_m(generic_x86):
+       "Intel Pentium M CPU with MMX, SSE and SSE2 support"
+       def __init__(self,myspec):
+               generic_x86.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=pentium-m -pipe"
+               self.settings["HOSTUSER"]=["mmx","sse","sse2"]
+
 class arch_prescott(generic_x86):
+       "improved version of Intel Pentium 4 CPU with MMX, SSE, SSE2 and SSE3 support"
        def __init__(self,myspec):
-               arch_i686.__init__(self,myspec)
+               generic_x86.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=prescott -pipe"
                self.settings["HOSTUSE"]=["mmx","sse","sse2"]
 
+class arch_k6(generic_x86):
+       "AMD K6 CPU with MMX support"
+       def __init__(self,myspec):
+               generic_x86.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=k6 -pipe"
+               self.settings["CHOST"]="i686-pc-linux-gnu"
+               self.settings["HOSTUSE"]=["mmx"]
+
+class arch_k6_2(generic_x86):
+       "AMD K6-2 CPU with MMX and 3dNOW! support"
+       def __init__(self,myspec):
+               generic_x86.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=k6-2 -pipe"
+               self.settings["CHOST"]="i686-pc-linux-gnu"
+               self.settings["HOSTUSE"]=["mmx","3dnow"]
+
+class arch_athlon(generic_x86):
+       "AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and SSE prefetch support"
+       def __init__(self,myspec):
+               generic_x86.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=athlon -pipe"
+               self.settings["CHOST"]="i686-pc-linux-gnu"
+               self.settings["HOSTUSE"]=["mmx","3dnow"]
+
+class arch_athlon_xp(generic_x86):
+       "improved AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and full SSE support"
+       def __init__(self,myspec):
+               generic_x86.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=athlon-xp -pipe"
+               self.settings["CHOST"]="i686-pc-linux-gnu"
+               self.settings["HOSTUSE"]=["mmx","3dnow","sse"]
+
 def register():
        "Inform main catalyst program of the contents of this plugin."
        return ({
@@ -97,13 +131,23 @@ def register():
                "i486"                  : arch_i486,
                "i586"                  : arch_i586,
                "i686"                  : arch_i686,
-               "athlon"                : arch_athlon,
-               "athlon-xp"             : arch_athlon_xp,
-               "athlon-mp"             : arch_athlon_xp,
-               "pentium-mmx"   : arch_pentium_mmx,
+               "pentium"               : arch_i586,
                "pentium2"              : arch_pentium2,
                "pentium3"              : arch_pentium3,
+               "pentium3m"             : arch_pentium3,
+               "pentium-m"             : arch_pentium_m,
                "pentium4"              : arch_pentium4,
-               "prescott"              : arch_prescott
+               "pentium4m"             : arch_pentium4,
+               "pentiumpro"            : arch_i686,
+               "pentium-mmx"           : arch_pentium_mmx,
+               "prescott"              : arch_prescott,
+               "k6"                    : arch_k6,
+               "k6-2"                  : arch_k6_2,
+               "k6-3"                  : arch_k6_2,
+               "athlon"                : arch_athlon,
+               "athlon-tbird"          : arch_athlon,
+               "athlon-4"              : arch_athlon_xp,
+               "athlon-xp"             : arch_athlon_xp,
+               "athlon-mp"             : arch_athlon_xp
        }, ('i386', 'i486', 'i586', 'i686'))