New issue
Advanced search Search tips

Issue 884948 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 884613



Sign in to add a comment

luajit: build incorrectly uses board compiler flags when compiling sdk tools

Project Member Reported by vapier@chromium.org, Sep 18

Issue description

looks like host/minilua.c is wrongly use CFLAGS when it should be using BUILD_CFLAGS:
luajit-2.0.4: x86_64-pc-linux-gnu-clang  -O2 -fomit-frame-pointer -Wall  -O2 -pipe -O2 -pipe -march=bdver4 -g -fno-exceptions -fno-unwind-tables   -fno-asynchronous-unwind-tables  -I. -DLUAJIT_TARGET=LUAJIT_ARCH_x64 -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0  -c -o host/minilua.o host/minilua.c
luajit-2.0.4: x86_64-pc-linux-gnu-clang  -Wl,-O1 -Wl,-O2 -Wl,--as-needed   -o host/minilua host/minilua.o -lm   
luajit-2.0.4: host/minilua ../dynasm/dynasm.lua   -D P64 -D JIT -D FFI -D FPU -D HFABI -D VER= -o host/buildvm_arch.h vm_x86.dasc
luajit-2.0.4: make[1]: *** [Makefile:604: host/buildvm_arch.h] Illegal instruction (core dumped)
 
Blocking: 884613
Owner: manojgupta@chromium.org
Taking a look.
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/cf9cd5b93b7b88f30a7135e3fa80c7300ce3979c

commit cf9cd5b93b7b88f30a7135e3fa80c7300ce3979c
Author: Manoj Gupta <manojgupta@google.com>
Date: Wed Sep 26 17:33:24 2018

luajit: Fix cross-compilation.

Reset CFLAGS and LDFLAGS when calling emake.
Pass the target specific flags in TARGET_CFLAGS and TARGET_LDFLAGS
instead.

BUG= chromium:884948 
TEST=emerge-grunt luajit builds.

Patch also sent upstream (https://github.com/gentoo/gentoo/pull/9970)

Change-Id: I58329baeb43c70b151c205ef18514e698c372c9d
Reviewed-on: https://chromium-review.googlesource.com/1244107
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[rename] https://crrev.com/cf9cd5b93b7b88f30a7135e3fa80c7300ce3979c/dev-lang/luajit/luajit-2.0.4-r1.ebuild

Status: Fixed (was: Available)

Sign in to add a comment