[Buildroot] [PATCH] luajit: new package

François Perrad francois.perrad at gadz.org
Sun Jul 15 17:19:03 UTC 2012


With a x86 host and an ARM target, I obtain the following error :
>>> luajit 2.0.0-beta10 Building
/usr/bin/make -j2 PREFIX="/usr"
STATIC_CC="/home/user/build/qarm/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc"
DYNAMIC_CC="/home/user/build/qarm/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
-fPIC" TARGET_LD="/home/user/build/qarm/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc"
TARGET_AR="/home/user/build/qarm/host/usr/bin/arm-unknown-linux-uclibcgnueabi-ar
rcus" TARGET_STRIP="/home/user/build/qarm/host/usr/bin/arm-unknown-linux-uclibcgnueabi-strip"
CFLAGS=" -pipe -Os " LDFLAGS="" HOST_CC=""/usr/bin/gcc -m32""
HOST_CFLAGS="-O2 -I/home/user/build/qarm/host/include
-I/home/user/build/qarm/host/usr/include"
HOST_LDFLAGS="-L/home/user/build/qarm/host/lib
-L/home/user/build/qarm/host/usr/lib
-Wl,-rpath,/home/user/build/qarm/host/usr/lib" -C
/home/user/build/qarm/build/luajit-2.0.0-beta10 amalg
/usr/bin/make: invalid option -- '3'
/usr/bin/make: invalid option -- '2'

so, I remove extra quote :
ifeq ($(BR2_ARCH_IS_64),y)
LUAJIT_HOST_CC=$(HOSTCC)
else
LUAJIT_HOST_CC=$(HOSTCC) -m32
endif

and the build command could be rewrite with CROSS :
define LUAJIT_BUILD_CMDS
	$(MAKE) PREFIX="/usr" \
		HOST_CC="$(LUAJIT_HOST_CC)" \
		CROSS="$(TARGET_CROSS)" \
		-C $(@D) amalg
endef

François

Note : please, don't forget http://patchwork.ozlabs.org/patch/162294/

2012/7/15 Thomas Petazzoni <thomas.petazzoni at free-electrons.com>:
> From: François Perrad <francois.perrad at gadz.org>
>
> [thomas.petazzoni at free-electrons.com:
>  - Added shared library patch to link luajit dynamically against the
>    luajit library
>  - Added no strip patch.
>  - Added no symlink patch.
>  - Removed symlink creation logic from luajit.mk.
>  - Fixed compilation on x86_64 hosts by adding -m32 to the compile
>    flags.
>  - Added 'depends on' for the architectures supported by luajit.
> ]
>
> Signed-off-by: Francois Perrad <francois.perrad at gadz.org>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> ---
>  package/Config.in                             |    3 +-
>  package/luajit/Config.in                      |   10 ++++
>  package/luajit/luajit-01-root-path.patch      |   22 +++++++++
>  package/luajit/luajit-02-shared-lib.patch     |   17 +++++++
>  package/luajit/luajit-03-dont-strip.patch     |   23 ++++++++++
>  package/luajit/luajit-04-no-bin-symlink.patch |   40 ++++++++++++++++
>  package/luajit/luajit.mk                      |   61 +++++++++++++++++++++++++
>  7 files changed, 175 insertions(+), 1 deletion(-)
>  create mode 100644 package/luajit/Config.in
>  create mode 100644 package/luajit/luajit-01-root-path.patch
>  create mode 100644 package/luajit/luajit-02-shared-lib.patch
>  create mode 100644 package/luajit/luajit-03-dont-strip.patch
>  create mode 100644 package/luajit/luajit-04-no-bin-symlink.patch
>  create mode 100644 package/luajit/luajit.mk
>



More information about the buildroot mailing list