diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-12-27 10:47:14 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-12-27 17:29:06 -0800 |
commit | 3d4c48bd0afb67396aacbc444fa7f6698724860e (patch) | |
tree | c6baddd7ea8c73f781a9f691585108d228684d30 /recipes-devtools/clang/common.inc | |
parent | 463509e8b983a0e999d01c803a1a999b76d70411 (diff) | |
download | meta-clang-3d4c48bd0afb67396aacbc444fa7f6698724860e.tar.gz |
recipes: Rework llvm/clang/compiler-rt/libcxx/lldb recipes
This is an overhaul of clang/llvm project related recipes
* switch to using a flat mono repo for all clang/llvm projects
* Add llvm-project-source recipe which will prepare source tree in
work-shared for all recipes much like kernel and gcc
* build lld as part of clang recipes, its much easier and saves build
time and hopefully nativesdk version will be built now for free
* switch to official git repos at git://github.com/llvm-project
* Adjust all recipes to use shared sources
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/common.inc')
-rw-r--r-- | recipes-devtools/clang/common.inc | 63 |
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 @@ | |||
1 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:" | 1 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:" |
2 | 2 | ||
3 | LIC_FILES_CHKSUM = "file://llvm/LICENSE.TXT;md5=${LLVMMD5SUM} \ | ||
4 | file://clang/LICENSE.TXT;md5=${CLANGMD5SUM} \ | ||
5 | " | ||
6 | LICENSE = "NCSA" | ||
7 | |||
8 | BASEURI ??= "${LLVM_GIT}/llvm-project-20170507;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}" | ||
9 | SRC_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 | # |
5 | LLVMPATCHES = "\ | 21 | LLVMPATCHES = "\ |
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 |
11 | GCCPIE ??= "" | 27 | GCCPIE ??= "" |
12 | 28 | ||
13 | # Clang patches | 29 | # Clang patches |
14 | CLANGPATCHES = "\ | 30 | CLANGPATCHES = "\ |
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 | " |
24 | CLANGPATCHES += "${@'file://0009-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=tools/clang' if '${GCCPIE}' else ''}" | 40 | CLANGPATCHES += "${@'file://0009-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=clang' if '${GCCPIE}' else ''}" |
25 | 41 | ||
42 | # compiler-rt patches | ||
43 | COMPILERRTPATCHES = "\ | ||
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 |
27 | LIBCXXABIPATCHES ="\ | 50 | LIBCXXABIPATCHES ="\ |
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 |
32 | LIBCXXPATCHES = "\ | 55 | LIBCXXPATCHES = "\ |
33 | " | 56 | " |
57 | |||
58 | # lldb patches | ||
59 | LLDBPATCHES = "\ | ||
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 | |||
64 | S = "${TMPDIR}/work-shared/llvm-project-source-${PV}-${PR}/git" | ||
65 | B = "${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. | ||
69 | src_patches[vardepsexclude] = "WORKDIR" | ||
70 | should_apply[vardepsexclude] += "PN" | ||