diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-07-23 22:46:47 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2015-07-23 22:46:47 -0700 |
commit | cb21864e005ae9ab5a3ae73d1ffe69d30167b3b7 (patch) | |
tree | d25792f0eef120f2a453a808393f91de97ad4243 | |
parent | 3eeecb40a19a564f2427a468024467bd35750d18 (diff) | |
download | meta-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.bb | 27 |
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 | |||
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 | require clang.inc | ||
11 | inherit nativesdk | ||
12 | DEPENDS += "nativesdk-clang" | ||
13 | |||
14 | S = "${WORKDIR}" | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}${prefix_nativesdk} | ||
18 | cd ${D}${prefix_nativesdk} | ||
19 | ln -s ..${libdir} . | ||
20 | ln -s ..${includedir} . | ||
21 | } | ||
22 | |||
23 | sysroot_stage_all () { | ||
24 | sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} | ||
25 | } | ||
26 | |||
27 | FILES_${PN} += "${prefix_nativesdk}" | ||