mips.py: add mips32 softfloat targets
authorMatt Turner <mattst88@gmail.com>
Mon, 17 Oct 2011 02:16:45 +0000 (22:16 -0400)
committerMatt Turner <mattst88@gmail.com>
Mon, 17 Oct 2011 02:20:46 +0000 (22:20 -0400)
softfloat targets are for producing a userland (ie glibc, gcc) that
handles software floating-point emulation in userspace. The alternative
is configuring your kernel to emulate floating-point math, which is
slower but allows you to use a standard "hard float" userland.

modules/catalyst/arch/mips.py

index 46fafa8ebcd611a226ad5613afe159a25473996b..4b6e77c191352b8d262addbca76654fe11adbca2 100644 (file)
@@ -41,12 +41,26 @@ class arch_mips32(generic_mips):
                generic_mips.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -pipe"
 
+class arch_mips32_softfloat(generic_mips):
+       "Builder class for MIPS 32 [Big-endian softfloat]"
+       def __init__(self,myspec):
+               generic_mips.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -pipe"
+               self.settings["CHOST"]="mips-softfloat-linux-gnu"
+
 class arch_mips32r2(generic_mips):
        "Builder class for MIPS 32r2 [Big-endian]"
        def __init__(self,myspec):
                generic_mips.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -pipe"
 
+class arch_mips32r2_softfloat(generic_mips):
+       "Builder class for MIPS 32r2 [Big-endian softfloat]"
+       def __init__(self,myspec):
+               generic_mips.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -pipe"
+               self.settings["CHOST"]="mips-softfloat-linux-gnu"
+
 class arch_mips3(generic_mips):
        "Builder class for MIPS III [Big-endian]"
        def __init__(self,myspec):
@@ -179,12 +193,26 @@ class arch_mips32el(generic_mipsel):
                generic_mipsel.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -pipe"
 
+class arch_mips32el_softfloat(generic_mipsel):
+       "Builder class for MIPS 32 [Little-endian softfloat]"
+       def __init__(self,myspec):
+               generic_mipsel.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -pipe"
+               self.settings["CHOST"]="mipsel-softfloat-linux-gnu"
+
 class arch_mips32r2el(generic_mipsel):
        "Builder class for MIPS 32r2 [Little-endian]"
        def __init__(self,myspec):
                generic_mipsel.__init__(self,myspec)
                self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -pipe"
 
+class arch_mips32r2el_softfloat(generic_mipsel):
+       "Builder class for MIPS 32r2 [Little-endian softfloat]"
+       def __init__(self,myspec):
+               generic_mipsel.__init__(self,myspec)
+               self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -pipe"
+               self.settings["CHOST"]="mipsel-softfloat-linux-gnu"
+
 class arch_mipsel3(generic_mipsel):
        "Builder class for MIPS III [Little-endian]"
        def __init__(self,myspec):
@@ -325,7 +353,9 @@ _subarch_map = {
        "mips"                  : arch_mips1,
        "mips1"                 : arch_mips1,
        "mips32"                : arch_mips32,
+       "mips32_softfloat"              : arch_mips32_softfloat,
        "mips32r2"              : arch_mips32r2,
+       "mips32r2_softfloat"    : arch_mips32r2_softfloat,
        "mips3"                 : arch_mips3,
        "mips3_n32"             : arch_mips3_n32,
        "mips3_n64"             : arch_mips3_n64,
@@ -349,7 +379,9 @@ _subarch_map = {
        "mipsel"                : arch_mipsel1,
        "mipsel1"               : arch_mipsel1,
        "mips32el"              : arch_mips32el,
+       "mips32el_softfloat"    : arch_mips32el_softfloat,
        "mips32r2el"            : arch_mips32r2el,
+       "mips32r2el_softfloat"  : arch_mips32r2el_softfloat,
        "mipsel3"               : arch_mipsel3,
        "mipsel3_n32"   : arch_mipsel3_n32,
        "mipsel3_n64"   : arch_mipsel3_n64,