Skip to contentSkip to conversation

llvm: drop 2.8 and 2.9 versions

PATCH New Martin Jansa 1 participant 1 message Aug 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 llvm: drop 2.8 and 2.9 versions

* mesa is now using 3.3 by default and I don't know about any llvm2* users

---
 meta-oe/recipes-core/llvm/llvm.inc                 |  83 +++++++++-
 .../recipes-core/llvm/llvm2.8/0019-issue6065.patch |  20 ---
 .../llvm/llvm2.8/30may-llvm2.8-pr399-ppc-arm.patch | 113 --------------
 meta-oe/recipes-core/llvm/llvm2.8/add-unistd.patch |  12 --
 .../llvm/llvm2.8/llvm-mc_disable.patch             |  12 --
 meta-oe/recipes-core/llvm/llvm2.8_2.8.bb           |  16 --
 .../recipes-core/llvm/llvm2.9/0019-issue6065.patch |  35 -----
 .../recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch   |  16 --
 .../llvm/llvm2.9/arm_fenv_uclibc.patch             |  14 --
 meta-oe/recipes-core/llvm/llvm2.9_2.9.bb           |  21 ---
 meta-oe/recipes-core/llvm/llvm2.inc                | 170 ---------------------
 meta-oe/recipes-core/llvm/llvm3.3_3.3.bb           |   1 -
 meta-oe/recipes-core/llvm/llvm3.inc                |  80 ----------
 13 files changed, 80 insertions(+), 513 deletions(-)
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.8/0019-issue6065.patch
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.8/30may-llvm2.8-pr399-ppc-arm.patch
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.8/add-unistd.patch
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.8/llvm-mc_disable.patch
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.8_2.8.bb
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.9/0019-issue6065.patch
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.9_2.9.bb
 delete mode 100644 meta-oe/recipes-core/llvm/llvm2.inc
 delete mode 100644 meta-oe/recipes-core/llvm/llvm3.inc
meta-oe/recipes-core/llvm/llvm.inc +80 -3
index acbf3c3..26bac33 100644
@@ -25,13 +25,90 @@ HOMEPAGE = "http://llvm.org"
 LICENSE = "NCSA"
 LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8"
 
-# 2.* inherits also cmake
-# 3.* inherits also automake
-inherit perlnative pythonnative
+DEPENDS = "libffi libxml2-native llvm-common"
+
+inherit perlnative pythonnative autotools
 
 LLVM_RELEASE = "${PV}"
 LLVM_DIR = "llvm${LLVM_RELEASE}"
 
+SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.gz"
+S = "${WORKDIR}/llvm-${PV}.src"
+
+LLVM_BUILD_DIR = "${WORKDIR}/llvm-${PV}.build"
+LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
+
+EXTRA_OECONF += "--disable-assertions \
+                 --enable-debug-runtime \
+                 --disable-expensive-checks \
+                 --enable-bindings=none \
+                 --enable-keep-symbols \
+                 --enable-libffi \
+                 --enable-optimized \
+                 --enable-shared \
+                 --enable-targets=host-only"
+EXTRA_OEMAKE += "REQUIRES_RTTI=1 VERBOSE=1"
+
+do_configure_prepend() {
+    # Remove RPATHs
+    sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' ${S}/Makefile.rules
+
+    # Drop "svn" suffix from version string
+    sed -i 's/${PV}svn/${PV}/g' ${S}/configure
+
+    # Fix paths in llvm-config
+    sed -i "s|sys::path::parent_path(CurrentPath))\.str()|sys::path::parent_path(sys::path::parent_path(CurrentPath))).str()|g" ${S}/tools/llvm-config/llvm-config.cpp
+    sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp
+
+    # Fails to build unless using separate directory from source
+    mkdir -p ${LLVM_BUILD_DIR}
+    cd ${LLVM_BUILD_DIR}
+}
+
+do_compile() {
+    cd ${LLVM_BUILD_DIR}
+    oe_runmake \
+        AR="${BUILD_AR}" \
+        CC="${BUILD_CC}" \
+        CFLAGS="${BUILD_CFLAGS}" \
+        CXX="${BUILD_CXX}" \
+        CXXFLAGS="${BUILD_CXXFLAGS}" \
+        CPP="${BUILD_CPP}" \
+        CPPFLAGS="${BUILD_CPPFLAGS}" \
+        NM="${BUILD_NM}" \
+        RANLIB="${BUILD_RANLIB}" \
+        PATH="${STAGING_BINDIR_NATIVE}:$PATH" \
+        cross-compile-build-tools
+    oe_runmake
+}
+
+do_install() {
+    cd ${LLVM_BUILD_DIR}
+    oe_runmake DESTDIR=${LLVM_INSTALL_DIR} install
+
+    mv ${LLVM_INSTALL_DIR}${bindir}/${HOST_SYS}-llvm-config-host ${LLVM_INSTALL_DIR}/llvm-config-host
+
+    install -d ${D}${bindir}/${LLVM_DIR}
+    mv ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/
+
+    install -d ${D}${includedir}/${LLVM_DIR}
+    mv ${LLVM_INSTALL_DIR}${includedir}/* ${D}${includedir}/${LLVM_DIR}/
+
+    install -d ${D}${libdir}/${LLVM_DIR}
+    mv ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/
+    ln -s ${LLVM_DIR}/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so
+
+    install -d ${D}${docdir}/${LLVM_DIR}
+    mv ${LLVM_INSTALL_DIR}${prefix}/docs/llvm/* ${D}${docdir}/${LLVM_DIR}
+}
+
+SYSROOT_PREPROCESS_FUNCS += "llvm_sysroot_preprocess"
+
+llvm_sysroot_preprocess() {
+    install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
+    mv ${LLVM_INSTALL_DIR}/llvm-config-host ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
+}
+
 ALLOW_EMPTY_${PN} = "1"
 ALLOW_EMPTY_${PN}-staticdev = "1"
 FILES_${PN} = ""
meta-oe/recipes-core/llvm/llvm2.8/0019-issue6065.patch deleted +0 -20
deleted file mode 100644
index a7f7bbe..0000000
@@ -1,20 +0,0 @@
----
- ARMJITInfo.cpp |    6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/lib/Target/ARM/ARMJITInfo.cpp
-+++ b/lib/Target/ARM/ARMJITInfo.cpp
-@@ -99,7 +99,13 @@
-     // The above twiddling of the saved return addresses allows us to
-     // deallocate everything, including the LR the stub saved, all in one
-     // pop instruction.
-+#ifndef __thumb__
-     "ldmia  sp!, {r0, r1, r2, r3, lr, pc}\n"
-+#else
-+    // thumb dont allow lr and pc to be poped in the same instruction.
-+    "pop {r0, r1, r2, r3, lr}\n"
-+    "pop {pc}\n"
-+#endif
-       );
- #else  // Not an ARM host
-   void ARMCompilationCallback() {
meta-oe/recipes-core/llvm/llvm2.8/30may-llvm2.8-pr399-ppc-arm.patch deleted +0 -113

113 lines not on this page · raw message

meta-oe/recipes-core/llvm/llvm2.8/add-unistd.patch deleted +0 -12
deleted file mode 100644
index 1c51b30..0000000
@@ -1,12 +0,0 @@
-Index: llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp
-===================================================================
---- llvm-2.8.orig/lib/ExecutionEngine/JIT/Intercept.cpp	2012-05-14 18:31:21.008318473 +0200
-+++ llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp	2012-05-14 18:32:53.523734850 +0200
-@@ -19,6 +19,7 @@
- #include "llvm/Support/ErrorHandling.h"
- #include "llvm/System/DynamicLibrary.h"
- #include "llvm/Config/config.h"
-+#include <unistd.h>
- using namespace llvm;
- 
- // AtExitHandlers - List of functions to call when the program exits,
meta-oe/recipes-core/llvm/llvm2.8/llvm-mc_disable.patch deleted +0 -12
deleted file mode 100644
index fddc674..0000000
@@ -1,12 +0,0 @@
-Index: llvm-2.8/tools/CMakeLists.txt
-===================================================================
---- llvm-2.8.orig/tools/CMakeLists.txt	2010-08-24 11:16:51.000000000 +0200
-+++ llvm-2.8/tools/CMakeLists.txt	2011-12-21 16:47:47.718508763 +0100
-@@ -14,7 +14,6 @@
- add_subdirectory(opt)
- add_subdirectory(llvm-as)
- add_subdirectory(llvm-dis)
--add_subdirectory(llvm-mc)
- 
- add_subdirectory(llc)
- add_subdirectory(llvm-ranlib)
meta-oe/recipes-core/llvm/llvm2.8_2.8.bb deleted +0 -16
deleted file mode 100644
index 4d0b3c8..0000000
@@ -1,16 +0,0 @@
-require llvm.inc
-require llvm2.inc
-
-PR = "r3"
-
-SRC_URI += " \
-            file://30may-llvm2.8-pr399-ppc-arm.patch \
-            file://0019-issue6065.patch \
-            file://add-unistd.patch \
-            file://llvm-mc_disable.patch \
-"
-
-EXTRA_OECMAKE += " -DBUILD_SHARED_LIBS:BOOL=OFF "
-
-SRC_URI[md5sum] = "220d361b4d17051ff4bb21c64abe05ba"
-SRC_URI[sha256sum] = "25addb742f1c6cc12877ed0ee924dda962d848368ee095be8e48342ae613d43b"
meta-oe/recipes-core/llvm/llvm2.9/0019-issue6065.patch deleted +0 -35
deleted file mode 100644
index aff3d1d..0000000
@@ -1,35 +0,0 @@
---- llvm-2.9.orig/lib/Target/ARM/ARMJITInfo.cpp	2013-04-19 14:49:28.063566919 +0200
-+++ llvm-2.9/lib/Target/ARM/ARMJITInfo.cpp	2013-04-19 15:24:31.065435029 +0200
-@@ -59,7 +59,17 @@
-     // for the real target function right now. We have to act as if this
-     // whole compilation callback doesn't exist as far as the caller is
-     // concerned, so we can't just preserve the callee saved regs.
-+    // stmdb introduced in http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?diff_format=h&r1=57911&r2=57910&pathrev=57911
-+    // but fails on armv4t
-+    // | {standard input}: Assembler messages:
-+    // | {standard input}:22: Error: selected processor does not support Thumb mode `stmdb sp!,{r0,r1,r2,r3,lr}'
-+    // | {standard input}:31: Error: lo register required -- `ldmia sp!,{r0,r1,r2,r3,lr}'
-+    // | {standard input}:32: Error: lo register required -- `ldr pc,[sp],#4'
-+#ifndef __thumb__
-     "stmdb sp!, {r0, r1, r2, r3, lr}\n"
-+#else
-+    "push {r0, r1, r2, r3, lr}\n"
-+#endif
- #if (defined(__VFP_FP__) && !defined(__SOFTFP__))
-     "fstmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n"
- #endif
-@@ -99,8 +109,14 @@
-     // The above twiddling of the saved return addresses allows us to
-     // deallocate everything, including the LR the stub saved, with two
-     // updating load instructions.
-+#ifndef __thumb__
-     "ldmia  sp!, {r0, r1, r2, r3, lr}\n"
-     "ldr    pc, [sp], #4\n"
-+#else
-+    // thumb dont allow lr and pc to be poped in the same instruction.
-+    "pop {r0, r1, r2, r3, lr}\n"
-+    "pop {pc}\n"
-+#endif
-       );
- #else  // Not an ARM host
-   void ARMCompilationCallback() {
meta-oe/recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch deleted +0 -16
deleted file mode 100644
index 4cf8d44..0000000
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Imported from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673266
-
-Signed-off-by: Martin Jansa <[email protected]>
-
---- a/lib/ExecutionEngine/JIT/Intercept.cpp	2012-05-17 16:11:46.956180361 +0200
-+++ b/lib/ExecutionEngine/JIT/Intercept.cpp	2012-05-17 16:14:35.256184996 +0200
-@@ -52,6 +52,7 @@
- #include <sys/stat.h>
- #endif
- #include <fcntl.h>
-+#include <unistd.h>
- /* stat functions are redirecting to __xstat with a version number.  On x86-64 
-  * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat' 
-  * available as an exported symbol, so we have to add it explicitly.
meta-oe/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch deleted +0 -14
deleted file mode 100644
index c3ae494..0000000
@@ -1,14 +0,0 @@
-Index: llvm-2.9/include/llvm/Support/FEnv.h
-===================================================================
---- llvm-2.9.orig/include/llvm/Support/FEnv.h	2010-11-29 20:44:50.000000000 +0100
-+++ llvm-2.9/include/llvm/Support/FEnv.h	2011-11-18 18:42:22.580161297 +0100
-@@ -17,6 +17,9 @@
- 
- #include "llvm/Config/config.h"
- #include <cerrno>
-+
-+#undef HAVE_FENV_H
-+
- #ifdef HAVE_FENV_H
- #include <fenv.h>
- #endif
meta-oe/recipes-core/llvm/llvm2.9_2.9.bb deleted +0 -21
deleted file mode 100644
index 44504b8..0000000
@@ -1,21 +0,0 @@
-require llvm.inc
-require llvm2.inc
-
-PR = "r3"
-
-SRC_URI += "file://0035-gcc-4.7.patch"
-
-ARM_INSTRUCTION_SET = "arm"
-
-# 0019-issue6065.patch is still needed but a bit modified, because it was resolved by
-# http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?r1=120304&r2=124694&pathrev=124694
-# http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?diff_format=h&r1=57911&r2=57910&pathrev=57911
-# and still it fails with 
-# {standard input}:31: Error: invalid register list to push/pop instruction -- `pop {r0,r1,r2,r3,lr}'
-# make[2]: *** [lib/Target/ARM/CMakeFiles/LLVMARMCodeGen.dir/ARMJITInfo.cpp.o] Error 1
-# SRC_URI += "file://0019-issue6065.patch"
-
-SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch "
-
-SRC_URI[md5sum] = "793138412d2af2c7c7f54615f8943771"
-SRC_URI[sha256sum] = "661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779"
meta-oe/recipes-core/llvm/llvm2.inc deleted +0 -170

170 lines not on this page · raw message

meta-oe/recipes-core/llvm/llvm3.3_3.3.bb +0 -1
index 65db1a8..4617efa 100644
@@ -1,5 +1,4 @@
 require llvm.inc
-require llvm3.inc
 
 DEPENDS += "zlib"
 EXTRA_OECONF += "--enable-zlib"
meta-oe/recipes-core/llvm/llvm3.inc deleted +0 -80

80 lines not on this page · raw message

Signature · 1 line
2.0.4