From 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:20:04 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- ...p-automatically-this-leaves-the-stripping.patch | 33 +++++++ .../luajit/luajit/ppc-fixplt.patch | 105 +++++++++++++++++++++ meta-oe/recipes-devtools/luajit/luajit_2.0.2.bb | 54 +++++++++++ 3 files changed, 192 insertions(+) create mode 100644 meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch create mode 100644 meta-oe/recipes-devtools/luajit/luajit/ppc-fixplt.patch create mode 100644 meta-oe/recipes-devtools/luajit/luajit_2.0.2.bb (limited to 'meta-oe/recipes-devtools/luajit') diff --git a/meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch b/meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch new file mode 100644 index 0000000000..f123b3f55a --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit/0001-Do-not-strip-automatically-this-leaves-the-stripping.patch @@ -0,0 +1,33 @@ +From 528009f5ca0685c95ef27f6c8957160499c0576a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 10 May 2013 10:42:45 -0700 +Subject: [PATCH] Do not strip automatically, this leaves the stripping + busines to OE + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +--- + src/Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 278324a..5ecd6d5 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -665,12 +665,10 @@ $(LUAJIT_A): $(LJVMCORE_O) + $(LUAJIT_SO): $(LJVMCORE_O) + $(E) "DYNLINK $@" + $(Q)$(TARGET_LD) $(TARGET_ASHLDFLAGS) -o $@ $(LJVMCORE_DYNO) $(TARGET_ALIBS) +- $(Q)$(TARGET_STRIP) $@ + + $(LUAJIT_T): $(TARGET_O) $(LUAJIT_O) $(TARGET_DEP) + $(E) "LINK $@" + $(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) $(TARGET_O) $(TARGET_ALIBS) +- $(Q)$(TARGET_STRIP) $@ + $(E) "OK Successfully built LuaJIT" + + ############################################################################## +-- +1.7.9.5 + diff --git a/meta-oe/recipes-devtools/luajit/luajit/ppc-fixplt.patch b/meta-oe/recipes-devtools/luajit/luajit/ppc-fixplt.patch new file mode 100644 index 0000000000..b9f17f4e31 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit/ppc-fixplt.patch @@ -0,0 +1,105 @@ +Upstream-Status: Unknown + +Signed-off-by: Khem Raj + +libluajit is having symbols that can't be +resolved the reloc cannot accommodate an offset greater than 24 bits. + +Looking at libluajit with readelf -r, you see a bunch of entries that look like: + 000082f0 00003c0a R_PPC_REL24 00000000 sqrt + 0 + +These should not occur when the code is compiled and linked with -fPIC. + +It turns out that libluajit *is* compiled and linked with -fPIC, however... +There is one assembler file called lj_vm.s which is generated during the build. +This file is missing the `@plt' qualifier from external references. + +This file is generated by a program called buildvm. This in turn uses tables +in a file called buildvm_arch.h which is generated by dynasm.lua. + +Index: LuaJIT-2.0.1/src/host/buildvm.c +=================================================================== +--- LuaJIT-2.0.1.orig/src/host/buildvm.c 2013-02-19 12:15:00.000000000 -0800 ++++ LuaJIT-2.0.1/src/host/buildvm.c 2013-05-14 20:26:05.933444512 -0700 +@@ -107,12 +107,14 @@ + #endif + sprintf(name, "%s%s%s", symprefix, prefix, suffix); + p = strchr(name, '@'); ++#if 0 + if (p) { + if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) + name[0] = '@'; + else + *p = '\0'; + } ++#endif + p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ + strcpy(p, name); + return p; +Index: LuaJIT-2.0.1/src/vm_ppcspe.dasc +=================================================================== +--- LuaJIT-2.0.1.orig/src/vm_ppcspe.dasc 2013-02-19 12:15:00.000000000 -0800 ++++ LuaJIT-2.0.1/src/vm_ppcspe.dasc 2013-05-14 20:26:05.937444512 -0700 +@@ -1390,7 +1390,7 @@ + | checknum CARG2 + | evmergehi CARG1, CARG2, CARG2 + | checkfail ->fff_fallback +- | bl extern func ++ | bl extern func@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + |.endmacro +@@ -1405,7 +1405,7 @@ + | checknum CARG1 + | evmergehi CARG3, CARG4, CARG4 + | checkanyfail ->fff_fallback +- | bl extern func ++ | bl extern func@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + |.endmacro +@@ -1437,7 +1437,7 @@ + | checknum CARG2 + | evmergehi CARG1, CARG2, CARG2 + | checkfail ->fff_fallback +- | bl extern log ++ | bl extern log@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + | +@@ -1471,7 +1471,7 @@ + | checknum CARG1 + | checkanyfail ->fff_fallback + | efdctsi CARG3, CARG4 +- | bl extern ldexp ++ | bl extern ldexp@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + | +@@ -1484,7 +1484,7 @@ + | checkfail ->fff_fallback + | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) + | lwz PC, FRAME_PC(BASE) +- | bl extern frexp ++ | bl extern frexp@plt + | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) + | evmergelo CRET1, CRET1, CRET2 + | efdcfsi CRET2, TMP1 +@@ -1503,7 +1503,7 @@ + | checkfail ->fff_fallback + | la CARG3, -8(BASE) + | lwz PC, FRAME_PC(BASE) +- | bl extern modf ++ | bl extern modf@plt + | evmergelo CRET1, CRET1, CRET2 + | la RA, -8(BASE) + | evstdd CRET1, 0(BASE) +@@ -2399,7 +2399,7 @@ + | checknum CARG1 + | evmergehi CARG3, CARG4, CARG4 + | checkanyfail ->vmeta_arith_vv +- | bl extern pow ++ | bl extern pow@plt + | evmergelo CRET2, CRET1, CRET2 + | evstddx CRET2, BASE, RA + | ins_next diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.2.bb b/meta-oe/recipes-devtools/luajit/luajit_2.0.2.bb new file mode 100644 index 0000000000..b719b48e09 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit_2.0.2.bb @@ -0,0 +1,54 @@ +SUMMARY = "Just-In-Time Compiler for Lua" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=1793ef52a5d577794cd886a501a7f861" +HOMEPAGE = "http://luajit.org" + +DEPENDS += "lua5.1" +SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz;name=tarball \ + file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ + " +SRC_URI[tarball.md5sum] = "112dfb82548b03377fbefbba2e0e3a5b" +SRC_URI[tarball.sha256sum] = "c05202974a5890e777b181908ac237625b499aece026654d7cc33607e3f46c38" + +SRC_URI_append_fslmachine = " file://ppc-fixplt.patch " + +S = "${WORKDIR}/LuaJIT-${PV}" + +inherit pkgconfig binconfig + +do_configure_prepend() { + sed -i -e s:/usr/local:${prefix}:g ${S}/Makefile + sed -i -e s:/lib$:${base_libdir}:g ${S}/Makefile +} + +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"' +EXTRA_OEMAKE_append_powerpc64 = ' HOST_CC="${BUILD_CC}"' +EXTRA_OEMAKE_append_arm = ' HOST_CC="${BUILD_CC} -m32"' +EXTRA_OEMAKE_append_mips64 = ' HOST_CC="${BUILD_CC} -m32"' + +do_compile () { + oe_runmake +} + +do_install () { + oe_runmake 'DESTDIR=${D}' install + rmdir ${D}${datadir}/lua/5.1 \ + ${D}${datadir}/lua \ + ${D}${libdir}/lua/5.1 \ + ${D}${libdir}/lua +} + +PACKAGES += 'luajit-common' + +FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \ + ${libdir}/libluajit-5.1.so.${PV} \ +" +FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \ + ${libdir}/libluajit-5.1.so \ + ${libdir}/pkgconfig/luajit.pc \ +" +FILES_luajit-common = "${datadir}/${BPN}-${PV}" + -- cgit v1.2.3-54-g00ecf