diff options
-rw-r--r-- | packages/llvm/llvm-2.4/fix-build.patch | 35 | ||||
-rw-r--r-- | packages/llvm/llvm_2.4.bb | 42 |
2 files changed, 77 insertions, 0 deletions
diff --git a/packages/llvm/llvm-2.4/fix-build.patch b/packages/llvm/llvm-2.4/fix-build.patch new file mode 100644 index 0000000000..dee06f3c36 --- /dev/null +++ b/packages/llvm/llvm-2.4/fix-build.patch @@ -0,0 +1,35 @@ +Index: llvm-2.4/Makefile.rules +=================================================================== +--- llvm-2.4.orig/Makefile.rules 2009-01-05 16:16:53.693946445 +0100 ++++ llvm-2.4/Makefile.rules 2009-01-05 16:17:18.149945262 +0100 +@@ -436,7 +436,7 @@ + ifdef EXAMPLE_TOOL + LD.Flags += -rpath $(ExmplDir) -export-dynamic + else +- LD.Flags += -rpath $(ToolDir) -export-dynamic ++ LD.Flags += -export-dynamic + endif + endif + +Index: llvm-2.4/lib/ExecutionEngine/JIT/JIT.cpp +=================================================================== +--- llvm-2.4.orig/lib/ExecutionEngine/JIT/JIT.cpp 2009-01-05 15:36:34.901945895 +0100 ++++ llvm-2.4/lib/ExecutionEngine/JIT/JIT.cpp 2009-01-05 15:39:21.580362436 +0100 +@@ -65,7 +65,7 @@ + } + + +-#if defined (__GNUC__) ++#if defined (__GNUC__) && ! defined (__ARM_EABI__) + + // libgcc defines the __register_frame function to dynamically register new + // dwarf frames for exception handling. This functionality is not portable +@@ -225,7 +225,7 @@ + } + + // Register routine for informing unwinding runtime about new EH frames +-#if defined(__GNUC__) ++#if defined(__GNUC__) && ! defined(__ARM_EABI__) + #if defined(__APPLE__) + struct LibgccObjectInfo* LOI = (struct LibgccObjectInfo*) + _keymgr_get_and_lock_processwide_ptr(KEYMGR_GCC3_DW2_OBJ_LIST); diff --git a/packages/llvm/llvm_2.4.bb b/packages/llvm/llvm_2.4.bb new file mode 100644 index 0000000000..d06e4a3f74 --- /dev/null +++ b/packages/llvm/llvm_2.4.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "The Low Level Virtual Machine" +HOMEPAGE = "http://llvm.org" +LICENSE = "various" + +SRC_URI = "\ + http://llvm.org/releases/${PV}/llvm-${PV}.tar.gz \ + file://fix-build.patch;patch=1 \ + " + +DEPENDS = "llvm-native" + +inherit autotools + +do_compile() { + # tblgen doesnt want to link correctly. Pull the one in we have in staging. + install -d Release/Build/bin + cp ${STAGING_BINDIR_NATIVE}/tblgen Release/Build/bin + cp ${STAGING_BINDIR_NATIVE}/fpcmp Release/Build/bin + cp ${STAGING_BINDIR_NATIVE}/llvm-PerfectShuffle Release/Build/bin + install -d Release/Build/lib + touch Release/Build/lib/libLLVMSupport.a + touch Release/Build/lib/libLLVMSystem.a + + oe_runmake +} + +do_stage() { + autotools_stage_all + + rm ${STAGING_LIBDIR}/LLVMHello.* + + install -d ${STAGING_BINDIR_CROSS} + + sed -e's^my.*ABS_RUN_DIR =.*^my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";^' \ + -e's^my.*INCLUDEDIR =.*^my $INCLUDEDIR = "${STAGING_INCDIR}";^' \ + -e's^my.*LIBDIR.*^my $LIBDIR = "${STAGING_LIBDIR}";^' \ + -e's^my.*BINDIR.*^my $BINDIR = "${STAGING_BINDIR}";^' \ + Release/Host/bin/llvm-config > ${STAGING_BINDIR_CROSS}/llvm-config + + chmod +x ${STAGING_BINDIR_CROSS}/llvm-config +} + |