Package: luajit Version: 2.0.0+dfsg-1 Severity: wishlist Tags: patch sid User: [email protected] Usertags: powerpcspe
Hi, luajit currently FTBFS on powerpcspe[1] like this: [...] CC luajit.o BUILDVM jit/vmdef.lua DYNLINK libluajit.so ljamalg_dyn.o: In function `lj_vm_foldarith': ljamalg.c:(.text+0x13124): multiple definition of `lj_vm_foldarith' lj_vm_dyn.o:buildvm_ppc.dasc:(.text+0x3964): first defined here collect2: ld returned 1 exit status make[4]: *** [libluajit.so] Error 1 make[4]: Leaving directory `/«BUILDDIR»/luajit-2.0.0+dfsg/src' make[3]: *** [amalg] Error 2 make[3]: Leaving directory `/«BUILDDIR»/luajit-2.0.0+dfsg/src' make[2]: *** [amalg] Error 2 make[2]: Leaving directory `/«BUILDDIR»/luajit-2.0.0+dfsg' make[1]: *** [override_dh_auto_build] Error 2 make[1]: Leaving directory `/«BUILDDIR»/luajit-2.0.0+dfsg' make: *** [build-arch] Error 2 dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2 [...] There is powerpcspe specific code, but it's broken (colliding with some C symbol). Upstream's 2.0.1 is fixed already, so the attached patch is a backport of this fix. Thanks, Roland [1] http://wiki.debian.org/PowerPCSPEPort -- System Information: Debian Release: 7.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.7.0 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/dash
--- luajit-2.0.0+dfsg.orig/src/vm_ppcspe.dasc +++ luajit-2.0.0+dfsg/src/vm_ppcspe.dasc @@ -1,6 +1,6 @@ |// Low-level VM code for PowerPC/e500 CPUs. |// Bytecode interpreter, fast functions and helper functions. -|// Copyright (C) 2005-2012 Mike Pall. See Copyright Notice in luajit.h +|// Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h | |.arch ppc |.section code_op, code_sub @@ -2038,6 +2038,7 @@ static void build_subroutines(BuildCtx * | |->vm_floor: | mflr CARG3 + | evmergelo CARG2, CARG1, CARG2 | bl ->vm_floor_hilo | mtlr CARG3 | evmergehi CRET1, CRET2, CRET2 @@ -2052,38 +2053,6 @@ static void build_subroutines(BuildCtx * |->vm_trunc_hilo: |.endif | - |// Callable from C: double lj_vm_foldarith(double x, double y, int op) - |// Compute x op y for basic arithmetic operators (+ - * / % ^ and unary -) - |// and basic math functions. ORDER ARITH - |->vm_foldarith: - | evmergelo CARG2, CARG1, CARG2 - | cmplwi CARG5, 1 - | evmergelo CARG4, CARG3, CARG4 - | beq >1; bgt >2 - | efdadd CRET2, CARG2, CARG4; evmergehi CRET1, CRET2, CRET2; blr - |1: - | efdsub CRET2, CARG2, CARG4; evmergehi CRET1, CRET2, CRET2; blr - |2: - | cmplwi CARG5, 3; beq >1; bgt >2 - | efdmul CRET2, CARG2, CARG4; evmergehi CRET1, CRET2, CRET2; blr - |1: - | efddiv CRET2, CARG2, CARG4; evmergehi CRET1, CRET2, CRET2; blr - |2: - | cmplwi CARG5, 5; beq >1; bgt >2 - | evmr CARG3, CARG2; efddiv CRET2, CARG2, CARG4; evmr RB, CARG4 - | mflr RC; bl ->vm_floor_efd; mtlr RC - | efdmul CRET2, CRET2, RB; efdsub CRET2, CARG3, CRET2 - | evmergehi CRET1, CRET2, CRET2; blr - |1: - | b extern pow - |2: - | cmplwi CARG5, 7; beq >1; bgt >2 - | xoris CARG1, CARG1, 0x8000; blr - |1: - | rlwinm CARG1, CARG1, 0, 1, 31; blr - |2: - | NYI // Other operations only needed by JIT compiler. - | |//----------------------------------------------------------------------- |//-- Miscellaneous functions -------------------------------------------- |//-----------------------------------------------------------------------

