[Buildroot] luajit package fails to build on x86_64 for x86

Fabio Porcedda fabio.porcedda at gmail.com
Fri Mar 7 22:19:42 UTC 2014


On Fri, Mar 7, 2014 at 10:58 PM, Fabio Porcedda
<fabio.porcedda at gmail.com> wrote:
> On Fri, Mar 7, 2014 at 10:30 PM, Thomas Petazzoni
> <thomas.petazzoni at free-electrons.com> wrote:
>> Dear Fabio Porcedda,
>>
>> On Fri, 7 Mar 2014 22:11:33 +0100, Fabio Porcedda wrote:
>>
>>> > Ok, but not on ARM or MIPS, and probably not on many other 32 bits
>>> > architectures supported by Buildroot. Bottom line: testing 'gcc -m32'
>>> > is not a good way of testing whether the architecture is 32 bits or is
>>> > a 64 bits architecture capable of building and running 32 bits binaries.
>>>
>>> We need to test if 32bit binaries are built only for 64bit host architectures.
>>> Which are the 64bit host architectures that Buildroot supports?
>>
>> Potentially any 64 bits architecture, we don't have particular
>> dependencies on the host architecture.
>
> Ok i undertand the general problem but right now the luajit package
> support building 32 binaries on a 64 host architecture only if the
> host compiler support the -m32 option so right now it's fine to test
> only if the -m32 option is used.
>
> So i think adding the line
> select BR2_HOSTARCH_NEEDS_IA32_COMPILER if BR2_ARCH_IS_64

I've forgotten to add the "!" sign, so it's:

diff --git a/package/luajit/Config.in b/package/luajit/Config.in
index 9c4ecc3..dd93609 100644
--- a/package/luajit/Config.in
+++ b/package/luajit/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LUAJIT
        # Luajit is only available for some target architectures, and
        # has some complexity wrt 32/64. See luajit.mk for details.
        depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64')
|| BR2_powerpc || BR2_arm || BR2_armeb
+       select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64
        help
          LuaJIT implements the full set of language features defined
          by Lua 5.1. The virtual machine (VM) is API- and


> it's the right solution for checking the configurations supported by
> the luajit package.

because in luajit.mk there is this:

ifeq ($(BR2_ARCH_IS_64),y)
LUAJIT_HOST_CC=$(HOSTCC)
else
LUAJIT_HOST_CC=$(HOSTCC) -m32
endif

Regards
-- 
Fabio Porcedda


More information about the buildroot mailing list