From 11fd48dea8d00acfb84adf156d7cf47ea9c7a354 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 12 Mar 2015 15:49:26 +0000 Subject: clang-cross: A wrapper to install cross compiler symlinks Clang is smart to find for cross binutils if the triplet is called so lets add ${TARGET_PREFIX} to clang and enjoy the benefits Signed-off-by: Khem Raj --- recipes-devtools/clang/clang-cross_git.bb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 recipes-devtools/clang/clang-cross_git.bb (limited to 'recipes-devtools') diff --git a/recipes-devtools/clang/clang-cross_git.bb b/recipes-devtools/clang/clang-cross_git.bb new file mode 100644 index 0000000..48efe41 --- /dev/null +++ b/recipes-devtools/clang/clang-cross_git.bb @@ -0,0 +1,28 @@ +# Copyright (C) 2014 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Cross compiler wrappers for LLVM based C/C++ compiler" +HOMEPAGE = "http://clang.llvm.org/" +LICENSE = "NCSA" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7" +SECTION = "devel" + +require clang.inc +inherit cross +DEPENDS += "clang-native binutils-cross-${TARGET_ARCH}" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}${bindir_crossscripts}/ + ln -sf ../clang ${D}${bindir_crossscripts}/${TARGET_PREFIX}clang + ln -sf ../clang++ ${D}${bindir_crossscripts}/${TARGET_PREFIX}clang++ +} + +SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess" + +clangcross_sysroot_preprocess () { + sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir} +} +SSTATE_SCAN_FILES += "*-clang *-clang++" +PACKAGES = "" -- cgit v1.2.3-54-g00ecf