summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/compiler-rt_git.bb
blob: c79622423102ebfb7dd2a0962222fa6056a70ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "LLVM based C/C++ compiler Runtime"
HOMEPAGE = "http://compiler-rt.llvm.org/"
LICENSE = "MIT | NCSA"
SECTION = "base"
INHIBIT_DEFAULT_DEPS = "1"

DEPENDS += "clang-cross-${TARGET_ARCH}"

require clang.inc

PV .= "+git${SRCPV}"

LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=27b14ab4ce08d04c3a9a5f0ed7997362; \
                   "
SRC_URI = "${LLVM_GIT}/compiler-rt.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=compiler-rt \
           file://0001-support-a-new-embedded-linux-target.patch \
           file://0001-Simplify-cross-compilation.-Don-t-use-native-compile.patch \
          "

SRCREV_FORMAT = "compiler-rt"

S = "${WORKDIR}/git"

inherit cmake pkgconfig pythonnative

THUMB_TUNE_CCARGS = ""
#TUNE_CCARGS += "-nostdlib"

EXTRA_OECMAKE += "-DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
                  -DCOMPILER_RT_BUILD_SANITIZERS=ON \
                  -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${MULTIMACH_HOST_SYS} \
"

do_install_append () {
	install -d ${D}${libdir}
	mv ${D}${libdir}/linux/* ${D}${libdir}
	mv ${D}${exec_prefix}/*.txt ${D}${libdir}
	rm -rf ${D}${libdir}/libclang_rt.asan*.so
	rmdir ${D}${libdir}/linux
}

FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
INSANE_SKIP_${PN} = "dev-so"

#PROVIDES_append_class-target = "\
#        virtual/${TARGET_PREFIX}compilerlibs \
#        libgcc \
#        libgcc-initial \
#        libgcc-dev \
#        libgcc-initial-dev \
#        "
#

FILES_${PN}-dev += "${libdir}/*.syms ${libdir}/*.txt"

BBCLASSEXTEND = "native nativesdk"

ALLOW_EMPTY_${PN} = "1"