From cb21864e005ae9ab5a3ae73d1ffe69d30167b3b7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 23 Jul 2015 22:46:47 -0700 Subject: 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 --- recipes-devtools/clang/nativesdk-clang-glue.bb | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 recipes-devtools/clang/nativesdk-clang-glue.bb 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 @@ +# Copyright (C) 2014 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "SDK 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 nativesdk +DEPENDS += "nativesdk-clang" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}${prefix_nativesdk} + cd ${D}${prefix_nativesdk} + ln -s ..${libdir} . + ln -s ..${includedir} . +} + +sysroot_stage_all () { + sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} +} + +FILES_${PN} += "${prefix_nativesdk}" -- cgit v1.2.3-54-g00ecf