[Buildroot] luajit package fails to build on x86_64 for x86
Fabio Porcedda
fabio.porcedda at gmail.com
Fri Mar 7 20:51:57 UTC 2014
On Fri, Mar 7, 2014 at 9:46 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Dear Fabio Porcedda,
>
> On Fri, 7 Mar 2014 21:37:14 +0100, Fabio Porcedda wrote:
>
>> diff --git a/package/luajit/Config.in b/package/luajit/Config.in
>> index 9c4ecc3..d0c1512 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_x86_64
>
> This will prevent building Luajit for ARM, while running Buildroot on
> an ARM platform. It's fairly unlikely, but still. "gcc -m32" will only
> work on x86, or x86-64 with the 32 bits development files installed.
> While in fact Luajit can build in situation where the bitness of the
> target and the bitness of the arch match.
>
> For example, Peter has one PowerPC build server: a "gcc -m32" test
> would fail on it, even though it would be perfectly capable of building
> the ARM 32 bits, PowerPC or x86 Luajit.
Reading the gcc documentation the option -m32 work even on PowerPC:
http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/RS_002f6000-and-PowerPC-Options.html
RS/6000 and PowerPC Options -mcpu=cpu-type -mtune=cpu-type
-mcmodel=code-model -mpowerpc64 -maltivec -mno-altivec
-mpowerpc-gpopt -mno-powerpc-gpopt -mpowerpc-gfxopt
-mno-powerpc-gfxopt -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb
-mpopcntd -mno-popcntd -mfprnd -mno-fprnd -mcmpb -mno-cmpb
-mmfpgpr -mno-mfpgpr -mhard-dfp -mno-hard-dfp -mfull-toc
-mminimal-toc -mno-fp-in-toc -mno-sum-in-toc -m64 -m32
So maybe we need to change the name of the option
BR2_HOSTARCH_NEEDS_IA32_COMPILER
Regards
--
Fabio Porcedda
More information about the buildroot
mailing list