diff options
Diffstat (limited to 'meta-steppeeagle/recipes-core/llvm')
5 files changed, 95 insertions, 0 deletions
diff --git a/meta-steppeeagle/recipes-core/llvm/llvm3.4.inc b/meta-steppeeagle/recipes-core/llvm/llvm3.4.inc new file mode 100644 index 00000000..a416dfd8 --- /dev/null +++ b/meta-steppeeagle/recipes-core/llvm/llvm3.4.inc @@ -0,0 +1,49 @@ +# +# Since we need LLVM 3.4 but meta-oe currently only supports +# 3.3, override the minimum bits needed to get it to work. +# Eventually this will need to be reconciled with upstream +# + +# Ideally this would be done as a patch but since llvm3.inc already +# manipulates this file with sed we have to do similar. We also need +# to do this as an append to ensure proper sequencing. +do_configure_append_x86-64() { + # Fix paths in llvm-config + sed -ri "s#lib/${LLVM_DIR}#lib64/${LLVM_DIR}#g" ${S}/tools/llvm-config/llvm-config.cpp +} + +# +# Override the do_install() provided by llvm3.inc to use the lib64 +# directory naming. +# +# This should probably be cleaned up at some point in the stock LLVM +# sources but at the moment they do not appear to handle lib64 very well. +# +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} + + # The LLVM sources have "/lib" embedded and so we cannot completely rely on the ${libdir} variable + if [ -d ${LLVM_INSTALL_DIR}${libdir}/ ]; then + mv ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/ + elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib ]; then + mv ${LLVM_INSTALL_DIR}${prefix}/lib/* ${D}${libdir}/${LLVM_DIR}/ + elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib64 ]; then + mv ${LLVM_INSTALL_DIR}${prefix}/lib64/* ${D}${libdir}/${LLVM_DIR}/ + fi + + 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} +} diff --git a/meta-steppeeagle/recipes-core/llvm/llvm3.4/0001-R600-SI-Add-processor-type-for-Mullins.patch b/meta-steppeeagle/recipes-core/llvm/llvm3.4/0001-R600-SI-Add-processor-type-for-Mullins.patch new file mode 100644 index 00000000..d267c29a --- /dev/null +++ b/meta-steppeeagle/recipes-core/llvm/llvm3.4/0001-R600-SI-Add-processor-type-for-Mullins.patch @@ -0,0 +1,12 @@ +R600/SI: Add processor type for Mullins. + +Signed-off-by: Samuel Li <samuel.li@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +diff -Naur a/lib/Target/R600/Processors.td b/lib/Target/R600/Processors.td +--- a/lib/Target/R600/Processors.td 2013-11-15 05:16:00.000000000 +0530 ++++ b/lib/Target/R600/Processors.td 2014-04-26 01:22:39.105011843 +0530 +@@ -52,3 +52,4 @@ + def : Proc<"kabini", SI_Itin, [FeatureSeaIslands]>; + def : Proc<"kaveri", SI_Itin, [FeatureSeaIslands]>; + def : Proc<"hawaii", SI_Itin, [FeatureSeaIslands]>; ++def : Proc<"mullins", SI_Itin, [FeatureSeaIslands]>; diff --git a/meta-steppeeagle/recipes-core/llvm/llvm3.4/arm_fenv_uclibc.patch b/meta-steppeeagle/recipes-core/llvm/llvm3.4/arm_fenv_uclibc.patch new file mode 100644 index 00000000..c3ae4946 --- /dev/null +++ b/meta-steppeeagle/recipes-core/llvm/llvm3.4/arm_fenv_uclibc.patch @@ -0,0 +1,14 @@ +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 diff --git a/meta-steppeeagle/recipes-core/llvm/llvm3.4_3.4.bb b/meta-steppeeagle/recipes-core/llvm/llvm3.4_3.4.bb new file mode 100644 index 00000000..e59f508a --- /dev/null +++ b/meta-steppeeagle/recipes-core/llvm/llvm3.4_3.4.bb @@ -0,0 +1,19 @@ +require recipes-core/llvm/llvm.inc +require recipes-core/llvm/llvm3.inc +require llvm3.4.inc + +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=71df953c321b5b31ae94316a7fb6a7f3" + +DEPENDS += "zlib" +EXTRA_OECONF += "--enable-zlib" + +S = "${WORKDIR}/llvm-${PV}" + +SRC_URI += "file://0001-R600-SI-Add-processor-type-for-Mullins.patch" + +SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch " +SRC_URI[md5sum] = "46ed668a1ce38985120dbf6344cf6116" +SRC_URI[sha256sum] = "25a5612d692c48481b9b397e2b55f4870e447966d66c96d655241702d44a2628" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[r600] = "--enable-experimental-targets=R600,,," diff --git a/meta-steppeeagle/recipes-core/llvm/llvm3.4_3.4.bbappend b/meta-steppeeagle/recipes-core/llvm/llvm3.4_3.4.bbappend new file mode 100644 index 00000000..e648dcab --- /dev/null +++ b/meta-steppeeagle/recipes-core/llvm/llvm3.4_3.4.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG_append_steppeeagle = "r600" |