aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-06-29 22:54:52 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-07-12 12:06:00 +0200
commit71e91988bba3e81c53ece72c00f23106b68dc408 (patch)
tree1d12ecb89c5668f78c8af9a3d281d2bcd60ab1b5 /meta-oe/recipes-core/llvm/llvm3.3_3.3.bb
parenta8e0bfb91214f1f387b781b89340eee582496c01 (diff)
downloadmeta-openembedded-contrib-71e91988bba3e81c53ece72c00f23106b68dc408.tar.gz
llvm: Consolidate .inc files
* unlike other recipes where we have a rule to keep only one version, llvm is different so we'll keep .inc files * llvm.inc is shared by all, llvm[23].inc are separated because 2.* is built with cmake and 3.* with automake * fix staticdev packaging and move it to shared llvm.inc FILES_${PN}-static-dev = "${libdir}/${LLVM_DIR}/*.a" (it's staticdev not static-dev) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core/llvm/llvm3.3_3.3.bb')
-rw-r--r--meta-oe/recipes-core/llvm/llvm3.3_3.3.bb100
1 files changed, 2 insertions, 98 deletions
diff --git a/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb b/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb
index d3aa963aff..3fca57560e 100644
--- a/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb
+++ b/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb
@@ -1,105 +1,9 @@
-DESCRIPTION = "The Low Level Virtual Machine"
-HOMEPAGE = "http://llvm.org"
-# 3-clause BSD-like
-LICENSE = "NCSA"
-LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8"
+require llvm.inc
+require llvm3.inc
-DEPENDS = "libffi libxml2-native llvm-common"
-
-SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.gz"
SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch "
-
SRC_URI[md5sum] = "40564e1dc390f9844f1711c08b08e391"
SRC_URI[sha256sum] = "68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578"
-S = "${WORKDIR}/llvm-${PV}.src"
-
-inherit autotools perlnative pythonnative
-
-LLVM_BUILD_DIR = "${WORKDIR}/llvm-${PV}.build"
-LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
-LLVM_DIR = "llvm${PV}"
-
PACKAGECONFIG ??= ""
PACKAGECONFIG[r600] = "--enable-experimental-targets=R600,,,"
-
-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"
-FILES_${PN} = "${libdir}/lib*.so \
- ${libdir}/${LLVM_DIR}/*"
-FILES_${PN}-dbg = "${bindir}/${LLVM_DIR}/.debug \
- ${libdir}/${LLVM_DIR}/.debug \
- ${libdir}/.debug \
- /usr/src/debug"
-FILES_${PN}-dev = "${bindir}/${LLVM_DIR} \
- ${includedir}/${LLVM_DIR} \
- ${libdir}/${LLVM_DIR}/BugpointPasses.so \
- ${libdir}/${LLVM_DIR}/LLVMHello.so"
-FILES_${PN}-static-dev = "${libdir}/${LLVM_DIR}/*.a"
-FILES_SOLIBSDEV = ""
-INSANE_SKIP_${PN} = "dev-so"
-
-do_configure_prepend() {
- # Remove RPATHs
- sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules
-
- # 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" tools/llvm-config/llvm-config.cpp
- sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" 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}
-}