Skip to contentSkip to conversation

luajit: mips and mipsel are 32bit targets too

PATCH In review Andre McCurdy 3 participants 5 messages Jan 24, 2017 – Jan 25, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 luajit: mips and mipsel are 32bit targets too

When cross compiling, the word size of the compiler set via HOST_CC must match the word size of the target. That's achieved by appending "-m32" to BUILD_CC_ARCH if the target word size is known to be 32bits.

Unfortunately the current list of over-rides (powerpc, x86 and arm) does not cover all cases. Add mips and mipsel to the list too (which is still not enough to cover all targets or corner cases such as x32, but better than before).

---
 meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +2 -0
index 964dc1d..2049846 100644
@@ -24,6 +24,8 @@ BBCLASSEXTEND = "native"
 BUILD_CC_ARCH_append_powerpc = ' -m32'
 BUILD_CC_ARCH_append_x86 = ' -m32'
 BUILD_CC_ARCH_append_arm = ' -m32'
+BUILD_CC_ARCH_append_mips = ' -m32'
+BUILD_CC_ARCH_append_mipsel = ' -m32'
 
 # The lua makefiles expect the TARGET_SYS to be from uname -s
 # Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD
Signature · 1 line
1.9.1
#1 lore raw
Quoted 8 lines · Andre McCurdy

When cross compiling, the word size of the compiler set via HOST_CC must match the word size of the target. That's achieved by appending "-m32" to BUILD_CC_ARCH if the target word size is known to be 32bits.

Unfortunately the current list of over-rides (powerpc, x86 and arm) does not cover all cases. Add mips and mipsel to the list too (which is still not enough to cover all targets or corner cases such as x32, but better than before).

x32 ABI is not supported in luaJIT

Quoted 20 lines
---
 meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +2 -0
index 964dc1d..2049846 100644
@@ -24,6 +24,8 @@ BBCLASSEXTEND = "native"
 BUILD_CC_ARCH_append_powerpc = ' -m32'
 BUILD_CC_ARCH_append_x86 = ' -m32'
 BUILD_CC_ARCH_append_arm = ' -m32'
+BUILD_CC_ARCH_append_mips = ' -m32'
+BUILD_CC_ARCH_append_mipsel = ' -m32'
 
 # The lua makefiles expect the TARGET_SYS to be from uname -s
 # Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD
#2 lore raw
In reply to Andre McCurdy
Quoted 23 lines · Andre McCurdy

When cross compiling, the word size of the compiler set via HOST_CC must match the word size of the target. That's achieved by appending "-m32" to BUILD_CC_ARCH if the target word size is known to be 32bits.

Unfortunately the current list of over-rides (powerpc, x86 and arm) does not cover all cases. Add mips and mipsel to the list too (which is still not enough to cover all targets or corner cases such as x32, but better than before).

---
 meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb | 2 ++

 1 file changed, 2 insertions(+)
meta- renamed from meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +0 -0

oe/recipes-devtools/luajit/luajit_2.0.4.bb
index 964dc1d..2049846 100644

meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +0 -0
@@ -24,6 +24,8 @@ BBCLASSEXTEND = "native"

 BUILD_CC_ARCH_append_powerpc = ' -m32'
 BUILD_CC_ARCH_append_x86 = ' -m32'
 BUILD_CC_ARCH_append_arm = ' -m32'

meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb BBCLASSEXTEND = "native" · line 28

Quoted 2 lines
meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +2 -0
+BUILD_CC_ARCH_append_mips = ' -m32'
+BUILD_CC_ARCH_append_mipsel = ' -m32'

I suspect this should be using:

BUILD_CC_ARCH_append_mipsarchn32 = ' -m32'
BUILD_CC_ARCH_append_mipsarcho32 = ' -m32'

to also cover mips r6?

Cheers,
Andre'

#3 lore raw
Quoted 29 lines · André Draszik
Quoted 20 lines · Andre McCurdy

When cross compiling, the word size of the compiler set via HOST_CC must match the word size of the target. That's achieved by appending "-m32" to BUILD_CC_ARCH if the target word size is known to be 32bits.

Unfortunately the current list of over-rides (powerpc, x86 and arm) does not cover all cases. Add mips and mipsel to the list too (which is still not enough to cover all targets or corner cases such as x32, but better than before).

---
 meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta- renamed from meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +0 -0

oe/recipes-devtools/luajit/luajit_2.0.4.bb
index 964dc1d..2049846 100644

meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb BBCLASSEXTEND = "native" · line 28

Quoted 5 lines
meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +2 -0
@@ -24,6 +24,8 @@ BBCLASSEXTEND = "native"
 BUILD_CC_ARCH_append_powerpc = ' -m32'
 BUILD_CC_ARCH_append_x86 = ' -m32'
 BUILD_CC_ARCH_append_arm = ' -m32'
+BUILD_CC_ARCH_append_mips = ' -m32'
+BUILD_CC_ARCH_append_mipsel = ' -m32'

I suspect this should be using:

Quoted 2 lines

BUILD_CC_ARCH_append_mipsarchn32 = ' -m32'
BUILD_CC_ARCH_append_mipsarcho32 = ' -m32'

That wouldn't work so well when backported to krogoth and morty (which is where I personally need the fix).

But maybe there's a more generic way to answer the question "is the target 32bit?" from within a recipe without needing to keep a list of over-rides up to date?

Quoted 13 lines

to also cover mips r6?

Cheers,
Andre'

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#4 lore raw
Quoted 33 lines · Andre McCurdy
Quoted 29 lines · André Draszik
Quoted 20 lines · Andre McCurdy

When cross compiling, the word size of the compiler set via HOST_CC must match the word size of the target. That's achieved by appending "-m32" to BUILD_CC_ARCH if the target word size is known to be 32bits.

Unfortunately the current list of over-rides (powerpc, x86 and arm) does not cover all cases. Add mips and mipsel to the list too (which is still not enough to cover all targets or corner cases such as x32, but better than before).

---
 meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta- renamed from meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +0 -0

oe/recipes-devtools/luajit/luajit_2.0.4.bb
index 964dc1d..2049846 100644

meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb BBCLASSEXTEND = "native" · line 28

Quoted 5 lines
meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb +2 -0
@@ -24,6 +24,8 @@ BBCLASSEXTEND = "native"
 BUILD_CC_ARCH_append_powerpc = ' -m32'
 BUILD_CC_ARCH_append_x86 = ' -m32'
 BUILD_CC_ARCH_append_arm = ' -m32'
+BUILD_CC_ARCH_append_mips = ' -m32'
+BUILD_CC_ARCH_append_mipsel = ' -m32'

I suspect this should be using:

Quoted 2 lines

BUILD_CC_ARCH_append_mipsarchn32 = ' -m32'
BUILD_CC_ARCH_append_mipsarcho32 = ' -m32'

Quoted 6 lines

That wouldn't work so well when backported to krogoth and morty (which is where I personally need the fix).

But maybe there's a more generic way to answer the question "is the target 32bit?" from within a recipe without needing to keep a list of over-rides up to date?

SITEINFO_BITS seems to do that.

Quoted 4 lines
Quoted 4 lines

Cheers,
Andre'