diff options
| author | Khem Raj <raj.khem@gmail.com> | 2015-07-08 22:39:54 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2015-07-08 22:39:54 -0700 |
| commit | c5bd983c780af5e778aed548a6c3744eb4b3321f (patch) | |
| tree | abfdc3db33ca4d08b6ca4ec1a84b84b556979172 | |
| parent | 07857ed923fc30c927e74306267bb4062fbed602 (diff) | |
| download | meta-clang-c5bd983c780af5e778aed548a6c3744eb4b3321f.tar.gz | |
clang: Add recipes for cross-canadian and crosssdk variants
These are manipulating nativesdk clang to be used as SDK cross
compiler option
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | recipes-devtools/clang/clang-cross-canadian_git.bb | 29 | ||||
| -rw-r--r-- | recipes-devtools/clang/clang-crosssdk_git.bb | 30 |
2 files changed, 59 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang-cross-canadian_git.bb b/recipes-devtools/clang/clang-cross-canadian_git.bb new file mode 100644 index 0000000..b6e74fd --- /dev/null +++ b/recipes-devtools/clang/clang-cross-canadian_git.bb | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # Copyright (C) 2014 Khem Raj <raj.khem@gmail.com> | ||
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
| 3 | |||
| 4 | DESCRIPTION = "Clang/LLVM based C/C++ compiler (cross-canadian for ${TARGET_ARCH} target)" | ||
| 5 | HOMEPAGE = "http://clang.llvm.org/" | ||
| 6 | LICENSE = "NCSA" | ||
| 7 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7" | ||
| 8 | SECTION = "devel" | ||
| 9 | |||
| 10 | PN = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}" | ||
| 11 | |||
| 12 | require clang.inc | ||
| 13 | inherit cross-canadian | ||
| 14 | |||
| 15 | DEPENDS += "nativesdk-clang binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} virtual/${HOST_PREFIX}binutils-crosssdk" | ||
| 16 | # We have to point gcc at a sysroot but we don't need to rebuild if this changes | ||
| 17 | # e.g. we switch between different machines with different tunes. | ||
| 18 | EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH" | ||
| 19 | TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" | ||
| 20 | |||
| 21 | S = "${WORKDIR}" | ||
| 22 | |||
| 23 | do_install() { | ||
| 24 | install -d ${D}${bindir} | ||
| 25 | ln -sf ../clang ${D}${bindir}/${TARGET_PREFIX}clang | ||
| 26 | ln -sf ../clang++ ${D}${bindir}/${TARGET_PREFIX}clang++ | ||
| 27 | } | ||
| 28 | |||
| 29 | SSTATE_SCAN_FILES += "*-clang *-clang++" | ||
diff --git a/recipes-devtools/clang/clang-crosssdk_git.bb b/recipes-devtools/clang/clang-crosssdk_git.bb new file mode 100644 index 0000000..375f767 --- /dev/null +++ b/recipes-devtools/clang/clang-crosssdk_git.bb | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | # Copyright (C) 2014 Khem Raj <raj.khem@gmail.com> | ||
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
| 3 | |||
| 4 | DESCRIPTION = "SDK Cross compiler wrappers for LLVM based C/C++ compiler" | ||
| 5 | HOMEPAGE = "http://clang.llvm.org/" | ||
| 6 | LICENSE = "NCSA" | ||
| 7 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7" | ||
| 8 | SECTION = "devel" | ||
| 9 | |||
| 10 | PN = "clang-crosssdk-${TARGET_ARCH}" | ||
| 11 | |||
| 12 | require clang.inc | ||
| 13 | inherit crosssdk | ||
| 14 | DEPENDS += "nativesdk-clang binutils-crosssdk-${TARGET_ARCH}" | ||
| 15 | |||
| 16 | S = "${WORKDIR}" | ||
| 17 | |||
| 18 | do_install() { | ||
| 19 | install -d ${D}${bindir} | ||
| 20 | ln -sf ../clang ${D}${bindir}/${TARGET_PREFIX}clang | ||
| 21 | ln -sf ../clang++ ${D}${bindir}/${TARGET_PREFIX}clang++ | ||
| 22 | } | ||
| 23 | |||
| 24 | SYSROOT_PREPROCESS_FUNCS += "clangcrosssdk_sysroot_preprocess" | ||
| 25 | |||
| 26 | clangcrosssdk_sysroot_preprocess () { | ||
| 27 | sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir} | ||
| 28 | } | ||
| 29 | SSTATE_SCAN_FILES += "*-clang *-clang++" | ||
| 30 | PACKAGES = "" | ||
