summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/common.inc')
-rw-r--r--recipes-devtools/clang/common.inc63
1 files changed, 50 insertions, 13 deletions
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc
index 74bccf4..1b4cf9b 100644
--- a/recipes-devtools/clang/common.inc
+++ b/recipes-devtools/clang/common.inc
@@ -1,33 +1,70 @@
1FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:" 1FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:"
2 2
3LIC_FILES_CHKSUM = "file://llvm/LICENSE.TXT;md5=${LLVMMD5SUM} \
4 file://clang/LICENSE.TXT;md5=${CLANGMD5SUM} \
5"
6LICENSE = "NCSA"
7
8BASEURI ??= "${LLVM_GIT}/llvm-project-20170507;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}"
9SRC_URI = "\
10 ${BASEURI} \
11 ${LLVMPATCHES} \
12 ${CLANGPATCHES} \
13 ${COMPILERRTPATCHES} \
14 ${LIBCXXABIPATCHES} \
15 ${LIBCXXPATCHES} \
16 ${LLDBPATCHES} \
17"
18
3# llvm patches 19# llvm patches
4# 20#
5LLVMPATCHES = "\ 21LLVMPATCHES = "\
6 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ 22 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;patchdir=llvm \
7 file://0002-llvm-allow-env-override-of-exe-path.patch \ 23 file://0002-llvm-allow-env-override-of-exe-path.patch;patchdir=llvm \
8 file://0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch \ 24 file://0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch;patchdir=llvm \
9" 25"
10# Fallback to no-PIE if not set 26# Fallback to no-PIE if not set
11GCCPIE ??= "" 27GCCPIE ??= ""
12 28
13# Clang patches 29# Clang patches
14CLANGPATCHES = "\ 30CLANGPATCHES = "\
15 file://0001-clang-driver-Use-lib-for-ldso-on-OE.patch;patchdir=tools/clang \ 31 file://0001-clang-driver-Use-lib-for-ldso-on-OE.patch;patchdir=clang \
16 file://0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch;patchdir=tools/clang \ 32 file://0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch;patchdir=clang \
17 file://0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=tools/clang \ 33 file://0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=clang \
18 file://0004-clang-Prepend-trailing-to-sysroot.patch;patchdir=tools/clang \ 34 file://0004-clang-Prepend-trailing-to-sysroot.patch;patchdir=clang \
19 file://0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch;patchdir=tools/clang \ 35 file://0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch;patchdir=clang \
20 file://0006-clang-Define-releative-gcc-installation-dir.patch;patchdir=tools/clang \ 36 file://0006-clang-Define-releative-gcc-installation-dir.patch;patchdir=clang \
21 file://0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch;patchdir=tools/clang \ 37 file://0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch;patchdir=clang \
22 file://0008-clang-scan-view-needs-python-2.x.patch;patchdir=tools/clang \ 38 file://0008-clang-scan-view-needs-python-2.x.patch;patchdir=clang \
23" 39"
24CLANGPATCHES += "${@'file://0009-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=tools/clang' if '${GCCPIE}' else ''}" 40CLANGPATCHES += "${@'file://0009-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=clang' if '${GCCPIE}' else ''}"
25 41
42# compiler-rt patches
43COMPILERRTPATCHES = "\
44 file://0001-compiler-rt-support-a-new-embedded-linux-target.patch;patchdir=compiler-rt \
45 file://0002-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch;patchdir=compiler-rt \
46 file://0003-compiler-rt-Disable-tsan-on-OE-glibc.patch;patchdir=compiler-rt \
47 file://0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch;patchdir=compiler-rt \
48"
26# libcxxabi patches 49# libcxxabi patches
27LIBCXXABIPATCHES ="\ 50LIBCXXABIPATCHES ="\
28 file://0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch;patchdir=projects/libcxxabi \ 51 file://0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch;patchdir=libcxxabi \
29" 52"
30 53
31# libc++ patches 54# libc++ patches
32LIBCXXPATCHES = "\ 55LIBCXXPATCHES = "\
33" 56"
57
58# lldb patches
59LLDBPATCHES = "\
60 file://0001-lldb-Include-limits.h-for-PATH_MAX-definition.patch;patchdir=lldb \
61 file://0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch;patchdir=lldb \
62"
63
64S = "${TMPDIR}/work-shared/llvm-project-source-${PV}-${PR}/git"
65B = "${WORKDIR}/llvm-project-source-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
66
67# We need to ensure that for the shared work directory, the do_patch signatures match
68# The real WORKDIR location isn't a dependency for the shared workdir.
69src_patches[vardepsexclude] = "WORKDIR"
70should_apply[vardepsexclude] += "PN"