diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-02-02 11:43:26 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-05 13:53:47 +0000 |
commit | 93f86e2c4728fe9402842867fe124e89718b7f4b (patch) | |
tree | ffc37075db3a6c8a89e8e99ea4434f6881f83c5d /meta/recipes-devtools/llvm/llvm | |
parent | d55fdec53cdf6aa2b84db5498f5d60f5effac95f (diff) | |
download | poky-93f86e2c4728fe9402842867fe124e89718b7f4b.tar.gz |
llvm,mesa: Upgrade to upcoming 8.0.0 release
License-Update: Copyright year updates from 2017-2019
Refresh patches to apply on new version
mesa move dep to the llvm release to 8.0
Needs to happen along with llvm upgrade always
(From OE-Core rev: 96631d53becca8408758b405adc670ad7e2ea2f3)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/llvm/llvm')
-rw-r--r-- | meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch | 28 | ||||
-rw-r--r-- | meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch | 66 |
2 files changed, 67 insertions, 27 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 @@ | |||
1 | From 96558c4f25d5132936014f6f2d6252cfdfdf478a Mon Sep 17 00:00:00 2001 | 1 | From 905cac8934fb17e20416a4df712a566e757471a3 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 21 May 2016 00:33:20 +0000 | 3 | Date: Sat, 21 May 2016 00:33:20 +0000 |
4 | Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they | 4 | Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they are macros |
5 | are macros | ||
6 | 5 | ||
7 | musl defines some functions as macros and not inline functions | 6 | musl defines some functions as macros and not inline functions |
8 | if this is the case then make sure to undefine them | 7 | if this is the case then make sure to undefine them |
9 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | --- | 11 | --- |
12 | Upstream-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 | ||
17 | diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def | 15 | diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def |
18 | index a461ed813b9..f9fd9faeee0 100644 | 16 | index 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 | -- |
92 | 2.16.1 | 90 | 2.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 @@ | |||
1 | From aeccf16eaccdd80e4d5ecaa51673ce4b2bac1130 Mon Sep 17 00:00:00 2001 | 1 | From 0570fe02c07244a8724c1e6c0437f893c8aa8e93 Mon Sep 17 00:00:00 2001 |
2 | From: Martin Kelly <mkelly@xevo.com> | 2 | From: Martin Kelly <mkelly@xevo.com> |
3 | Date: Fri, 19 May 2017 00:22:57 -0700 | 3 | Date: Fri, 19 May 2017 00:22:57 -0700 |
4 | Subject: [PATCH 2/2] llvm: allow env override of exe path | 4 | Subject: [PATCH 2/2] llvm: allow env override of exe path |
@@ -16,16 +16,16 @@ Upstream-Status: Inappropriate [OE-Specific] | |||
16 | Signed-off-by: Martin Kelly <mkelly@xevo.com> | 16 | Signed-off-by: Martin Kelly <mkelly@xevo.com> |
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 17 | Signed-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 | ||
22 | diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp | 22 | diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp |
23 | index 08b096afb05..360cc5abf4e 100644 | 23 | index 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 | -- |
71 | 2.18.0 | 113 | 2.20.1 |
72 | 114 | ||