From patchwork Wed Aug 15 01:25:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Danomi Manchego X-Patchwork-Id: 177525 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 7B8642C007B for ; Wed, 15 Aug 2012 11:29:20 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DA13FA04D4; Wed, 15 Aug 2012 01:29:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6128QuQf0Bcj; Wed, 15 Aug 2012 01:29:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A3CBBA04E3; Wed, 15 Aug 2012 01:28:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id CFB628F753 for ; Wed, 15 Aug 2012 01:27:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CDA8E25727 for ; Wed, 15 Aug 2012 01:27:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Mmr3DjjU78i for ; Wed, 15 Aug 2012 01:27:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by silver.osuosl.org (Postfix) with ESMTP id CBAAC2579A for ; Wed, 15 Aug 2012 01:25:34 +0000 (UTC) Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by qmta13.westchester.pa.mail.comcast.net with comcast id mpPQ1j0020mv7h05DpRdv7; Wed, 15 Aug 2012 01:25:37 +0000 Received: from localhost.localdomain ([68.37.48.40]) by omta11.westchester.pa.mail.comcast.net with comcast id mpRW1j00C0s1VyU3XpRWrG; Wed, 15 Aug 2012 01:25:30 +0000 From: Danomi Manchego To: buildroot@uclibc.org Date: Tue, 14 Aug 2012 21:25:30 -0400 Message-Id: <1344993930-2730-1-git-send-email-danomimanchego123@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile. 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 The luajit amalgamation compile starts with building a host tool, and then uses it to build itself.  However, when CFLAGS is specified, as opposed to TARGET_CFLAGS, then it is used for both HOST and TARGET builds.  So if you add something target specific into 'Target Optimizations' (for example, '-mfpu=neon -mfloat-abi=softfp' for ARM Cortex-A8), then it gets into the host tool compile, which then fails (because my build machine is not an ARM Cortext-A8).  This can be fixed by using TARGET_CFLAGS and TARGET_LDFLAGS, instead of CFLAGS and LDFLAGS, respectively. Signed-off-by: Danomi Manchego Acked-by: Francois Perrad --- package/luajit/luajit.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk index e4c46d8..913bc0c 100644 --- a/package/luajit/luajit.mk +++ b/package/luajit/luajit.mk @@ -42,8 +42,8 @@ define LUAJIT_BUILD_CMDS TARGET_LD="$(TARGET_CC)" \ TARGET_AR="$(TARGET_AR) rcus" \ TARGET_STRIP="$(TARGET_STRIP)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ HOST_CC="$(LUAJIT_HOST_CC)" \ HOST_CFLAGS="$(HOST_CFLAGS)" \ HOST_LDFLAGS="$(HOST_LDFLAGS)" \