From patchwork Fri Mar 7 22:19:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 328097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id A25D42C00BE for ; Sat, 8 Mar 2014 09:20:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EB1658BD40; Fri, 7 Mar 2014 22:20:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R7Idg96vdqXF; Fri, 7 Mar 2014 22:20:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 416388BD28; Fri, 7 Mar 2014 22:20:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3DDF71C2236 for ; Fri, 7 Mar 2014 22:20:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 339CD8CDCE for ; Fri, 7 Mar 2014 22:20:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n2pqFniYpMBL for ; Fri, 7 Mar 2014 22:20:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4B27D8CDCD for ; Fri, 7 Mar 2014 22:20:06 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id wn1so4723467obc.39 for ; Fri, 07 Mar 2014 14:20:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=cjVg7geKITGvvI5uNZnPH9ukhAhLW0/pfHBfxKRMkDU=; b=qnQP4ImCe8JjH53s6l8ewhrSM9OOIKR6g/68idR8PUI3m8NRXFEQUpBMHTUQ+dhsAF D8bCIwleHqaehPD+cs+uquKybuRnO0R/J5cYibv+3MLSkY1wUqmxpaQIduZ/1GhNCqYS Z680qGS3Rde8hb9ETL0IxTmVC3F1hx5poiRP55B26MNLFnbQIVFtiAXFjz2kdL9lFWn8 AthrzwmaD1cgsaPKQUk5f5cCbssSbnTi52Bn+AsKXbWOKeAwwMpyng9iuivi413ZS0p7 +SG8ni1W2Dl/bwHJzVa9DCU4fy9FoN7rx6pODvnfg+uySHspLnSS7WMW1Z8r9HZKdQ3W uMSQ== X-Received: by 10.60.141.105 with SMTP id rn9mr13080834oeb.27.1394230805638; Fri, 07 Mar 2014 14:20:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.99.173 with HTTP; Fri, 7 Mar 2014 14:19:42 -0800 (PST) In-Reply-To: References: <20140306213113.GH3625@free.fr> <20140307172121.GC3384@free.fr> <20140307174903.GE3384@free.fr> <20140307204055.2d0a4b23@skate> <20140307214651.1cb85457@skate> <20140307215801.69039f22@skate> <20140307223003.53d17887@skate> From: Fabio Porcedda Date: Fri, 7 Mar 2014 23:19:42 +0100 Message-ID: To: Thomas Petazzoni Cc: "buildroot@busybox.net" , "Yann E. MORIN" Subject: Re: [Buildroot] luajit package fails to build on x86_64 for x86 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net On Fri, Mar 7, 2014 at 10:58 PM, Fabio Porcedda wrote: > On Fri, Mar 7, 2014 at 10:30 PM, Thomas Petazzoni > 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: 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 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