Patchwork [meta-oe] luajit: Fix build with SSTATE enabled

login
register
mail settings
Submitter Khem Raj
Date March 14, 2013, 9:05 p.m.
Message ID <1363295158-21771-1-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/46227/
State Accepted, archived
Commit f841ddbd24d6c8b0befaf1b61bf6a5b3c777612c
Headers show

Comments

Khem Raj - March 14, 2013, 9:05 p.m.
luajit does not honor standard CC variables
so when its built from shared state it does
not compile because --sysroot is wrong.

This patch fixes the problem by passing
the TOOLCHAIN_OPTONS to appropriate flags
so that it gets the correct sysroot value

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Martin Jansa - March 22, 2013, 9:22 a.m.
On Thu, Mar 14, 2013 at 02:05:58PM -0700, Khem Raj wrote:
> luajit does not honor standard CC variables
> so when its built from shared state it does
> not compile because --sysroot is wrong.

Applied, thanks!

> 
> This patch fixes the problem by passing
> the TOOLCHAIN_OPTONS to appropriate flags
> so that it gets the correct sysroot value
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
> index 70cefa8..a7f96f8 100644
> --- a/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
> +++ b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
> @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9511885992e4900014e3b13ca6372b7d"
>  HOMEPAGE = "http://luajit.org"
>  
>  DEPENDS += "lua5.1"
> -PR = "r1"
> +PR = "r2"
>  SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz \
>             file://disable_lj_vm_foldarith_for_spe.patch \
>            "
> @@ -20,7 +20,7 @@ do_configure_prepend() {
>  	sed -i -e s:/lib$:${base_libdir}:g ${S}/Makefile
>  }
>  
> -EXTRA_OEMAKE = 'CROSS=${HOST_PREFIX}'
> +EXTRA_OEMAKE = 'CROSS=${HOST_PREFIX} TARGET_CFLAGS="${TOOLCHAIN_OPTIONS}" TARGET_LDFLAGS="${TOOLCHAIN_OPTIONS}" TARGET_SHLDFLAGS="${TOOLCHAIN_OPTIONS}"'
>  EXTRA_OEMAKE_append_powerpc = ' HOST_CC="${BUILD_CC} -m32"'
>  EXTRA_OEMAKE_append_x86-64 = ' HOST_CC="${BUILD_CC}"'
>  EXTRA_OEMAKE_append_i586 = ' HOST_CC="${BUILD_CC} -m32"'
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
index 70cefa8..a7f96f8 100644
--- a/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
+++ b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
@@ -4,7 +4,7 @@  LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9511885992e4900014e3b13ca6372b7d"
 HOMEPAGE = "http://luajit.org"
 
 DEPENDS += "lua5.1"
-PR = "r1"
+PR = "r2"
 SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz \
            file://disable_lj_vm_foldarith_for_spe.patch \
           "
@@ -20,7 +20,7 @@  do_configure_prepend() {
 	sed -i -e s:/lib$:${base_libdir}:g ${S}/Makefile
 }
 
-EXTRA_OEMAKE = 'CROSS=${HOST_PREFIX}'
+EXTRA_OEMAKE = 'CROSS=${HOST_PREFIX} TARGET_CFLAGS="${TOOLCHAIN_OPTIONS}" TARGET_LDFLAGS="${TOOLCHAIN_OPTIONS}" TARGET_SHLDFLAGS="${TOOLCHAIN_OPTIONS}"'
 EXTRA_OEMAKE_append_powerpc = ' HOST_CC="${BUILD_CC} -m32"'
 EXTRA_OEMAKE_append_x86-64 = ' HOST_CC="${BUILD_CC}"'
 EXTRA_OEMAKE_append_i586 = ' HOST_CC="${BUILD_CC} -m32"'