summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch28
-rw-r--r--meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch66
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb86
3 files changed, 104 insertions, 76 deletions
diff --git a/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index 209764c8ba..6dbbced7eb 100644
--- a/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,24 +1,22 @@
1From 96558c4f25d5132936014f6f2d6252cfdfdf478a Mon Sep 17 00:00:00 2001 1From 905cac8934fb17e20416a4df712a566e757471a3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 21 May 2016 00:33:20 +0000 3Date: Sat, 21 May 2016 00:33:20 +0000
4Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they 4Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they are macros
5 are macros
6 5
7musl defines some functions as macros and not inline functions 6musl defines some functions as macros and not inline functions
8if this is the case then make sure to undefine them 7if this is the case then make sure to undefine them
9 8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11--- 11---
12Upstream-Status: Pending
13
14 include/llvm/Analysis/TargetLibraryInfo.def | 21 +++++++++++++++++++++ 12 include/llvm/Analysis/TargetLibraryInfo.def | 21 +++++++++++++++++++++
15 1 file changed, 21 insertions(+) 13 1 file changed, 21 insertions(+)
16 14
17diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def 15diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def
18index a461ed813b9..f9fd9faeee0 100644 16index 518a85ee1a0..6b4ead4efc6 100644
19--- a/include/llvm/Analysis/TargetLibraryInfo.def 17--- a/include/llvm/Analysis/TargetLibraryInfo.def
20+++ b/include/llvm/Analysis/TargetLibraryInfo.def 18+++ b/include/llvm/Analysis/TargetLibraryInfo.def
21@@ -665,6 +665,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") 19@@ -731,6 +731,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
22 TLI_DEFINE_ENUM_INTERNAL(fopen) 20 TLI_DEFINE_ENUM_INTERNAL(fopen)
23 TLI_DEFINE_STRING_INTERNAL("fopen") 21 TLI_DEFINE_STRING_INTERNAL("fopen")
24 /// FILE *fopen64(const char *filename, const char *opentype) 22 /// FILE *fopen64(const char *filename, const char *opentype)
@@ -27,8 +25,8 @@ index a461ed813b9..f9fd9faeee0 100644
27+#endif 25+#endif
28 TLI_DEFINE_ENUM_INTERNAL(fopen64) 26 TLI_DEFINE_ENUM_INTERNAL(fopen64)
29 TLI_DEFINE_STRING_INTERNAL("fopen64") 27 TLI_DEFINE_STRING_INTERNAL("fopen64")
30 /// int fprintf(FILE *stream, const char *format, ...); 28 /// int fork();
31@@ -700,6 +703,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") 29@@ -778,6 +781,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
32 /// int fseeko(FILE *stream, off_t offset, int whence); 30 /// int fseeko(FILE *stream, off_t offset, int whence);
33 TLI_DEFINE_ENUM_INTERNAL(fseeko) 31 TLI_DEFINE_ENUM_INTERNAL(fseeko)
34 TLI_DEFINE_STRING_INTERNAL("fseeko") 32 TLI_DEFINE_STRING_INTERNAL("fseeko")
@@ -38,7 +36,7 @@ index a461ed813b9..f9fd9faeee0 100644
38 /// int fseeko64(FILE *stream, off64_t offset, int whence) 36 /// int fseeko64(FILE *stream, off64_t offset, int whence)
39 TLI_DEFINE_ENUM_INTERNAL(fseeko64) 37 TLI_DEFINE_ENUM_INTERNAL(fseeko64)
40 TLI_DEFINE_STRING_INTERNAL("fseeko64") 38 TLI_DEFINE_STRING_INTERNAL("fseeko64")
41@@ -710,6 +716,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") 39@@ -788,6 +794,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
42 TLI_DEFINE_ENUM_INTERNAL(fstat) 40 TLI_DEFINE_ENUM_INTERNAL(fstat)
43 TLI_DEFINE_STRING_INTERNAL("fstat") 41 TLI_DEFINE_STRING_INTERNAL("fstat")
44 /// int fstat64(int filedes, struct stat64 *buf) 42 /// int fstat64(int filedes, struct stat64 *buf)
@@ -48,7 +46,7 @@ index a461ed813b9..f9fd9faeee0 100644
48 TLI_DEFINE_ENUM_INTERNAL(fstat64) 46 TLI_DEFINE_ENUM_INTERNAL(fstat64)
49 TLI_DEFINE_STRING_INTERNAL("fstat64") 47 TLI_DEFINE_STRING_INTERNAL("fstat64")
50 /// int fstatvfs(int fildes, struct statvfs *buf); 48 /// int fstatvfs(int fildes, struct statvfs *buf);
51@@ -725,6 +734,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") 49@@ -803,6 +812,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
52 TLI_DEFINE_ENUM_INTERNAL(ftello) 50 TLI_DEFINE_ENUM_INTERNAL(ftello)
53 TLI_DEFINE_STRING_INTERNAL("ftello") 51 TLI_DEFINE_STRING_INTERNAL("ftello")
54 /// off64_t ftello64(FILE *stream) 52 /// off64_t ftello64(FILE *stream)
@@ -58,7 +56,7 @@ index a461ed813b9..f9fd9faeee0 100644
58 TLI_DEFINE_ENUM_INTERNAL(ftello64) 56 TLI_DEFINE_ENUM_INTERNAL(ftello64)
59 TLI_DEFINE_STRING_INTERNAL("ftello64") 57 TLI_DEFINE_STRING_INTERNAL("ftello64")
60 /// int ftrylockfile(FILE *file); 58 /// int ftrylockfile(FILE *file);
61@@ -845,6 +857,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") 59@@ -929,6 +941,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
62 TLI_DEFINE_ENUM_INTERNAL(lstat) 60 TLI_DEFINE_ENUM_INTERNAL(lstat)
63 TLI_DEFINE_STRING_INTERNAL("lstat") 61 TLI_DEFINE_STRING_INTERNAL("lstat")
64 /// int lstat64(const char *path, struct stat64 *buf); 62 /// int lstat64(const char *path, struct stat64 *buf);
@@ -68,7 +66,7 @@ index a461ed813b9..f9fd9faeee0 100644
68 TLI_DEFINE_ENUM_INTERNAL(lstat64) 66 TLI_DEFINE_ENUM_INTERNAL(lstat64)
69 TLI_DEFINE_STRING_INTERNAL("lstat64") 67 TLI_DEFINE_STRING_INTERNAL("lstat64")
70 /// void *malloc(size_t size); 68 /// void *malloc(size_t size);
71@@ -1064,6 +1079,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") 69@@ -1154,6 +1169,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
72 TLI_DEFINE_ENUM_INTERNAL(stat) 70 TLI_DEFINE_ENUM_INTERNAL(stat)
73 TLI_DEFINE_STRING_INTERNAL("stat") 71 TLI_DEFINE_STRING_INTERNAL("stat")
74 /// int stat64(const char *path, struct stat64 *buf); 72 /// int stat64(const char *path, struct stat64 *buf);
@@ -78,7 +76,7 @@ index a461ed813b9..f9fd9faeee0 100644
78 TLI_DEFINE_ENUM_INTERNAL(stat64) 76 TLI_DEFINE_ENUM_INTERNAL(stat64)
79 TLI_DEFINE_STRING_INTERNAL("stat64") 77 TLI_DEFINE_STRING_INTERNAL("stat64")
80 /// int statvfs(const char *path, struct statvfs *buf); 78 /// int statvfs(const char *path, struct statvfs *buf);
81@@ -1193,6 +1211,9 @@ TLI_DEFINE_STRING_INTERNAL("times") 79@@ -1283,6 +1301,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
82 TLI_DEFINE_ENUM_INTERNAL(tmpfile) 80 TLI_DEFINE_ENUM_INTERNAL(tmpfile)
83 TLI_DEFINE_STRING_INTERNAL("tmpfile") 81 TLI_DEFINE_STRING_INTERNAL("tmpfile")
84 /// FILE *tmpfile64(void) 82 /// FILE *tmpfile64(void)
@@ -89,5 +87,5 @@ index a461ed813b9..f9fd9faeee0 100644
89 TLI_DEFINE_STRING_INTERNAL("tmpfile64") 87 TLI_DEFINE_STRING_INTERNAL("tmpfile64")
90 /// int toascii(int c); 88 /// int toascii(int c);
91-- 89--
922.16.1 902.20.1
93 91
diff --git a/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch b/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
index 6a9283323c..2970b0827b 100644
--- a/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
+++ b/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
@@ -1,4 +1,4 @@
1From aeccf16eaccdd80e4d5ecaa51673ce4b2bac1130 Mon Sep 17 00:00:00 2001 1From 0570fe02c07244a8724c1e6c0437f893c8aa8e93 Mon Sep 17 00:00:00 2001
2From: Martin Kelly <mkelly@xevo.com> 2From: Martin Kelly <mkelly@xevo.com>
3Date: Fri, 19 May 2017 00:22:57 -0700 3Date: Fri, 19 May 2017 00:22:57 -0700
4Subject: [PATCH 2/2] llvm: allow env override of exe path 4Subject: [PATCH 2/2] llvm: allow env override of exe path
@@ -16,16 +16,16 @@ Upstream-Status: Inappropriate [OE-Specific]
16Signed-off-by: Martin Kelly <mkelly@xevo.com> 16Signed-off-by: Martin Kelly <mkelly@xevo.com>
17Signed-off-by: Khem Raj <raj.khem@gmail.com> 17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18--- 18---
19 tools/llvm-config/llvm-config.cpp | 17 ++++++++++++++++- 19 tools/llvm-config/llvm-config.cpp | 35 ++++++++++++++++++++++---------
20 1 file changed, 16 insertions(+), 1 deletion(-) 20 1 file changed, 25 insertions(+), 10 deletions(-)
21 21
22diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 22diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
23index 08b096afb05..360cc5abf4e 100644 23index bec89fef98c..91b4d6e4c43 100644
24--- a/tools/llvm-config/llvm-config.cpp 24--- a/tools/llvm-config/llvm-config.cpp
25+++ b/tools/llvm-config/llvm-config.cpp 25+++ b/tools/llvm-config/llvm-config.cpp
26@@ -225,6 +225,13 @@ Typical components:\n\ 26@@ -226,6 +226,13 @@ Typical components:\n\
27 27
28 /// \brief Compute the path to the main executable. 28 /// Compute the path to the main executable.
29 std::string GetExecutablePath(const char *Argv0) { 29 std::string GetExecutablePath(const char *Argv0) {
30+ // Hack for Yocto: we need to override the root path when we are using 30+ // Hack for Yocto: we need to override the root path when we are using
31+ // llvm-config from within a target sysroot. 31+ // llvm-config from within a target sysroot.
@@ -37,7 +37,25 @@ index 08b096afb05..360cc5abf4e 100644
37 // This just needs to be some symbol in the binary; C++ doesn't 37 // This just needs to be some symbol in the binary; C++ doesn't
38 // allow taking the address of ::main however. 38 // allow taking the address of ::main however.
39 void *P = (void *)(intptr_t)GetExecutablePath; 39 void *P = (void *)(intptr_t)GetExecutablePath;
40@@ -306,12 +313,20 @@ int main(int argc, char **argv) { 40@@ -284,7 +291,7 @@ int main(int argc, char **argv) {
41 // bin dir).
42 sys::fs::make_absolute(CurrentPath);
43 CurrentExecPrefix =
44- sys::path::parent_path(sys::path::parent_path(CurrentPath)).str();
45+ sys::path::parent_path(sys::path::parent_path(sys::path::parent_path(CurrentPath))).str();
46
47 // Check to see if we are inside a development tree by comparing to possible
48 // locations (prefix style or CMake style).
49@@ -293,7 +300,7 @@ int main(int argc, char **argv) {
50 DevelopmentTreeLayout = CMakeStyle;
51 ActiveObjRoot = LLVM_OBJ_ROOT;
52 } else if (sys::fs::equivalent(CurrentExecPrefix,
53- Twine(LLVM_OBJ_ROOT) + "/bin")) {
54+ Twine(LLVM_OBJ_ROOT) + "/bin/llvm8.0")) {
55 IsInDevelopmentTree = true;
56 DevelopmentTreeLayout = CMakeBuildModeStyle;
57 ActiveObjRoot = LLVM_OBJ_ROOT;
58@@ -307,37 +314,45 @@ int main(int argc, char **argv) {
41 std::string ActivePrefix, ActiveBinDir, ActiveIncludeDir, ActiveLibDir, 59 std::string ActivePrefix, ActiveBinDir, ActiveIncludeDir, ActiveLibDir,
42 ActiveCMakeDir; 60 ActiveCMakeDir;
43 std::string ActiveIncludeOption; 61 std::string ActiveIncludeOption;
@@ -45,11 +63,12 @@ index 08b096afb05..360cc5abf4e 100644
45+ // llvm-config from within a target sysroot. 63+ // llvm-config from within a target sysroot.
46+ std::string Multilibdir = std::getenv("YOCTO_ALTERNATE_MULTILIB_NAME"); 64+ std::string Multilibdir = std::getenv("YOCTO_ALTERNATE_MULTILIB_NAME");
47+ if (Multilibdir.empty()) { 65+ if (Multilibdir.empty()) {
48+ Multilibdir = "/lib" LLVM_LIBDIR_SUFFIX; 66+ Multilibdir = "/lib/llvm8.0" LLVM_LIBDIR_SUFFIX;
49+ } 67+ }
50+ 68+
51 if (IsInDevelopmentTree) { 69 if (IsInDevelopmentTree) {
52 ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include"; 70- ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include";
71+ ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include/llvm8.0";
53 ActivePrefix = CurrentExecPrefix; 72 ActivePrefix = CurrentExecPrefix;
54 73
55 // CMake organizes the products differently than a normal prefix style 74 // CMake organizes the products differently than a normal prefix style
@@ -57,8 +76,31 @@ index 08b096afb05..360cc5abf4e 100644
57+ 76+
58 switch (DevelopmentTreeLayout) { 77 switch (DevelopmentTreeLayout) {
59 case CMakeStyle: 78 case CMakeStyle:
60 ActiveBinDir = ActiveObjRoot + "/bin"; 79- ActiveBinDir = ActiveObjRoot + "/bin";
61@@ -336,7 +351,7 @@ int main(int argc, char **argv) { 80- ActiveLibDir = ActiveObjRoot + "/lib" + LLVM_LIBDIR_SUFFIX;
81+ ActiveBinDir = ActiveObjRoot + "/bin/llvm8.0";
82+ ActiveLibDir = ActiveObjRoot + "/lib/llvm8.0" + LLVM_LIBDIR_SUFFIX;
83 ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
84 break;
85 case CMakeBuildModeStyle:
86 ActivePrefix = ActiveObjRoot;
87- ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode;
88+ ActiveBinDir = ActiveObjRoot + "/bin/llvm8.0/" + build_mode;
89 ActiveLibDir =
90- ActiveObjRoot + "/lib" + LLVM_LIBDIR_SUFFIX + "/" + build_mode;
91+ ActiveObjRoot + "/lib/llvm8.0" + LLVM_LIBDIR_SUFFIX + "/" + build_mode;
92 ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
93 break;
94 }
95
96 // We need to include files from both the source and object trees.
97 ActiveIncludeOption =
98- ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
99+ ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include/llvm8.0");
100 } else {
101 ActivePrefix = CurrentExecPrefix;
102- ActiveIncludeDir = ActivePrefix + "/include";
103+ ActiveIncludeDir = ActivePrefix + "/include/llvm8.0";
62 SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR)); 104 SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
63 sys::fs::make_absolute(ActivePrefix, path); 105 sys::fs::make_absolute(ActivePrefix, path);
64 ActiveBinDir = path.str(); 106 ActiveBinDir = path.str();
@@ -68,5 +110,5 @@ index 08b096afb05..360cc5abf4e 100644
68 ActiveIncludeOption = "-I" + ActiveIncludeDir; 110 ActiveIncludeOption = "-I" + ActiveIncludeDir;
69 } 111 }
70-- 112--
712.18.0 1132.20.1
72 114
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index eb0779d6ec..eca78af09e 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "http://llvm.org"
6LICENSE = "NCSA" 6LICENSE = "NCSA"
7SECTION = "devel" 7SECTION = "devel"
8 8
9LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=e825e017edc35cfd58e26116e5251771" 9LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
10 10
11DEPENDS = "libffi libxml2 zlib ninja-native llvm-native" 11DEPENDS = "libffi libxml2 zlib ninja-native llvm-native"
12 12
@@ -19,18 +19,23 @@ PROVIDES += "llvm${PV}"
19LLVM_RELEASE = "${PV}" 19LLVM_RELEASE = "${PV}"
20LLVM_DIR = "llvm${LLVM_RELEASE}" 20LLVM_DIR = "llvm${LLVM_RELEASE}"
21 21
22SRCREV = "5136df4d089a086b70d452160ad5451861269498" 22SRCREV = "e5cc6808dc0d5b773479bf36c51d59d0d3174733"
23PV = "6.0" 23BRANCH = "release_${MAJOR_VERSION}${MINOR_VERSION}"
24BRANCH = "release_60" 24MAJOR_VERSION = "8"
25PATCH_VERSION = "1" 25MINOR_VERSION = "0"
26SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};protocol=http \ 26PATCH_VERSION = "0"
27SOLIBVER = "1"
28PV = "${MAJOR_VERSION}.${MINOR_VERSION}"
29SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH} \
27 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ 30 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
28 file://0002-llvm-allow-env-override-of-exe-path.patch \ 31 file://0002-llvm-allow-env-override-of-exe-path.patch \
29 " 32 "
30UPSTREAM_CHECK_COMMITS = "1" 33UPSTREAM_CHECK_COMMITS = "1"
34
31S = "${WORKDIR}/git" 35S = "${WORKDIR}/git"
32 36
33LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" 37LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
38
34def get_llvm_arch(bb, d, arch_var): 39def get_llvm_arch(bb, d, arch_var):
35 import re 40 import re
36 a = d.getVar(arch_var) 41 a = d.getVar(arch_var)
@@ -117,71 +122,54 @@ do_install() {
117 # Remove unnecessary cmake files 122 # Remove unnecessary cmake files
118 rm -rf ${D}${libdir}/${LLVM_DIR}/cmake 123 rm -rf ${D}${libdir}/${LLVM_DIR}/cmake
119 124
120 ln -s ${LLVM_DIR}/libLLVM-${PV}${SOLIBSDEV} ${D}${libdir}/libLLVM-${PV}${SOLIBSDEV} 125 ln -s ${LLVM_DIR}/libLLVM-${MAJOR_VERSION}${SOLIBSDEV} ${D}${libdir}/libLLVM-${MAJOR_VERSION}${SOLIBSDEV}
121 126
122 # We'll have to delete the libLLVM.so due to multiple reasons... 127 # We'll have to delete the libLLVM.so due to multiple reasons...
123 rm -rf ${D}${libdir}/${LLVM_DIR}/libLLVM.so 128 rm -rf ${D}${libdir}/${LLVM_DIR}/libLLVM.so
124 rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so 129 rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so
125} 130}
131
126do_install_class-native() { 132do_install_class-native() {
127 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} 133 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
128 install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV} 134 install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
129 install -D -m 0755 ${B}/lib/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so 135 install -D -m 0755 ${B}/lib/libLLVM-${MAJOR_VERSION}.so ${D}${libdir}/libLLVM-${MAJOR_VERSION}.so
130} 136}
131 137
132PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello" 138PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto"
133ALLOW_EMPTY_${PN} = "1"
134ALLOW_EMPTY_${PN}-staticdev = "1"
135FILES_${PN} = ""
136FILES_${PN}-staticdev = ""
137FILES_${PN}-dbg = " \
138 ${bindir}/${LLVM_DIR}/.debug \
139 ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \
140 ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \
141 ${libdir}/${LLVM_DIR}/.debug/libLTO.so* \
142 ${libdir}/${LLVM_DIR}/.debug/llvm-config \
143 /usr/src/debug \
144"
145 139
146FILES_${PN}-dev = " \ 140RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks"
147 ${bindir}/${LLVM_DIR} \
148 ${includedir}/${LLVM_DIR} \
149 ${libdir}/${LLVM_DIR}/llvm-config \
150"
151
152RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello"
153 141
154FILES_${PN}-bugpointpasses = "\ 142FILES_${PN}-bugpointpasses = "\
155 ${libdir}/${LLVM_DIR}/BugpointPasses.so \ 143 ${libdir}/${LLVM_DIR}/BugpointPasses.so \
156" 144"
157FILES_${PN} += "\ 145
146FILES_${PN}-libllvm = "\
147 ${libdir}/${LLVM_DIR}/libLLVM-${MAJOR_VERSION}.so \
148 ${libdir}/libLLVM-${MAJOR_VERSION}.so \
149"
150
151FILES_${PN}-liblto += "\
158 ${libdir}/${LLVM_DIR}/libLTO.so.* \ 152 ${libdir}/${LLVM_DIR}/libLTO.so.* \
159" 153"
160 154
155FILES_${PN}-liboptremarks += "\
156 ${libdir}/${LLVM_DIR}/libOptRemarks.so.* \
157"
158
161FILES_${PN}-llvmhello = "\ 159FILES_${PN}-llvmhello = "\
162 ${libdir}/${LLVM_DIR}/LLVMHello.so \ 160 ${libdir}/${LLVM_DIR}/LLVMHello.so \
163" 161"
164 162
165PACKAGES_DYNAMIC = "^libllvm${LLVM_RELEASE}-.*$" 163FILES_${PN}-dev += " \
166NOAUTOPACKAGEDEBUG = "1" 164 ${libdir}/${LLVM_DIR}/llvm-config \
167 165 ${libdir}/${LLVM_DIR}/libOptRemarks.so \
168INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE}.${PATCH_VERSION} += "dev-so" 166 ${libdir}/${LLVM_DIR}/libLLVM-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}.so \
169INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE} += "dev-so" 167"
170INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm += "dev-so" 168
171 169FILES_${PN}-staticdev += "\
172python llvm_populate_packages() { 170 ${libdir}/${LLVM_DIR}/*.a \
173 libdir = bb.data.expand('${libdir}', d) 171"
174 libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d)
175 split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', r'^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True)
176 split_packages = do_split_packages(d, libdir, r'^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True)
177 split_staticdev_packages = do_split_packages(d, libllvm_libdir, r'^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True)
178 if split_packages:
179 pn = d.getVar('PN')
180 d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages))
181 d.appendVar('RDEPENDS_' + pn + '-dbg', ' '+' '.join(split_dbg_packages))
182 d.appendVar('RDEPENDS_' + pn + '-staticdev', ' '+' '.join(split_staticdev_packages))
183}
184 172
185PACKAGESPLITFUNCS_prepend = "llvm_populate_packages " 173INSANE_SKIP_${PN}-libllvm += "dev-so"
186 174
187BBCLASSEXTEND = "native nativesdk" 175BBCLASSEXTEND = "native nativesdk"