summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-07-23 22:46:47 -0700
committerKhem Raj <raj.khem@gmail.com>2015-07-23 22:46:47 -0700
commitcb21864e005ae9ab5a3ae73d1ffe69d30167b3b7 (patch)
treed25792f0eef120f2a453a808393f91de97ad4243
parent3eeecb40a19a564f2427a468024467bd35750d18 (diff)
downloadmeta-clang-cb21864e005ae9ab5a3ae73d1ffe69d30167b3b7.tar.gz
nativesdk-clang-glue: Add recipe for glueing clang crossdk
clang differs subtly when it comes to sysroot support as compared to gcc where the gcc driver is compiled with lot of the paths and information clang is not, nativesdk sysroot is tuned to where gcc expects it, this does not work well for clang, since clang looks for all headers/libraries/compiler-runtime under same sysroot whereas gcc has diffrent understanding of sysroot for target and where it expects gcc headers and other tools needed for compilation. Anyway short story is that we create symlinks into directories for include/ and usr/lib so clang is happy and it does not affect gcc crosssdk Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-devtools/clang/nativesdk-clang-glue.bb27
1 files changed, 27 insertions, 0 deletions
diff --git a/recipes-devtools/clang/nativesdk-clang-glue.bb b/recipes-devtools/clang/nativesdk-clang-glue.bb
new file mode 100644
index 0000000..0483109
--- /dev/null
+++ b/recipes-devtools/clang/nativesdk-clang-glue.bb
@@ -0,0 +1,27 @@
1# Copyright (C) 2014 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4DESCRIPTION = "SDK Cross compiler wrappers for LLVM based C/C++ compiler"
5HOMEPAGE = "http://clang.llvm.org/"
6LICENSE = "NCSA"
7LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7"
8SECTION = "devel"
9
10require clang.inc
11inherit nativesdk
12DEPENDS += "nativesdk-clang"
13
14S = "${WORKDIR}"
15
16do_install() {
17 install -d ${D}${prefix_nativesdk}
18 cd ${D}${prefix_nativesdk}
19 ln -s ..${libdir} .
20 ln -s ..${includedir} .
21}
22
23sysroot_stage_all () {
24 sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
25}
26
27FILES_${PN} += "${prefix_nativesdk}"