Skip to contentSkip to conversation

MIPS n32 shouldn't have SITEINFO_BITS = "64"

PATCH In review Peter Seebach 2 participants 4 messages Feb 21, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

cover MIPS n32 shouldn't have SITEINFO_BITS = "64"

MIPS n32 is a mips64 which is 32 bit. This historical quirk is recognized by insane.bbclass (except for a typo I made in a previous patch, also fixed here), but siteinfo doesn't know, so various programs fail to build correctly for it because SITEINFO_BITS is telling them they are 64-bit builds. (We ran into this with nss, which isn't in oe-core that I know of.)

So, add "bit-32" to mips-linux-gnun32's feature list (the SITEINFO_BITS test checks for 32 first, 64 second, so I don't have to remove bit-64), and remove the nonexistent mips-linux-gnun32 cases. Likewise for mipsel/mips64el.

The following changes since commit a5362de60c0051f16b88a40bd9cb41915bee0b0f:
Ross Burton (1):
rootfs_ipkg: fix BAD_RECOMMENDATIONS handling

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib seebs/gnun32
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/gnun32

Peter Seebach (1):
More n32 fixups

 meta/classes/insane.bbclass   |    2 +-
 meta/classes/siteinfo.bbclass |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)
#1 lore raw

PATCH 1/1 More n32 fixups

For perfectly sound reasons, n32 MIPS is a mips64 subset denoted by an ABI change, thus, "mips64-vendor-linux-gnun32" rather than "mips-vendor-linux-gnu". A previous change had fixed up insane.bbclass to recognize these, which mostly worked, but left SITEINFO_BITS set to 64.

Since bit-32 is processed first, and there are specific checks for linux-gnun32, modify the mips64-linux-gnun32 lines to specify "bit-32", so things that check SITEINFO_BITS get the right answer. Also, drop the mips{,el}-linux-gnun32 lines, because that's not a valid combination; n32 only makes sense for mips64.

Also, the insane.bbclass change spelled "mips64el" as "mipsel64", which no one noticed because no one's using little-endian n32, apparently.

---
 meta/classes/insane.bbclass   |    2 +-
 meta/classes/siteinfo.bbclass |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)
meta/classes/insane.bbclass +1 -1
index f52fcea..3eff4df 100644
@@ -107,7 +107,7 @@ def package_qa_get_machine_dict():
                       },
             "linux-gnun32" :       {
                         "mips64":       ( 8,     0,    0,          False,         32),
-                        "mipsel64":     ( 8,     0,    0,          True,          32),
+                        "mips64el":     ( 8,     0,    0,          True,          32),
                       },
         }
 
meta/classes/siteinfo.bbclass +2 -4
index e09d16a..09f88c6 100644
@@ -67,10 +67,8 @@ def siteinfo_data(d):
         "arm-linux-uclibceabi": "arm-linux-uclibc",
         "armeb-linux-gnueabi": "armeb-linux",
         "armeb-linux-uclibceabi": "armeb-linux-uclibc",
-        "mips-linux-gnun32": "mips-linux",
-        "mipsel-linux-gnun32": "mipsel-linux",
-        "mips64-linux-gnun32": "mips-linux",
-        "mips64el-linux-gnun32": "mipsel-linux",
+        "mips64-linux-gnun32": "mips-linux bit-32",
+        "mips64el-linux-gnun32": "mipsel-linux bit-32",
         "powerpc-linux": "powerpc32-linux",
         "powerpc-linux-uclibc": "powerpc-linux powerpc32-linux",
         "powerpc-linux-gnuspe": "powerpc-linux powerpc32-linux",
Signature · 1 line
1.7.0.4

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Re: [PATCH 1/1] More n32 fixups

Quoted 6 lines · On 21 February 2013 18:40:22 Peter Seebach <[email protected]> wrote:

For perfectly sound reasons, n32 MIPS is a mips64 subset denoted by an ABI change, thus, "mips64-vendor-linux-gnun32" rather than "mips-vendor-linux-gnu". A previous change had fixed up insane.bbclass to recognize these, which mostly worked, but left SITEINFO_BITS set to 64.

Quoted 8 lines

Since bit-32 is processed first, and there are specific checks for linux-gnun32, modify the mips64-linux-gnun32 lines to specify "bit-32", so things that check SITEINFO_BITS get the right answer. Also, drop the mips{,el}-linux-gnun32 lines, because that's not a valid combination; n32 only makes sense for mips64.

Also, the insane.bbclass change spelled "mips64el" as "mipsel64", which no one noticed because no one's using little-endian n32, apparently.

Would be great if you could have a look at the FIXME in meta/recipes-core/uclibc/uclibc-config.inc for the correct setting of the respective mips ABI.

Cheers,

Sent with AquaMail for Android
http://www.aqua-mail.com

#4 lore raw

Re: [PATCH 1/1] More n32 fixups

Quoted 7 lines · On Fri, 22 Feb 2013 00:23:48 +0100 Bernhard Reutner-Fischer…
Quoted 3 lines

Also, the insane.bbclass change spelled "mips64el" as "mipsel64", which no one noticed because no one's using little-endian n32, apparently.

Would be great if you could have a look at the FIXME in meta/recipes-core/uclibc/uclibc-config.inc for the correct setting of the respective mips ABI.

Hmm. I can look, but I don't think I've touched uclibc in a fairly long time. Untested, but possibly pretty close:

meta/recipes-core/uclibc/uclibc-config.inc +4 -2
@@ -73,9 +73,11 @@ def map_uclibc_abi(o, d):
             return 'ARM_EABI'
         else:
             return 'ARM_OABI'
-    # FIXME: This is inaccurate! Handle o32, n32, n64
     elif re.match('^mips.*64$', arch):
-        return 'MIPS_N64_ABI'
+       if o.endswith('gnun32'):
+            return 'MIPS_N32_ABI'
+       else:
+            return 'MIPS_N64_ABI'
     elif re.match('^mips.*', arch):
         return 'MIPS_O32_ABI'
     return ""

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.