diff options
Diffstat (limited to 'recipes-devtools/clang')
50 files changed, 880 insertions, 544 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index a99049d..6a08046 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc | |||
@@ -4,11 +4,11 @@ LLVM_DIR = "llvm${LLVM_RELEASE}" | |||
4 | LLVM_GIT ?= "git://github.com/llvm" | 4 | LLVM_GIT ?= "git://github.com/llvm" |
5 | LLVM_GIT_PROTOCOL ?= "https" | 5 | LLVM_GIT_PROTOCOL ?= "https" |
6 | 6 | ||
7 | MAJOR_VER = "10" | 7 | MAJOR_VER = "12" |
8 | MINOR_VER = "0" | 8 | MINOR_VER = "0" |
9 | PATCH_VER = "1" | 9 | PATCH_VER = "0" |
10 | 10 | ||
11 | SRCREV ?= "ef32c611aa214dea855364efd7ba451ec5ec3f74" | 11 | SRCREV ?= "fa0971b87fb2c9d14d1bba2551e61f02f18f329b" |
12 | 12 | ||
13 | PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" | 13 | PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" |
14 | BRANCH = "release/${MAJOR_VER}.x" | 14 | BRANCH = "release/${MAJOR_VER}.x" |
@@ -20,4 +20,7 @@ LLDBMD5SUM = "2e0d44968471fcde980034dbb826bea9" | |||
20 | 20 | ||
21 | LLVM_LIBDIR_SUFFIX="${@d.getVar('baselib').replace('lib', '')}" | 21 | LLVM_LIBDIR_SUFFIX="${@d.getVar('baselib').replace('lib', '')}" |
22 | 22 | ||
23 | # set the default pigz thread | ||
24 | export PIGZ = "-p ${@oe.utils.cpu_count(at_least=2)}" | ||
25 | |||
23 | require common.inc | 26 | require common.inc |
diff --git a/recipes-devtools/clang/clang/0001-compiler-rt-Fix-realpath-already-defined-error.patch b/recipes-devtools/clang/clang/0001-compiler-rt-Fix-realpath-already-defined-error.patch deleted file mode 100755 index 35e65d3..0000000 --- a/recipes-devtools/clang/clang/0001-compiler-rt-Fix-realpath-already-defined-error.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From dde0be40b3628caa4abbb7ca367bc753f7b7e7a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Thoma <a.thoma@rational-online.com> | ||
3 | Date: Wed, 22 Sep 2021 07:46:29 +0200 | ||
4 | Subject: [PATCH] compiler-rt Fix realpath already defined error | ||
5 | |||
6 | --- | ||
7 | compiler-rt/lib/tsan/dd/dd_interceptors.cpp | 10 +++++----- | ||
8 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
9 | |||
10 | diff --git a/compiler-rt/lib/tsan/dd/dd_interceptors.cpp b/compiler-rt/lib/tsan/dd/dd_interceptors.cpp | ||
11 | index 35a0beb19196..ed819339f3cb 100644 | ||
12 | --- a/compiler-rt/lib/tsan/dd/dd_interceptors.cpp | ||
13 | +++ b/compiler-rt/lib/tsan/dd/dd_interceptors.cpp | ||
14 | @@ -6,11 +6,11 @@ | ||
15 | // | ||
16 | //===----------------------------------------------------------------------===// | ||
17 | |||
18 | +#include <pthread.h> | ||
19 | #include "dd_rtl.h" | ||
20 | #include "interception/interception.h" | ||
21 | #include "sanitizer_common/sanitizer_procmaps.h" | ||
22 | -#include <pthread.h> | ||
23 | -#include <stdlib.h> | ||
24 | +#include "sanitizer_common/sanitizer_allocator_internal.h" | ||
25 | |||
26 | using namespace __dsan; | ||
27 | |||
28 | @@ -163,12 +163,12 @@ static pthread_cond_t *init_cond(pthread_cond_t *c, bool force = false) { | ||
29 | uptr cond = atomic_load(p, memory_order_acquire); | ||
30 | if (!force && cond != 0) | ||
31 | return (pthread_cond_t*)cond; | ||
32 | - void *newcond = malloc(sizeof(pthread_cond_t)); | ||
33 | + void *newcond = InternalAlloc(sizeof(pthread_cond_t)); | ||
34 | internal_memset(newcond, 0, sizeof(pthread_cond_t)); | ||
35 | if (atomic_compare_exchange_strong(p, &cond, (uptr)newcond, | ||
36 | memory_order_acq_rel)) | ||
37 | return (pthread_cond_t*)newcond; | ||
38 | - free(newcond); | ||
39 | + InternalFree(newcond); | ||
40 | return (pthread_cond_t*)cond; | ||
41 | } | ||
42 | |||
43 | @@ -216,7 +216,7 @@ INTERCEPTOR(int, pthread_cond_destroy, pthread_cond_t *c) { | ||
44 | InitThread(); | ||
45 | pthread_cond_t *cond = init_cond(c); | ||
46 | int res = REAL(pthread_cond_destroy)(cond); | ||
47 | - free(cond); | ||
48 | + InternalFree(cond); | ||
49 | atomic_store((atomic_uintptr_t*)c, 0, memory_order_relaxed); | ||
50 | return res; | ||
51 | } | ||
52 | -- | ||
53 | 2.25.1 | ||
54 | |||
diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index 1a606f4..c1ba432 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9f0c90da3de0706e3dd699ed0eb92744d4d9ea80 Mon Sep 17 00:00:00 2001 | 1 | From 42e6673563ca1d0e433e16c3eefa20b98e280ebd 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: Mon, 22 May 2017 17:36:16 -0700 | 3 | Date: Mon, 22 May 2017 17:36:16 -0700 |
4 | Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found | 4 | Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found |
@@ -23,15 +23,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | 23 | 1 file changed, 1 insertion(+), 1 deletion(-) |
24 | 24 | ||
25 | diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt | 25 | diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt |
26 | index 2e9bb402227..bfad6703c65 100644 | 26 | index 7456cb98bfa1..1a732ec5cb89 100644 |
27 | --- a/lldb/source/Host/CMakeLists.txt | 27 | --- a/lldb/source/Host/CMakeLists.txt |
28 | +++ b/lldb/source/Host/CMakeLists.txt | 28 | +++ b/lldb/source/Host/CMakeLists.txt |
29 | @@ -149,7 +149,7 @@ if (APPLE) | 29 | @@ -138,7 +138,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") |
30 | list(APPEND EXTRA_LIBS xml2) | 30 | list(APPEND EXTRA_LIBS kvm) |
31 | else () | 31 | endif() |
32 | if (LIBXML2_FOUND) | 32 | if (LLDB_ENABLE_LIBXML2) |
33 | - list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES}) | 33 | - list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES}) |
34 | + list(APPEND EXTRA_LIBS xml2) | 34 | + list(APPEND EXTRA_LIBS xml2) |
35 | endif() | 35 | endif() |
36 | endif () | ||
37 | if (HAVE_LIBDL) | 36 | if (HAVE_LIBDL) |
37 | list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS}) | ||
diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 65fb23d..f101e77 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a268e2fb21b30cce26f76536bf133b7a706e460f Mon Sep 17 00:00:00 2001 | 1 | From da63df8f02b3a767b68d6de730bb63bba6c3ce33 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: Sun, 27 Aug 2017 10:37:49 -0700 | 3 | Date: Sun, 27 Aug 2017 10:37:49 -0700 |
4 | Subject: [PATCH] libcxxabi: Find libunwind headers when | 4 | Subject: [PATCH] libcxxabi: Find libunwind headers when |
@@ -17,10 +17,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
17 | 1 file changed, 11 insertions(+), 10 deletions(-) | 17 | 1 file changed, 11 insertions(+), 10 deletions(-) |
18 | 18 | ||
19 | diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt | 19 | diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt |
20 | index 59d99971a76..b0f51ebee3e 100644 | 20 | index 426c855288fc..06a62c642898 100644 |
21 | --- a/libcxxabi/CMakeLists.txt | 21 | --- a/libcxxabi/CMakeLists.txt |
22 | +++ b/libcxxabi/CMakeLists.txt | 22 | +++ b/libcxxabi/CMakeLists.txt |
23 | @@ -497,14 +497,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") | 23 | @@ -478,14 +478,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") |
24 | # Setup Source Code | 24 | # Setup Source Code |
25 | #=============================================================================== | 25 | #=============================================================================== |
26 | 26 | ||
@@ -36,7 +36,7 @@ index 59d99971a76..b0f51ebee3e 100644 | |||
36 | PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} | 36 | PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} |
37 | ${LIBCXXABI_LIBUNWIND_PATH}/include | 37 | ${LIBCXXABI_LIBUNWIND_PATH}/include |
38 | ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} | 38 | ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} |
39 | @@ -515,15 +510,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) | 39 | @@ -496,15 +491,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) |
40 | NO_CMAKE_FIND_ROOT_PATH | 40 | NO_CMAKE_FIND_ROOT_PATH |
41 | ) | 41 | ) |
42 | 42 | ||
diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index 4c8bc63..e8536d3 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 57ba81bfe82f18899b1c846bee6276b1b43ce4cf Mon Sep 17 00:00:00 2001 | 1 | From cfeba7ac05c96abddfad1eeb827ba8d0c968ec94 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: Sun, 19 Apr 2015 15:16:23 -0700 | 3 | Date: Sun, 19 Apr 2015 15:16:23 -0700 |
4 | Subject: [PATCH] compiler-rt: support a new embedded linux target | 4 | Subject: [PATCH] compiler-rt: support a new embedded linux target |
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | create mode 100644 compiler-rt/make/platform/clang_linux_embedded_test_input.c | 13 | create mode 100644 compiler-rt/make/platform/clang_linux_embedded_test_input.c |
14 | 14 | ||
15 | diff --git a/compiler-rt/lib/builtins/int_util.c b/compiler-rt/lib/builtins/int_util.c | 15 | diff --git a/compiler-rt/lib/builtins/int_util.c b/compiler-rt/lib/builtins/int_util.c |
16 | index 226a6e93440..efc977acbb3 100644 | 16 | index 226a6e93440d..efc977acbb39 100644 |
17 | --- a/compiler-rt/lib/builtins/int_util.c | 17 | --- a/compiler-rt/lib/builtins/int_util.c |
18 | +++ b/compiler-rt/lib/builtins/int_util.c | 18 | +++ b/compiler-rt/lib/builtins/int_util.c |
19 | @@ -54,7 +54,7 @@ void __compilerrt_abort_impl(const char *file, int line, const char *function) { | 19 | @@ -54,7 +54,7 @@ void __compilerrt_abort_impl(const char *file, int line, const char *function) { |
@@ -27,7 +27,7 @@ index 226a6e93440..efc977acbb3 100644 | |||
27 | __attribute__((weak)) | 27 | __attribute__((weak)) |
28 | diff --git a/compiler-rt/make/platform/clang_linux_embedded.mk b/compiler-rt/make/platform/clang_linux_embedded.mk | 28 | diff --git a/compiler-rt/make/platform/clang_linux_embedded.mk b/compiler-rt/make/platform/clang_linux_embedded.mk |
29 | new file mode 100644 | 29 | new file mode 100644 |
30 | index 00000000000..d0a890075a1 | 30 | index 000000000000..d0a890075a1c |
31 | --- /dev/null | 31 | --- /dev/null |
32 | +++ b/compiler-rt/make/platform/clang_linux_embedded.mk | 32 | +++ b/compiler-rt/make/platform/clang_linux_embedded.mk |
33 | @@ -0,0 +1,286 @@ | 33 | @@ -0,0 +1,286 @@ |
@@ -319,4 +319,4 @@ index 00000000000..d0a890075a1 | |||
319 | +FUNCTIONS.hard_pic.x86_64 := $(FUNCTIONS_X86_64) | 319 | +FUNCTIONS.hard_pic.x86_64 := $(FUNCTIONS_X86_64) |
320 | diff --git a/compiler-rt/make/platform/clang_linux_embedded_test_input.c b/compiler-rt/make/platform/clang_linux_embedded_test_input.c | 320 | diff --git a/compiler-rt/make/platform/clang_linux_embedded_test_input.c b/compiler-rt/make/platform/clang_linux_embedded_test_input.c |
321 | new file mode 100644 | 321 | new file mode 100644 |
322 | index 00000000000..e69de29bb2d | 322 | index 000000000000..e69de29bb2d1 |
diff --git a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index dfbfb53..8b8edd8 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 1ecabb645e30330b82754b133f685d96c3e1ee42 Mon Sep 17 00:00:00 2001 | 1 | From 6c786d55d560abca076b7c1b718cdcb31ef5b388 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: Thu, 19 May 2016 23:11:45 -0700 | 3 | Date: Thu, 19 May 2016 23:11:45 -0700 |
4 | Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use | 4 | Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use |
@@ -20,10 +20,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
20 | 1 file changed, 10 insertions(+), 1 deletion(-) | 20 | 1 file changed, 10 insertions(+), 1 deletion(-) |
21 | 21 | ||
22 | diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt | 22 | diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt |
23 | index 8d768a404f2..1b1a29dc25a 100644 | 23 | index b44ad2c2118e..ed8f4bd80e93 100644 |
24 | --- a/compiler-rt/CMakeLists.txt | 24 | --- a/compiler-rt/CMakeLists.txt |
25 | +++ b/compiler-rt/CMakeLists.txt | 25 | +++ b/compiler-rt/CMakeLists.txt |
26 | @@ -74,7 +74,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL | 26 | @@ -72,7 +72,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL |
27 | "Build for a bare-metal target.") | 27 | "Build for a bare-metal target.") |
28 | 28 | ||
29 | if (COMPILER_RT_STANDALONE_BUILD) | 29 | if (COMPILER_RT_STANDALONE_BUILD) |
diff --git a/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch b/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch new file mode 100644 index 0000000..97d57c2 --- /dev/null +++ b/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 121a71a3923dbace24dbb7bd25f9f286fb9f91fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 18 Jul 2016 08:05:02 +0000 | ||
4 | Subject: [PATCH] compiler-rt: Disable tsan on OE/glibc | ||
5 | |||
6 | It does not build see | ||
7 | http://lists.llvm.org/pipermail/llvm-dev/2016-July/102235.html | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | compiler-rt/cmake/config-ix.cmake | 2 +- | ||
12 | compiler-rt/test/sanitizer_common/CMakeLists.txt | 2 +- | ||
13 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake | ||
16 | index f81b8384cbd5..196aa62fd01c 100644 | ||
17 | --- a/compiler-rt/cmake/config-ix.cmake | ||
18 | +++ b/compiler-rt/cmake/config-ix.cmake | ||
19 | @@ -723,7 +723,7 @@ else() | ||
20 | endif() | ||
21 | |||
22 | if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND | ||
23 | - OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android|NetBSD") | ||
24 | + OS_NAME MATCHES "Darwin|FreeBSD|Android|NetBSD") | ||
25 | set(COMPILER_RT_HAS_TSAN TRUE) | ||
26 | else() | ||
27 | set(COMPILER_RT_HAS_TSAN FALSE) | ||
28 | diff --git a/compiler-rt/test/sanitizer_common/CMakeLists.txt b/compiler-rt/test/sanitizer_common/CMakeLists.txt | ||
29 | index 7f1b0f257716..2caf78be2511 100644 | ||
30 | --- a/compiler-rt/test/sanitizer_common/CMakeLists.txt | ||
31 | +++ b/compiler-rt/test/sanitizer_common/CMakeLists.txt | ||
32 | @@ -11,7 +11,7 @@ set(SANITIZER_COMMON_TESTSUITES) | ||
33 | # FIXME(dliew): We should switch to COMPILER_RT_SANITIZERS_TO_BUILD instead of | ||
34 | # the hard coded `SUPPORTED_TOOLS_INIT` list once we know that the other | ||
35 | # sanitizers work. | ||
36 | -set(SUPPORTED_TOOLS_INIT asan lsan msan tsan ubsan) | ||
37 | +set(SUPPORTED_TOOLS_INIT asan lsan msan ubsan) | ||
38 | set(SUPPORTED_TOOLS) | ||
39 | foreach(SANITIZER_TOOL ${SUPPORTED_TOOLS_INIT}) | ||
40 | string(TOUPPER ${SANITIZER_TOOL} SANITIZER_TOOL_UPPER) | ||
diff --git a/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index fd58c68..4e1120a 100644 --- a/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c3f0b7eb02d4b13400f0cf8d8e77f9e898f189e9 Mon Sep 17 00:00:00 2001 | 1 | From 4afcffd0c4b3317b5b5e08e3372b2923ab471e4b 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] llvm: TargetLibraryInfo: Undefine libc functions if they are | 4 | Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are |
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | 1 file changed, 21 insertions(+) | 13 | 1 file changed, 21 insertions(+) |
14 | 14 | ||
15 | diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def | 15 | diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def |
16 | index afed404f04c..876888656f2 100644 | 16 | index defc95d0062a..41d2099d0c5b 100644 |
17 | --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def | 17 | --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def |
18 | +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def | 18 | +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def |
19 | @@ -782,6 +782,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") | 19 | @@ -809,6 +809,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") |
20 | TLI_DEFINE_ENUM_INTERNAL(fopen) | 20 | TLI_DEFINE_ENUM_INTERNAL(fopen) |
21 | TLI_DEFINE_STRING_INTERNAL("fopen") | 21 | TLI_DEFINE_STRING_INTERNAL("fopen") |
22 | /// FILE *fopen64(const char *filename, const char *opentype) | 22 | /// FILE *fopen64(const char *filename, const char *opentype) |
@@ -26,7 +26,7 @@ index afed404f04c..876888656f2 100644 | |||
26 | TLI_DEFINE_ENUM_INTERNAL(fopen64) | 26 | TLI_DEFINE_ENUM_INTERNAL(fopen64) |
27 | TLI_DEFINE_STRING_INTERNAL("fopen64") | 27 | TLI_DEFINE_STRING_INTERNAL("fopen64") |
28 | /// int fork(); | 28 | /// int fork(); |
29 | @@ -829,6 +832,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") | 29 | @@ -856,6 +859,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") |
30 | /// int fseeko(FILE *stream, off_t offset, int whence); | 30 | /// int fseeko(FILE *stream, off_t offset, int whence); |
31 | TLI_DEFINE_ENUM_INTERNAL(fseeko) | 31 | TLI_DEFINE_ENUM_INTERNAL(fseeko) |
32 | TLI_DEFINE_STRING_INTERNAL("fseeko") | 32 | TLI_DEFINE_STRING_INTERNAL("fseeko") |
@@ -36,7 +36,7 @@ index afed404f04c..876888656f2 100644 | |||
36 | /// int fseeko64(FILE *stream, off64_t offset, int whence) | 36 | /// int fseeko64(FILE *stream, off64_t offset, int whence) |
37 | TLI_DEFINE_ENUM_INTERNAL(fseeko64) | 37 | TLI_DEFINE_ENUM_INTERNAL(fseeko64) |
38 | TLI_DEFINE_STRING_INTERNAL("fseeko64") | 38 | TLI_DEFINE_STRING_INTERNAL("fseeko64") |
39 | @@ -839,6 +845,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") | 39 | @@ -866,6 +872,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") |
40 | TLI_DEFINE_ENUM_INTERNAL(fstat) | 40 | TLI_DEFINE_ENUM_INTERNAL(fstat) |
41 | TLI_DEFINE_STRING_INTERNAL("fstat") | 41 | TLI_DEFINE_STRING_INTERNAL("fstat") |
42 | /// int fstat64(int filedes, struct stat64 *buf) | 42 | /// int fstat64(int filedes, struct stat64 *buf) |
@@ -46,7 +46,7 @@ index afed404f04c..876888656f2 100644 | |||
46 | TLI_DEFINE_ENUM_INTERNAL(fstat64) | 46 | TLI_DEFINE_ENUM_INTERNAL(fstat64) |
47 | TLI_DEFINE_STRING_INTERNAL("fstat64") | 47 | TLI_DEFINE_STRING_INTERNAL("fstat64") |
48 | /// int fstatvfs(int fildes, struct statvfs *buf); | 48 | /// int fstatvfs(int fildes, struct statvfs *buf); |
49 | @@ -854,6 +863,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") | 49 | @@ -881,6 +890,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") |
50 | TLI_DEFINE_ENUM_INTERNAL(ftello) | 50 | TLI_DEFINE_ENUM_INTERNAL(ftello) |
51 | TLI_DEFINE_STRING_INTERNAL("ftello") | 51 | TLI_DEFINE_STRING_INTERNAL("ftello") |
52 | /// off64_t ftello64(FILE *stream) | 52 | /// off64_t ftello64(FILE *stream) |
@@ -56,7 +56,7 @@ index afed404f04c..876888656f2 100644 | |||
56 | TLI_DEFINE_ENUM_INTERNAL(ftello64) | 56 | TLI_DEFINE_ENUM_INTERNAL(ftello64) |
57 | TLI_DEFINE_STRING_INTERNAL("ftello64") | 57 | TLI_DEFINE_STRING_INTERNAL("ftello64") |
58 | /// int ftrylockfile(FILE *file); | 58 | /// int ftrylockfile(FILE *file); |
59 | @@ -980,6 +992,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") | 59 | @@ -1007,6 +1019,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") |
60 | TLI_DEFINE_ENUM_INTERNAL(lstat) | 60 | TLI_DEFINE_ENUM_INTERNAL(lstat) |
61 | TLI_DEFINE_STRING_INTERNAL("lstat") | 61 | TLI_DEFINE_STRING_INTERNAL("lstat") |
62 | /// int lstat64(const char *path, struct stat64 *buf); | 62 | /// int lstat64(const char *path, struct stat64 *buf); |
@@ -66,7 +66,7 @@ index afed404f04c..876888656f2 100644 | |||
66 | TLI_DEFINE_ENUM_INTERNAL(lstat64) | 66 | TLI_DEFINE_ENUM_INTERNAL(lstat64) |
67 | TLI_DEFINE_STRING_INTERNAL("lstat64") | 67 | TLI_DEFINE_STRING_INTERNAL("lstat64") |
68 | /// void *malloc(size_t size); | 68 | /// void *malloc(size_t size); |
69 | @@ -1205,6 +1220,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") | 69 | @@ -1250,6 +1265,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") |
70 | TLI_DEFINE_ENUM_INTERNAL(stat) | 70 | TLI_DEFINE_ENUM_INTERNAL(stat) |
71 | TLI_DEFINE_STRING_INTERNAL("stat") | 71 | TLI_DEFINE_STRING_INTERNAL("stat") |
72 | /// int stat64(const char *path, struct stat64 *buf); | 72 | /// int stat64(const char *path, struct stat64 *buf); |
@@ -76,7 +76,7 @@ index afed404f04c..876888656f2 100644 | |||
76 | TLI_DEFINE_ENUM_INTERNAL(stat64) | 76 | TLI_DEFINE_ENUM_INTERNAL(stat64) |
77 | TLI_DEFINE_STRING_INTERNAL("stat64") | 77 | TLI_DEFINE_STRING_INTERNAL("stat64") |
78 | /// int statvfs(const char *path, struct statvfs *buf); | 78 | /// int statvfs(const char *path, struct statvfs *buf); |
79 | @@ -1340,6 +1358,9 @@ TLI_DEFINE_STRING_INTERNAL("times") | 79 | @@ -1385,6 +1403,9 @@ TLI_DEFINE_STRING_INTERNAL("times") |
80 | TLI_DEFINE_ENUM_INTERNAL(tmpfile) | 80 | TLI_DEFINE_ENUM_INTERNAL(tmpfile) |
81 | TLI_DEFINE_STRING_INTERNAL("tmpfile") | 81 | TLI_DEFINE_STRING_INTERNAL("tmpfile") |
82 | /// FILE *tmpfile64(void) | 82 | /// FILE *tmpfile64(void) |
diff --git a/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch index 804cde9..4df2d62 100644 --- a/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f9e72bc861144d8f77505ce833fc0c8397520e9b Mon Sep 17 00:00:00 2001 | 1 | From 4ed6b8848edbe1c453ce0d23d33551ff023f4fb2 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] llvm: allow env override of exe path | 4 | Subject: [PATCH] llvm: allow env override of exe path |
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | 1 file changed, 7 insertions(+) | 15 | 1 file changed, 7 insertions(+) |
16 | 16 | ||
17 | diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp | 17 | diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp |
18 | index 6c31df3e173..f34f3a935ad 100644 | 18 | index 1a2f04552d13..019d8f2b5c5e 100644 |
19 | --- a/llvm/tools/llvm-config/llvm-config.cpp | 19 | --- a/llvm/tools/llvm-config/llvm-config.cpp |
20 | +++ b/llvm/tools/llvm-config/llvm-config.cpp | 20 | +++ b/llvm/tools/llvm-config/llvm-config.cpp |
21 | @@ -225,6 +225,13 @@ Typical components:\n\ | 21 | @@ -247,6 +247,13 @@ Typical components:\n\ |
22 | 22 | ||
23 | /// Compute the path to the main executable. | 23 | /// Compute the path to the main executable. |
24 | std::string GetExecutablePath(const char *Argv0) { | 24 | std::string GetExecutablePath(const char *Argv0) { |
diff --git a/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch index 2d0cb1c..ea28de0 100644 --- a/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 2aa9b771b258b45e7de0bef6a99bcdd248ce3b17 Mon Sep 17 00:00:00 2001 | 1 | From 15008103e23b5e1cd65bcc32746aa41579583dc5 Mon Sep 17 00:00:00 2001 |
2 | From: Dan McGregor <dan.mcgregor@usask.ca> | 2 | From: Dan McGregor <dan.mcgregor@usask.ca> |
3 | Date: Wed, 26 Apr 2017 20:29:41 -0600 | 3 | Date: Wed, 26 Apr 2017 20:29:41 -0600 |
4 | Subject: [PATCH] clang: driver: Check sysroot for ldso path | 4 | Subject: [PATCH] clang: driver: Check sysroot for ldso path |
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
14 | 1 file changed, 16 insertions(+) | 14 | 1 file changed, 16 insertions(+) |
15 | 15 | ||
16 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp | 16 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp |
17 | index bff1ab1009b..02e3d676567 100644 | 17 | index 9663a7390ada..06b92cc0bf5b 100644 |
18 | --- a/clang/lib/Driver/ToolChains/Linux.cpp | 18 | --- a/clang/lib/Driver/ToolChains/Linux.cpp |
19 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp | 19 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp |
20 | @@ -596,11 +596,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 20 | @@ -507,11 +507,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
21 | LibDir = "lib64"; | 21 | LibDir = "lib64"; |
22 | Loader = | 22 | Loader = |
23 | (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; | 23 | (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; |
@@ -37,7 +37,7 @@ index bff1ab1009b..02e3d676567 100644 | |||
37 | break; | 37 | break; |
38 | case llvm::Triple::riscv32: { | 38 | case llvm::Triple::riscv32: { |
39 | StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); | 39 | StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); |
40 | @@ -622,6 +630,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 40 | @@ -533,6 +541,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
41 | case llvm::Triple::sparcv9: | 41 | case llvm::Triple::sparcv9: |
42 | LibDir = "lib64"; | 42 | LibDir = "lib64"; |
43 | Loader = "ld-linux.so.2"; | 43 | Loader = "ld-linux.so.2"; |
@@ -48,7 +48,7 @@ index bff1ab1009b..02e3d676567 100644 | |||
48 | break; | 48 | break; |
49 | case llvm::Triple::systemz: | 49 | case llvm::Triple::systemz: |
50 | LibDir = "lib"; | 50 | LibDir = "lib"; |
51 | @@ -636,6 +648,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 51 | @@ -547,6 +559,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
52 | 52 | ||
53 | LibDir = X32 ? "libx32" : "lib64"; | 53 | LibDir = X32 ? "libx32" : "lib64"; |
54 | Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; | 54 | Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; |
@@ -58,4 +58,4 @@ index bff1ab1009b..02e3d676567 100644 | |||
58 | + } | 58 | + } |
59 | break; | 59 | break; |
60 | } | 60 | } |
61 | } | 61 | case llvm::Triple::ve: |
diff --git a/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 51ce720..a0d116b 100644 --- a/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 42800fd6bf0040ddd0abf280ea205407e9e004b5 Mon Sep 17 00:00:00 2001 | 1 | From 1b2f69bc1938d4d65dd88c2e43e1bd160312d074 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: Thu, 19 May 2016 21:11:06 -0700 | 3 | Date: Thu, 19 May 2016 21:11:06 -0700 |
4 | Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl | 4 | Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl |
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | 1 file changed, 6 insertions(+) | 13 | 1 file changed, 6 insertions(+) |
14 | 14 | ||
15 | diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp | 15 | diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp |
16 | index da197e47662..4821cfebc21 100644 | 16 | index 1d8a3cdce92a..195a302c8771 100644 |
17 | --- a/clang/lib/Driver/ToolChains/Gnu.cpp | 17 | --- a/clang/lib/Driver/ToolChains/Gnu.cpp |
18 | +++ b/clang/lib/Driver/ToolChains/Gnu.cpp | 18 | +++ b/clang/lib/Driver/ToolChains/Gnu.cpp |
19 | @@ -583,6 +583,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, | 19 | @@ -628,6 +628,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, |
20 | if (IsIAMCU) | 20 | if (IsIAMCU) |
21 | CmdArgs.push_back("-lgloss"); | 21 | CmdArgs.push_back("-lgloss"); |
22 | 22 | ||
diff --git a/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 2de6618..8c2ddeb 100644 --- a/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d4719b78a4d59d572b9de7397d8179a5ed7460e9 Mon Sep 17 00:00:00 2001 | 1 | From 7ab52935bc6bd89529a2478af1ea2cdf192eb0d9 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: Tue, 10 May 2016 02:00:11 -0700 | 3 | Date: Tue, 10 May 2016 02:00:11 -0700 |
4 | Subject: [PATCH] clang: musl/ppc does not support 128-bit long double | 4 | Subject: [PATCH] clang: musl/ppc does not support 128-bit long double |
@@ -9,10 +9,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
9 | 1 file changed, 4 insertions(+) | 9 | 1 file changed, 4 insertions(+) |
10 | 10 | ||
11 | diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h | 11 | diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h |
12 | index 270aa7ff918..8b1bb167818 100644 | 12 | index 56c8f33ef221..b7e7edf270be 100644 |
13 | --- a/clang/lib/Basic/Targets/PPC.h | 13 | --- a/clang/lib/Basic/Targets/PPC.h |
14 | +++ b/clang/lib/Basic/Targets/PPC.h | 14 | +++ b/clang/lib/Basic/Targets/PPC.h |
15 | @@ -364,6 +364,10 @@ public: | 15 | @@ -386,6 +386,10 @@ public: |
16 | LongDoubleFormat = &llvm::APFloat::IEEEdouble(); | 16 | LongDoubleFormat = &llvm::APFloat::IEEEdouble(); |
17 | } | 17 | } |
18 | 18 | ||
diff --git a/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch index 418afba..88d1868 100644 --- a/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 90ac3c6f6407ed40aa76e779ddbcfc0d24c58780 Mon Sep 17 00:00:00 2001 | 1 | From af7639bf4db497300060a22f2cc94b37145b8db5 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: Thu, 16 Mar 2017 09:02:13 -0700 | 3 | Date: Thu, 16 Mar 2017 09:02:13 -0700 |
4 | Subject: [PATCH] clang: Prepend trailing '/' to sysroot | 4 | Subject: [PATCH] clang: Prepend trailing '/' to sysroot |
@@ -24,15 +24,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | 24 | 1 file changed, 1 insertion(+), 1 deletion(-) |
25 | 25 | ||
26 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp | 26 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp |
27 | index 02e3d676567..d95da11e351 100644 | 27 | index 06b92cc0bf5b..726308413dc9 100644 |
28 | --- a/clang/lib/Driver/ToolChains/Linux.cpp | 28 | --- a/clang/lib/Driver/ToolChains/Linux.cpp |
29 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp | 29 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp |
30 | @@ -223,7 +223,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) | 30 | @@ -218,7 +218,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) |
31 | Multilibs = GCCInstallation.getMultilibs(); | 31 | Multilibs = GCCInstallation.getMultilibs(); |
32 | SelectedMultilib = GCCInstallation.getMultilib(); | 32 | SelectedMultilib = GCCInstallation.getMultilib(); |
33 | llvm::Triple::ArchType Arch = Triple.getArch(); | 33 | llvm::Triple::ArchType Arch = Triple.getArch(); |
34 | - std::string SysRoot = computeSysRoot(); | 34 | - std::string SysRoot = computeSysRoot(); |
35 | + std::string SysRoot = computeSysRoot() + "/"; | 35 | + std::string SysRoot = computeSysRoot() + "/"; |
36 | ToolChain::path_list &PPaths = getProgramPaths(); | ||
36 | 37 | ||
37 | // Cross-compiling binutils and GCC installations (vanilla and openSUSE at | 38 | Generic_GCC::PushPPaths(PPaths); |
38 | // least) put various tools in a triple-prefixed directory off of the parent | ||
diff --git a/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 9316157..1e9d395 100644 --- a/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 805b4ce637faedee91bb92fdae273b01bd5aa363 Mon Sep 17 00:00:00 2001 | 1 | From f946307a70619c45919ac06fa37c267fd25c3ec8 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: Thu, 16 Mar 2017 19:06:26 -0700 | 3 | Date: Thu, 16 Mar 2017 19:06:26 -0700 |
4 | Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime | 4 | Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime |
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | 1 file changed, 5 insertions(+), 1 deletion(-) | 15 | 1 file changed, 5 insertions(+), 1 deletion(-) |
16 | 16 | ||
17 | diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp | 17 | diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp |
18 | index cab97b1a601..059a5e62c40 100644 | 18 | index b2ddef141a75..784a946b453f 100644 |
19 | --- a/clang/lib/Driver/ToolChain.cpp | 19 | --- a/clang/lib/Driver/ToolChain.cpp |
20 | +++ b/clang/lib/Driver/ToolChain.cpp | 20 | +++ b/clang/lib/Driver/ToolChain.cpp |
21 | @@ -14,6 +14,7 @@ | 21 | @@ -14,6 +14,7 @@ |
@@ -26,7 +26,7 @@ index cab97b1a601..059a5e62c40 100644 | |||
26 | #include "clang/Config/config.h" | 26 | #include "clang/Config/config.h" |
27 | #include "clang/Driver/Action.h" | 27 | #include "clang/Driver/Action.h" |
28 | #include "clang/Driver/Driver.h" | 28 | #include "clang/Driver/Driver.h" |
29 | @@ -379,7 +380,10 @@ StringRef ToolChain::getOSLibName() const { | 29 | @@ -404,7 +405,10 @@ StringRef ToolChain::getOSLibName() const { |
30 | } | 30 | } |
31 | 31 | ||
32 | std::string ToolChain::getCompilerRTPath() const { | 32 | std::string ToolChain::getCompilerRTPath() const { |
diff --git a/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch index b1b3f05..1b07e5a 100644 --- a/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 56a43865d296b6b3293cd35f3e4732dac8b00523 Mon Sep 17 00:00:00 2001 | 1 | From 9c61a33cec25c8f2e0a90d5109808131d2e51c2d 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: Sun, 21 May 2017 15:38:25 -0700 | 3 | Date: Sun, 21 May 2017 15:38:25 -0700 |
4 | Subject: [PATCH] clang: Define / releative gcc installation dir | 4 | Subject: [PATCH] clang: Define / releative gcc installation dir |
@@ -10,20 +10,36 @@ installation in OE | |||
10 | 10 | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | --- | 12 | --- |
13 | clang/lib/Driver/ToolChains/Gnu.cpp | 3 +++ | 13 | clang/lib/Driver/ToolChains/Gnu.cpp | 12 ++++++------ |
14 | 1 file changed, 3 insertions(+) | 14 | 1 file changed, 6 insertions(+), 6 deletions(-) |
15 | 15 | ||
16 | diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp | 16 | diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp |
17 | index 4821cfebc21..0c8d9e2f475 100644 | 17 | index 195a302c8771..05d1d3003881 100644 |
18 | --- a/clang/lib/Driver/ToolChains/Gnu.cpp | 18 | --- a/clang/lib/Driver/ToolChains/Gnu.cpp |
19 | +++ b/clang/lib/Driver/ToolChains/Gnu.cpp | 19 | +++ b/clang/lib/Driver/ToolChains/Gnu.cpp |
20 | @@ -2428,6 +2428,9 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( | 20 | @@ -2514,12 +2514,6 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( |
21 | {"gcc-cross/" + CandidateTriple.str(), "../..", | 21 | // Whether this library suffix is relevant for the triple. |
22 | TargetTriple.getOS() != llvm::Triple::Solaris}, | 22 | bool Active; |
23 | 23 | } Suffixes[] = { | |
24 | + // OE cross-compilers path structures | 24 | - // This is the normal place. |
25 | + {"/" + CandidateTriple.str(), "..", true}, | 25 | - {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists}, |
26 | + | 26 | - |
27 | - // Debian puts cross-compilers in gcc-cross. | ||
28 | - {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists}, | ||
29 | - | ||
27 | // The Freescale PPC SDK has the gcc libraries in | 30 | // The Freescale PPC SDK has the gcc libraries in |
28 | // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well. Only do | 31 | // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well. Only do |
29 | // this on Freescale triples, though, since some systems put a *lot* of | 32 | // this on Freescale triples, though, since some systems put a *lot* of |
33 | @@ -2528,6 +2522,12 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( | ||
34 | TargetTriple.getVendor() == llvm::Triple::Freescale || | ||
35 | TargetTriple.getVendor() == llvm::Triple::OpenEmbedded}, | ||
36 | |||
37 | + // This is the normal place. | ||
38 | + {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists}, | ||
39 | + | ||
40 | + // Debian puts cross-compilers in gcc-cross. | ||
41 | + {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists}, | ||
42 | + | ||
43 | // Natively multiarch systems sometimes put the GCC triple-specific | ||
44 | // directory within their multiarch lib directory, resulting in the | ||
45 | // triple appearing twice. | ||
diff --git a/recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch b/recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch index 71c1c52..67cc8de 100644 --- a/recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch +++ b/recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From b11d1668890778d6d55cadeaec4f6c2e291b583b Mon Sep 17 00:00:00 2001 | 1 | From 3166a3b59f406de57f04a0b6fd0f3f1eabfaaa37 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: Wed, 16 Aug 2017 15:16:15 -0700 | 3 | Date: Wed, 16 Aug 2017 15:16:15 -0700 |
4 | Subject: [PATCH] clang: Fix ldso for musl on x86 and x32 architectures | 4 | Subject: [PATCH] clang: Fix ldso for musl on x86 and x32 architectures |
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
14 | 1 file changed, 8 insertions(+) | 14 | 1 file changed, 8 insertions(+) |
15 | 15 | ||
16 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp | 16 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp |
17 | index d95da11e351..0a4644dab9f 100644 | 17 | index 726308413dc9..b64396647882 100644 |
18 | --- a/clang/lib/Driver/ToolChains/Linux.cpp | 18 | --- a/clang/lib/Driver/ToolChains/Linux.cpp |
19 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp | 19 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp |
20 | @@ -519,6 +519,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 20 | @@ -426,6 +426,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
21 | if (Triple.isMusl()) { | 21 | if (Triple.isMusl()) { |
22 | std::string ArchName; | 22 | std::string ArchName; |
23 | bool IsArm = false; | 23 | bool IsArm = false; |
@@ -25,7 +25,7 @@ index d95da11e351..0a4644dab9f 100644 | |||
25 | 25 | ||
26 | switch (Arch) { | 26 | switch (Arch) { |
27 | case llvm::Triple::arm: | 27 | case llvm::Triple::arm: |
28 | @@ -531,6 +532,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 28 | @@ -438,6 +439,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
29 | ArchName = "armeb"; | 29 | ArchName = "armeb"; |
30 | IsArm = true; | 30 | IsArm = true; |
31 | break; | 31 | break; |
diff --git a/recipes-devtools/clang/clang/0015-clang-scan-view-needs-python-2.x.patch b/recipes-devtools/clang/clang/0015-clang-scan-view-needs-python-2.x.patch index 7b762f1..46b6995 100644 --- a/recipes-devtools/clang/clang/0015-clang-scan-view-needs-python-2.x.patch +++ b/recipes-devtools/clang/clang/0015-clang-scan-view-needs-python-2.x.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0f969665b80310b90bcb304b2e60c4493687c5a6 Mon Sep 17 00:00:00 2001 | 1 | From bd42395fa181d5821f0d756d12c534f2cda525c0 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: Tue, 15 May 2018 10:28:43 -0700 | 3 | Date: Tue, 15 May 2018 10:28:43 -0700 |
4 | Subject: [PATCH] clang: scan-view needs python 2.x | 4 | Subject: [PATCH] clang: scan-view needs python 2.x |
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
14 | 14 | ||
15 | diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view | 15 | diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view |
16 | index 6165432e7af..04ad518a60c 100755 | 16 | index 6165432e7af8..04ad518a60cd 100755 |
17 | --- a/clang/tools/scan-view/bin/scan-view | 17 | --- a/clang/tools/scan-view/bin/scan-view |
18 | +++ b/clang/tools/scan-view/bin/scan-view | 18 | +++ b/clang/tools/scan-view/bin/scan-view |
19 | @@ -1,4 +1,4 @@ | 19 | @@ -1,4 +1,4 @@ |
diff --git a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index b77f433..a785bda 100644 --- a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a1fa38408f7524c8452709574b3d83b72ebcfa38 Mon Sep 17 00:00:00 2001 | 1 | From c309e121d6aca050119084e3e98371cd8e44ecca 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: Wed, 31 Jul 2019 22:51:39 -0700 | 3 | Date: Wed, 31 Jul 2019 22:51:39 -0700 |
4 | Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static | 4 | Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static |
@@ -20,15 +20,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
20 | 1 file changed, 6 insertions(+), 1 deletion(-) | 20 | 1 file changed, 6 insertions(+), 1 deletion(-) |
21 | 21 | ||
22 | diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp | 22 | diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp |
23 | index 37ec7346857..c849b2242e9 100644 | 23 | index bcaea71dca94..95b806e29ef2 100644 |
24 | --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp | 24 | --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp |
25 | +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp | 25 | +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp |
26 | @@ -1211,8 +1211,13 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, | 26 | @@ -1423,8 +1423,13 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, |
27 | case ToolChain::UNW_CompilerRT: | 27 | // Let the linker choose between libunwind.dll.a and libunwind.a |
28 | if (LGT == LibGccType::StaticLibGcc) | 28 | // depending on what's available, and depending on the -static flag |
29 | CmdArgs.push_back("-l:libunwind.a"); | 29 | CmdArgs.push_back("-lunwind"); |
30 | - else | 30 | - } else |
31 | + else { | 31 | + } else { |
32 | CmdArgs.push_back("-l:libunwind.so"); | 32 | CmdArgs.push_back("-l:libunwind.so"); |
33 | + if (Args.hasArg(options::OPT_static)) { | 33 | + if (Args.hasArg(options::OPT_static)) { |
34 | + CmdArgs.push_back("-lpthread"); | 34 | + CmdArgs.push_back("-lpthread"); |
diff --git a/recipes-devtools/clang/clang/0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index de92b2f..3f2e16b 100644 --- a/recipes-devtools/clang/clang/0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a415287545ffe17f7dbc743a033877fd239856b5 Mon Sep 17 00:00:00 2001 | 1 | From 00449fb89e8ab3b34f03d3a09a4d859e5d0a8245 Mon Sep 17 00:00:00 2001 |
2 | From: Anuj Mittal <anuj.mittal@intel.com> | 2 | From: Anuj Mittal <anuj.mittal@intel.com> |
3 | Date: Thu, 26 Dec 2019 12:56:16 -0800 | 3 | Date: Thu, 26 Dec 2019 12:56:16 -0800 |
4 | Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build | 4 | Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build |
@@ -10,7 +10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
10 | 1 file changed, 1 insertion(+) | 10 | 1 file changed, 1 insertion(+) |
11 | 11 | ||
12 | diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake | 12 | diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake |
13 | index 8a6e880c4e2..259211df18e 100644 | 13 | index 01cd37124841..f50be9d967df 100644 |
14 | --- a/llvm/cmake/modules/CrossCompile.cmake | 14 | --- a/llvm/cmake/modules/CrossCompile.cmake |
15 | +++ b/llvm/cmake/modules/CrossCompile.cmake | 15 | +++ b/llvm/cmake/modules/CrossCompile.cmake |
16 | @@ -79,6 +79,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) | 16 | @@ -79,6 +79,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) |
diff --git a/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch b/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch deleted file mode 100644 index f5bc773..0000000 --- a/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From cfe4473e8447cd2c73a2f42c9c235ce1dfd08bec Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 11 Dec 2019 10:23:15 -0800 | ||
4 | Subject: [PATCH] libclang: Use CMAKE_DL_LIBS for deducing libdl | ||
5 | |||
6 | This helps in getting right settings for libdl irrespective of platform | ||
7 | it also fixes build with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON | ||
8 | |||
9 | Fixes | ||
10 | |||
11 | tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexer.cpp.o: In function clang::CIndexer::getClangResourcesPath[abi:cxx11]()': 2019-12-06T06:04:39.2987601Z | CIndexer.cpp:(.text._ZN5clang8CIndexer21getClangResourcesPathB5cxx11Ev+0x8b): undefined reference to dladdr' | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | clang/tools/libclang/CMakeLists.txt | 5 ++--- | ||
16 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt | ||
19 | index bd0c945a5e1..723fa95f14b 100644 | ||
20 | --- a/clang/tools/libclang/CMakeLists.txt | ||
21 | +++ b/clang/tools/libclang/CMakeLists.txt | ||
22 | @@ -60,9 +60,8 @@ if (TARGET clangTidyPlugin) | ||
23 | endif() | ||
24 | endif () | ||
25 | |||
26 | -find_library(DL_LIBRARY_PATH dl) | ||
27 | -if (DL_LIBRARY_PATH) | ||
28 | - list(APPEND LIBS dl) | ||
29 | +if (HAVE_LIBDL) | ||
30 | + list(APPEND LIBS ${CMAKE_DL_LIBS}) | ||
31 | endif() | ||
32 | |||
33 | option(LIBCLANG_BUILD_STATIC | ||
diff --git a/recipes-devtools/clang/clang/0019-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0018-Check-for-atomic-double-intrinsics.patch index 0885648..800b58e 100644 --- a/recipes-devtools/clang/clang/0019-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0018-Check-for-atomic-double-intrinsics.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From dd6a749dee10f537fc7cb558ace319041a63e5f3 Mon Sep 17 00:00:00 2001 | 1 | From 761be2d8d20d9ebe93fa33719bdd0d25396d812d 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: Mon, 18 Nov 2019 17:00:29 -0800 | 3 | Date: Mon, 18 Nov 2019 17:00:29 -0800 |
4 | Subject: [PATCH] Check for atomic<double> intrinsics | 4 | Subject: [PATCH] Check for atomic<double> intrinsics |
@@ -15,16 +15,17 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | 1 file changed, 2 insertions(+), 1 deletion(-) | 15 | 1 file changed, 2 insertions(+), 1 deletion(-) |
16 | 16 | ||
17 | diff --git a/llvm/cmake/modules/CheckAtomic.cmake b/llvm/cmake/modules/CheckAtomic.cmake | 17 | diff --git a/llvm/cmake/modules/CheckAtomic.cmake b/llvm/cmake/modules/CheckAtomic.cmake |
18 | index 29f3bdd57f0..6460842cf63 100644 | 18 | index 04eed1448482..e890cfecd139 100644 |
19 | --- a/llvm/cmake/modules/CheckAtomic.cmake | 19 | --- a/llvm/cmake/modules/CheckAtomic.cmake |
20 | +++ b/llvm/cmake/modules/CheckAtomic.cmake | 20 | +++ b/llvm/cmake/modules/CheckAtomic.cmake |
21 | @@ -26,9 +26,10 @@ function(check_working_cxx_atomics64 varname) | 21 | @@ -30,10 +30,11 @@ function(check_working_cxx_atomics64 varname) |
22 | #include <atomic> | 22 | #include <atomic> |
23 | #include <cstdint> | 23 | #include <cstdint> |
24 | std::atomic<uint64_t> x (0); | 24 | std::atomic<uint64_t> x (0); |
25 | +std::atomic<double> y (0); | 25 | +std::atomic<double> y (0); |
26 | int main() { | 26 | int main() { |
27 | uint64_t i = x.load(std::memory_order_relaxed); | 27 | uint64_t i = x.load(std::memory_order_relaxed); |
28 | (void)i; | ||
28 | - return 0; | 29 | - return 0; |
29 | + return int(y); | 30 | + return int(y); |
30 | } | 31 | } |
diff --git a/recipes-devtools/clang/clang/0020-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0019-clang-Enable-SSP-and-PIE-by-default.patch index 39d500c..164503f 100644 --- a/recipes-devtools/clang/clang/0020-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0019-clang-Enable-SSP-and-PIE-by-default.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From b826518219333760c4632062dc586bbe17a055e6 Mon Sep 17 00:00:00 2001 | 1 | From d0f788c1fb3d00350c51e88302ecbcf3506e4b53 Mon Sep 17 00:00:00 2001 |
2 | From: Evangelos Foutras <evangelos@foutrelis.com> | 2 | From: Evangelos Foutras <evangelos@foutrelis.com> |
3 | Date: Thu, 26 Dec 2019 15:46:19 -0800 | 3 | Date: Thu, 26 Dec 2019 15:46:19 -0800 |
4 | Subject: [PATCH] clang: Enable SSP and PIE by default | 4 | Subject: [PATCH] clang: Enable SSP and PIE by default |
@@ -21,8 +21,8 @@ Taken from ArchLinux - https://git.archlinux.org/svntogit/packages.git/plain/tru | |||
21 | 21 | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
23 | --- | 23 | --- |
24 | clang/lib/Driver/ToolChains/Linux.cpp | 14 ++++++++++++-- | 24 | clang/lib/Driver/ToolChains/Linux.cpp | 10 ++++++++-- |
25 | clang/lib/Driver/ToolChains/Linux.h | 1 + | 25 | clang/lib/Driver/ToolChains/Linux.h | 4 ++++ |
26 | clang/test/Driver/cross-linux.c | 16 ++++++++-------- | 26 | clang/test/Driver/cross-linux.c | 16 ++++++++-------- |
27 | clang/test/Driver/env.c | 2 +- | 27 | clang/test/Driver/env.c | 2 +- |
28 | clang/test/Driver/fsanitize.c | 14 +++++++------- | 28 | clang/test/Driver/fsanitize.c | 14 +++++++------- |
@@ -34,13 +34,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
34 | clang/test/Driver/riscv32-toolchain.c | 4 ++-- | 34 | clang/test/Driver/riscv32-toolchain.c | 4 ++-- |
35 | clang/test/Driver/riscv64-toolchain.c | 4 ++-- | 35 | clang/test/Driver/riscv64-toolchain.c | 4 ++-- |
36 | clang/test/Driver/stack-protector.c | 4 ++-- | 36 | clang/test/Driver/stack-protector.c | 4 ++-- |
37 | 13 files changed, 43 insertions(+), 30 deletions(-) | 37 | 13 files changed, 42 insertions(+), 30 deletions(-) |
38 | 38 | ||
39 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp | 39 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp |
40 | index 0a4644dab9f..fb579e7ad60 100644 | 40 | index b64396647882..604024bb3df4 100644 |
41 | --- a/clang/lib/Driver/ToolChains/Linux.cpp | 41 | --- a/clang/lib/Driver/ToolChains/Linux.cpp |
42 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp | 42 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp |
43 | @@ -941,8 +941,18 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, | 43 | @@ -856,8 +856,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, |
44 | } | 44 | } |
45 | 45 | ||
46 | bool Linux::isPIEDefault() const { | 46 | bool Linux::isPIEDefault() const { |
@@ -54,27 +54,26 @@ index 0a4644dab9f..fb579e7ad60 100644 | |||
54 | + getTriple().isMusl() || getSanitizerArgs().requiresPIE(); | 54 | + getTriple().isMusl() || getSanitizerArgs().requiresPIE(); |
55 | + | 55 | + |
56 | + return true; | 56 | + return true; |
57 | +} | ||
58 | + | ||
59 | +unsigned Linux::GetDefaultStackProtectorLevel(bool KernelOrKext) const { | ||
60 | + return 2; | ||
61 | } | 57 | } |
62 | 58 | ||
63 | bool Linux::isNoExecStackDefault() const { | 59 | bool Linux::isNoExecStackDefault() const { |
64 | diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h | 60 | diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h |
65 | index f5518eac218..2d4973cf40c 100644 | 61 | index 6b16b0e64990..582d4bef81df 100644 |
66 | --- a/clang/lib/Driver/ToolChains/Linux.h | 62 | --- a/clang/lib/Driver/ToolChains/Linux.h |
67 | +++ b/clang/lib/Driver/ToolChains/Linux.h | 63 | +++ b/clang/lib/Driver/ToolChains/Linux.h |
68 | @@ -37,6 +37,7 @@ public: | 64 | @@ -39,6 +39,10 @@ public: |
69 | bool isPIEDefault() const override; | 65 | bool isPIEDefault() const override; |
70 | bool isNoExecStackDefault() const override; | 66 | bool isNoExecStackDefault() const override; |
71 | bool IsMathErrnoDefault() const override; | 67 | bool IsMathErrnoDefault() const override; |
72 | + unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override; | 68 | + virtual LangOptions::StackProtectorMode |
69 | + GetDefaultStackProtectorLevel(bool KernelOrKext) const override { | ||
70 | + return LangOptions::SSPStrong; | ||
71 | + } | ||
73 | SanitizerMask getSupportedSanitizers() const override; | 72 | SanitizerMask getSupportedSanitizers() const override; |
74 | void addProfileRTLibs(const llvm::opt::ArgList &Args, | 73 | void addProfileRTLibs(const llvm::opt::ArgList &Args, |
75 | llvm::opt::ArgStringList &CmdArgs) const override; | 74 | llvm::opt::ArgStringList &CmdArgs) const override; |
76 | diff --git a/clang/test/Driver/cross-linux.c b/clang/test/Driver/cross-linux.c | 75 | diff --git a/clang/test/Driver/cross-linux.c b/clang/test/Driver/cross-linux.c |
77 | index 6c2dab26069..c28c5653e34 100644 | 76 | index 6c2dab260695..c28c5653e348 100644 |
78 | --- a/clang/test/Driver/cross-linux.c | 77 | --- a/clang/test/Driver/cross-linux.c |
79 | +++ b/clang/test/Driver/cross-linux.c | 78 | +++ b/clang/test/Driver/cross-linux.c |
80 | @@ -42,8 +42,8 @@ | 79 | @@ -42,8 +42,8 @@ |
@@ -122,7 +121,7 @@ index 6c2dab26069..c28c5653e34 100644 | |||
122 | // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" | 121 | // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" |
123 | // CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib" | 122 | // CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib" |
124 | diff --git a/clang/test/Driver/env.c b/clang/test/Driver/env.c | 123 | diff --git a/clang/test/Driver/env.c b/clang/test/Driver/env.c |
125 | index 0371bc91c4a..ea89f525121 100644 | 124 | index 0371bc91c4a3..ea89f5251217 100644 |
126 | --- a/clang/test/Driver/env.c | 125 | --- a/clang/test/Driver/env.c |
127 | +++ b/clang/test/Driver/env.c | 126 | +++ b/clang/test/Driver/env.c |
128 | @@ -20,7 +20,7 @@ | 127 | @@ -20,7 +20,7 @@ |
@@ -135,10 +134,10 @@ index 0371bc91c4a..ea89f525121 100644 | |||
135 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" | 134 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" |
136 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." | 135 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." |
137 | diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c | 136 | diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c |
138 | index f02f94d8c5a..358917588c7 100644 | 137 | index 8926d55a0cf4..40f628ccae45 100644 |
139 | --- a/clang/test/Driver/fsanitize.c | 138 | --- a/clang/test/Driver/fsanitize.c |
140 | +++ b/clang/test/Driver/fsanitize.c | 139 | +++ b/clang/test/Driver/fsanitize.c |
141 | @@ -328,15 +328,15 @@ | 140 | @@ -330,15 +330,15 @@ |
142 | // RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1 | 141 | // RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1 |
143 | // OK | 142 | // OK |
144 | 143 | ||
@@ -158,7 +157,7 @@ index f02f94d8c5a..358917588c7 100644 | |||
158 | 157 | ||
159 | // CHECK-NO-PIE-NOT: "-pie" | 158 | // CHECK-NO-PIE-NOT: "-pie" |
160 | // CHECK-NO-PIE: "-mrelocation-model" "static" | 159 | // CHECK-NO-PIE: "-mrelocation-model" "static" |
161 | @@ -661,12 +661,12 @@ | 160 | @@ -667,12 +667,12 @@ |
162 | // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP | 161 | // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP |
163 | // NOSP-NOT: "-fsanitize=safe-stack" | 162 | // NOSP-NOT: "-fsanitize=safe-stack" |
164 | 163 | ||
@@ -175,7 +174,7 @@ index f02f94d8c5a..358917588c7 100644 | |||
175 | // NO-SP-NOT: stack-protector | 174 | // NO-SP-NOT: stack-protector |
176 | // NO-SP: "-fsanitize=safe-stack" | 175 | // NO-SP: "-fsanitize=safe-stack" |
177 | diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp | 176 | diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp |
178 | index 6c872f4255c..f5006d1dd9a 100644 | 177 | index 6c872f4255c3..f5006d1dd9ab 100644 |
179 | --- a/clang/test/Driver/gcc-toolchain.cpp | 178 | --- a/clang/test/Driver/gcc-toolchain.cpp |
180 | +++ b/clang/test/Driver/gcc-toolchain.cpp | 179 | +++ b/clang/test/Driver/gcc-toolchain.cpp |
181 | @@ -26,6 +26,6 @@ | 180 | @@ -26,6 +26,6 @@ |
@@ -187,10 +186,10 @@ index 6c872f4255c..f5006d1dd9a 100644 | |||
187 | // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5" | 186 | // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5" |
188 | // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.." | 187 | // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.." |
189 | diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c | 188 | diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c |
190 | index 44bff6f703a..6575d032f5d 100644 | 189 | index cc11f9fcba9e..1fe8b5db587b 100644 |
191 | --- a/clang/test/Driver/hexagon-toolchain-elf.c | 190 | --- a/clang/test/Driver/hexagon-toolchain-elf.c |
192 | +++ b/clang/test/Driver/hexagon-toolchain-elf.c | 191 | +++ b/clang/test/Driver/hexagon-toolchain-elf.c |
193 | @@ -470,7 +470,7 @@ | 192 | @@ -487,7 +487,7 @@ |
194 | // RUN: %s 2>&1 \ | 193 | // RUN: %s 2>&1 \ |
195 | // RUN: | FileCheck -check-prefix=CHECK042 %s | 194 | // RUN: | FileCheck -check-prefix=CHECK042 %s |
196 | // CHECK042: "-cc1" | 195 | // CHECK042: "-cc1" |
@@ -200,7 +199,7 @@ index 44bff6f703a..6575d032f5d 100644 | |||
200 | // CHECK042-NEXT: llvm-mc | 199 | // CHECK042-NEXT: llvm-mc |
201 | // CHECK042: "-gpsize=8" | 200 | // CHECK042: "-gpsize=8" |
202 | diff --git a/clang/test/Driver/linux-as.c b/clang/test/Driver/linux-as.c | 201 | diff --git a/clang/test/Driver/linux-as.c b/clang/test/Driver/linux-as.c |
203 | index 77ac05f3094..cb474f32898 100644 | 202 | index 0959bd7ba0a1..4056a672b6f9 100644 |
204 | --- a/clang/test/Driver/linux-as.c | 203 | --- a/clang/test/Driver/linux-as.c |
205 | +++ b/clang/test/Driver/linux-as.c | 204 | +++ b/clang/test/Driver/linux-as.c |
206 | @@ -164,7 +164,7 @@ | 205 | @@ -164,7 +164,7 @@ |
@@ -222,7 +221,7 @@ index 77ac05f3094..cb474f32898 100644 | |||
222 | // CHECK-SPARCV9PIC: as | 221 | // CHECK-SPARCV9PIC: as |
223 | // CHECK-SPARCV9PIC: -64 | 222 | // CHECK-SPARCV9PIC: -64 |
224 | diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c | 223 | diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c |
225 | index 51227550b52..d01d6627131 100644 | 224 | index 24d3c78643f8..9ea22e6e0f64 100644 |
226 | --- a/clang/test/Driver/linux-ld.c | 225 | --- a/clang/test/Driver/linux-ld.c |
227 | +++ b/clang/test/Driver/linux-ld.c | 226 | +++ b/clang/test/Driver/linux-ld.c |
228 | @@ -1,3 +1,5 @@ | 227 | @@ -1,3 +1,5 @@ |
@@ -232,28 +231,26 @@ index 51227550b52..d01d6627131 100644 | |||
232 | // sysroot to make these tests independent of the host system. | 231 | // sysroot to make these tests independent of the host system. |
233 | // | 232 | // |
234 | diff --git a/clang/test/Driver/ppc-abi.c b/clang/test/Driver/ppc-abi.c | 233 | diff --git a/clang/test/Driver/ppc-abi.c b/clang/test/Driver/ppc-abi.c |
235 | index acc4981a2ee..0d465516762 100644 | 234 | index a74a19953ca2..0ba4a14ab74f 100644 |
236 | --- a/clang/test/Driver/ppc-abi.c | 235 | --- a/clang/test/Driver/ppc-abi.c |
237 | +++ b/clang/test/Driver/ppc-abi.c | 236 | +++ b/clang/test/Driver/ppc-abi.c |
238 | @@ -32,11 +32,11 @@ | 237 | @@ -26,9 +26,9 @@ |
239 | 238 | ||
240 | // CHECK-ELFv1: "-mrelocation-model" "static" | 239 | // CHECK-ELFv1: "-mrelocation-model" "static" |
241 | // CHECK-ELFv1: "-target-abi" "elfv1" | 240 | // CHECK-ELFv1: "-target-abi" "elfv1" |
242 | -// CHECK-ELFv1-LE: "-mrelocation-model" "static" | 241 | -// CHECK-ELFv1-LE: "-mrelocation-model" "static" |
243 | +// CHECK-ELFv1-LE: "-mrelocation-model" "pic" "-pic-level" "2" | 242 | +// CHECK-ELFv1-LE: "-mrelocation-model" "pic" "-pic-level" "2" |
244 | // CHECK-ELFv1-LE: "-target-abi" "elfv1" | 243 | // CHECK-ELFv1-LE: "-target-abi" "elfv1" |
245 | // CHECK-ELFv1-QPX: "-mrelocation-model" "static" | ||
246 | // CHECK-ELFv1-QPX: "-target-abi" "elfv1-qpx" | ||
247 | -// CHECK-ELFv2: "-mrelocation-model" "static" | 244 | -// CHECK-ELFv2: "-mrelocation-model" "static" |
248 | +// CHECK-ELFv2: "-mrelocation-model" "pic" "-pic-level" "2" | 245 | +// CHECK-ELFv2: "-mrelocation-model" "pic" "-pic-level" "2" |
249 | // CHECK-ELFv2: "-target-abi" "elfv2" | 246 | // CHECK-ELFv2: "-target-abi" "elfv2" |
250 | // CHECK-ELFv2-BE: "-mrelocation-model" "static" | 247 | // CHECK-ELFv2-BE: "-mrelocation-model" "static" |
251 | // CHECK-ELFv2-BE: "-target-abi" "elfv2" | 248 | // CHECK-ELFv2-BE: "-target-abi" "elfv2" |
252 | diff --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c | 249 | diff --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c |
253 | index 2ff3a585bda..f923b728c0f 100644 | 250 | index a5852f5f3997..233d9ef003cf 100644 |
254 | --- a/clang/test/Driver/riscv32-toolchain.c | 251 | --- a/clang/test/Driver/riscv32-toolchain.c |
255 | +++ b/clang/test/Driver/riscv32-toolchain.c | 252 | +++ b/clang/test/Driver/riscv32-toolchain.c |
256 | @@ -76,7 +76,7 @@ | 253 | @@ -84,7 +84,7 @@ |
257 | // C-RV32-LINUX-MULTI-ILP32: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" | 254 | // C-RV32-LINUX-MULTI-ILP32: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" |
258 | // C-RV32-LINUX-MULTI-ILP32: "-m" "elf32lriscv" | 255 | // C-RV32-LINUX-MULTI-ILP32: "-m" "elf32lriscv" |
259 | // C-RV32-LINUX-MULTI-ILP32: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32.so.1" | 256 | // C-RV32-LINUX-MULTI-ILP32: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32.so.1" |
@@ -262,7 +259,7 @@ index 2ff3a585bda..f923b728c0f 100644 | |||
262 | // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib32/ilp32" | 259 | // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib32/ilp32" |
263 | // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32" | 260 | // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32" |
264 | // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32" | 261 | // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32" |
265 | @@ -91,7 +91,7 @@ | 262 | @@ -99,7 +99,7 @@ |
266 | // C-RV32-LINUX-MULTI-ILP32D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" | 263 | // C-RV32-LINUX-MULTI-ILP32D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" |
267 | // C-RV32-LINUX-MULTI-ILP32D: "-m" "elf32lriscv" | 264 | // C-RV32-LINUX-MULTI-ILP32D: "-m" "elf32lriscv" |
268 | // C-RV32-LINUX-MULTI-ILP32D: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32d.so.1" | 265 | // C-RV32-LINUX-MULTI-ILP32D: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32d.so.1" |
@@ -272,10 +269,10 @@ index 2ff3a585bda..f923b728c0f 100644 | |||
272 | // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32d" | 269 | // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32d" |
273 | // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32d" | 270 | // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32d" |
274 | diff --git a/clang/test/Driver/riscv64-toolchain.c b/clang/test/Driver/riscv64-toolchain.c | 271 | diff --git a/clang/test/Driver/riscv64-toolchain.c b/clang/test/Driver/riscv64-toolchain.c |
275 | index 42cac51de59..42a05e02fcc 100644 | 272 | index e727f20bb601..a801e5eee462 100644 |
276 | --- a/clang/test/Driver/riscv64-toolchain.c | 273 | --- a/clang/test/Driver/riscv64-toolchain.c |
277 | +++ b/clang/test/Driver/riscv64-toolchain.c | 274 | +++ b/clang/test/Driver/riscv64-toolchain.c |
278 | @@ -76,7 +76,7 @@ | 275 | @@ -84,7 +84,7 @@ |
279 | // C-RV64-LINUX-MULTI-LP64: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" | 276 | // C-RV64-LINUX-MULTI-LP64: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" |
280 | // C-RV64-LINUX-MULTI-LP64: "-m" "elf64lriscv" | 277 | // C-RV64-LINUX-MULTI-LP64: "-m" "elf64lriscv" |
281 | // C-RV64-LINUX-MULTI-LP64: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64.so.1" | 278 | // C-RV64-LINUX-MULTI-LP64: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64.so.1" |
@@ -284,7 +281,7 @@ index 42cac51de59..42a05e02fcc 100644 | |||
284 | // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib64/lp64" | 281 | // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib64/lp64" |
285 | // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64" | 282 | // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64" |
286 | // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64" | 283 | // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64" |
287 | @@ -91,7 +91,7 @@ | 284 | @@ -99,7 +99,7 @@ |
288 | // C-RV64-LINUX-MULTI-LP64D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" | 285 | // C-RV64-LINUX-MULTI-LP64D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" |
289 | // C-RV64-LINUX-MULTI-LP64D: "-m" "elf64lriscv" | 286 | // C-RV64-LINUX-MULTI-LP64D: "-m" "elf64lriscv" |
290 | // C-RV64-LINUX-MULTI-LP64D: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64d.so.1" | 287 | // C-RV64-LINUX-MULTI-LP64D: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64d.so.1" |
@@ -294,7 +291,7 @@ index 42cac51de59..42a05e02fcc 100644 | |||
294 | // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64d" | 291 | // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64d" |
295 | // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64d" | 292 | // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64d" |
296 | diff --git a/clang/test/Driver/stack-protector.c b/clang/test/Driver/stack-protector.c | 293 | diff --git a/clang/test/Driver/stack-protector.c b/clang/test/Driver/stack-protector.c |
297 | index a3e40b50eed..dfffe0d6cf8 100644 | 294 | index a3e40b50eed8..dfffe0d6cf85 100644 |
298 | --- a/clang/test/Driver/stack-protector.c | 295 | --- a/clang/test/Driver/stack-protector.c |
299 | +++ b/clang/test/Driver/stack-protector.c | 296 | +++ b/clang/test/Driver/stack-protector.c |
300 | @@ -3,11 +3,11 @@ | 297 | @@ -3,11 +3,11 @@ |
diff --git a/recipes-devtools/clang/clang/0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index ab406d0..1500fc9 100644 --- a/recipes-devtools/clang/clang/0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6330360e13936fca5625e39ceed7441b45c3efd3 Mon Sep 17 00:00:00 2001 | 1 | From 5c0a4264ad87c880ade430022e0f128da86bbf6d Mon Sep 17 00:00:00 2001 |
2 | From: Jeremy Puhlman <jpuhlman@mvista.com> | 2 | From: Jeremy Puhlman <jpuhlman@mvista.com> |
3 | Date: Thu, 16 Jan 2020 21:16:10 +0000 | 3 | Date: Thu, 16 Jan 2020 21:16:10 +0000 |
4 | Subject: [PATCH] libcxx: Add compiler runtime library to link step for libcxx | 4 | Subject: [PATCH] libcxx: Add compiler runtime library to link step for libcxx |
@@ -14,24 +14,24 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | 14 | 1 file changed, 2 insertions(+), 2 deletions(-) |
15 | 15 | ||
16 | diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt | 16 | diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt |
17 | index 120505fe18d..b337fa2e403 100644 | 17 | index 9965104cb5b2..bee4d80bc67a 100644 |
18 | --- a/libcxx/src/CMakeLists.txt | 18 | --- a/libcxx/src/CMakeLists.txt |
19 | +++ b/libcxx/src/CMakeLists.txt | 19 | +++ b/libcxx/src/CMakeLists.txt |
20 | @@ -160,7 +160,7 @@ if (LIBCXX_ENABLE_SHARED) | 20 | @@ -177,7 +177,7 @@ split_list(LIBCXX_LINK_FLAGS) |
21 | if(COMMAND llvm_setup_rpath) | 21 | if (LIBCXX_ENABLE_SHARED) |
22 | llvm_setup_rpath(cxx_shared) | 22 | add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) |
23 | endif() | 23 | target_link_libraries(cxx_shared PUBLIC cxx-headers |
24 | - target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES}) | 24 | - PRIVATE ${LIBCXX_LIBRARIES}) |
25 | + target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") | 25 | + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") |
26 | set_target_properties(cxx_shared | 26 | set_target_properties(cxx_shared |
27 | PROPERTIES | 27 | PROPERTIES |
28 | COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" | 28 | COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" |
29 | @@ -238,7 +238,7 @@ endif() | 29 | @@ -252,7 +252,7 @@ endif() |
30 | # Build the static library. | ||
31 | if (LIBCXX_ENABLE_STATIC) | 30 | if (LIBCXX_ENABLE_STATIC) |
32 | add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) | 31 | add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) |
33 | - target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES}) | 32 | target_link_libraries(cxx_static PUBLIC cxx-headers |
34 | + target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") | 33 | - PRIVATE ${LIBCXX_LIBRARIES}) |
34 | + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") | ||
35 | set(CMAKE_STATIC_LIBRARY_PREFIX "lib") | 35 | set(CMAKE_STATIC_LIBRARY_PREFIX "lib") |
36 | set_target_properties(cxx_static | 36 | set_target_properties(cxx_static |
37 | PROPERTIES | 37 | PROPERTIES |
diff --git a/recipes-devtools/clang/clang/0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index 5413693..a9cd7a7 100644 --- a/recipes-devtools/clang/clang/0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9f5949b795a92f85c98277fd8d72954fb52df164 Mon Sep 17 00:00:00 2001 | 1 | From 12fe6e45d18add7da95fe637f9e21425330666f9 Mon Sep 17 00:00:00 2001 |
2 | From: Ovidiu Panait <ovidiu.panait@windriver.com> | 2 | From: Ovidiu Panait <ovidiu.panait@windriver.com> |
3 | Date: Fri, 31 Jan 2020 10:56:11 +0200 | 3 | Date: Fri, 31 Jan 2020 10:56:11 +0200 |
4 | Subject: [PATCH] clang,llvm: cmake: Fix configure for packages using | 4 | Subject: [PATCH] clang,llvm: cmake: Fix configure for packages using |
@@ -32,10 +32,10 @@ Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | |||
32 | 3 files changed, 33 deletions(-) | 32 | 3 files changed, 33 deletions(-) |
33 | 33 | ||
34 | diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake | 34 | diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake |
35 | index 577cc11ab01..5c859d86069 100644 | 35 | index 704278a0e93b..6ea99c90772c 100644 |
36 | --- a/clang/cmake/modules/AddClang.cmake | 36 | --- a/clang/cmake/modules/AddClang.cmake |
37 | +++ b/clang/cmake/modules/AddClang.cmake | 37 | +++ b/clang/cmake/modules/AddClang.cmake |
38 | @@ -151,15 +151,8 @@ macro(add_clang_tool name) | 38 | @@ -161,15 +161,8 @@ macro(add_clang_tool name) |
39 | add_dependencies(${name} clang-resource-headers) | 39 | add_dependencies(${name} clang-resource-headers) |
40 | 40 | ||
41 | if (CLANG_BUILD_TOOLS) | 41 | if (CLANG_BUILD_TOOLS) |
@@ -51,7 +51,7 @@ index 577cc11ab01..5c859d86069 100644 | |||
51 | RUNTIME DESTINATION bin | 51 | RUNTIME DESTINATION bin |
52 | COMPONENT ${name}) | 52 | COMPONENT ${name}) |
53 | 53 | ||
54 | @@ -168,7 +161,6 @@ macro(add_clang_tool name) | 54 | @@ -178,7 +171,6 @@ macro(add_clang_tool name) |
55 | DEPENDS ${name} | 55 | DEPENDS ${name} |
56 | COMPONENT ${name}) | 56 | COMPONENT ${name}) |
57 | endif() | 57 | endif() |
@@ -60,10 +60,10 @@ index 577cc11ab01..5c859d86069 100644 | |||
60 | endmacro() | 60 | endmacro() |
61 | 61 | ||
62 | diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake | 62 | diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake |
63 | index fd69786544a..70580ccb129 100644 | 63 | index 97c9980c7de3..2cb2ead31ba0 100644 |
64 | --- a/llvm/cmake/modules/AddLLVM.cmake | 64 | --- a/llvm/cmake/modules/AddLLVM.cmake |
65 | +++ b/llvm/cmake/modules/AddLLVM.cmake | 65 | +++ b/llvm/cmake/modules/AddLLVM.cmake |
66 | @@ -1045,15 +1045,8 @@ macro(add_llvm_tool name) | 66 | @@ -1210,15 +1210,8 @@ macro(add_llvm_tool name) |
67 | 67 | ||
68 | if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | 68 | if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) |
69 | if( LLVM_BUILD_TOOLS ) | 69 | if( LLVM_BUILD_TOOLS ) |
@@ -79,7 +79,7 @@ index fd69786544a..70580ccb129 100644 | |||
79 | RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} | 79 | RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} |
80 | COMPONENT ${name}) | 80 | COMPONENT ${name}) |
81 | 81 | ||
82 | @@ -1064,9 +1057,6 @@ macro(add_llvm_tool name) | 82 | @@ -1229,9 +1222,6 @@ macro(add_llvm_tool name) |
83 | endif() | 83 | endif() |
84 | endif() | 84 | endif() |
85 | endif() | 85 | endif() |
@@ -89,9 +89,9 @@ index fd69786544a..70580ccb129 100644 | |||
89 | set_target_properties(${name} PROPERTIES FOLDER "Tools") | 89 | set_target_properties(${name} PROPERTIES FOLDER "Tools") |
90 | endmacro(add_llvm_tool name) | 90 | endmacro(add_llvm_tool name) |
91 | 91 | ||
92 | @@ -1104,15 +1094,8 @@ macro(add_llvm_utility name) | 92 | @@ -1269,15 +1259,8 @@ macro(add_llvm_utility name) |
93 | set_target_properties(${name} PROPERTIES FOLDER "Utils") | 93 | set_target_properties(${name} PROPERTIES FOLDER "Utils") |
94 | if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | 94 | if ( ${name} IN_LIST LLVM_TOOLCHAIN_UTILITIES OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) |
95 | if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) | 95 | if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) |
96 | - set(export_to_llvmexports) | 96 | - set(export_to_llvmexports) |
97 | - if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR | 97 | - if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR |
@@ -105,7 +105,7 @@ index fd69786544a..70580ccb129 100644 | |||
105 | RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} | 105 | RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} |
106 | COMPONENT ${name}) | 106 | COMPONENT ${name}) |
107 | 107 | ||
108 | @@ -1121,7 +1104,6 @@ macro(add_llvm_utility name) | 108 | @@ -1286,7 +1269,6 @@ macro(add_llvm_utility name) |
109 | DEPENDS ${name} | 109 | DEPENDS ${name} |
110 | COMPONENT ${name}) | 110 | COMPONENT ${name}) |
111 | endif() | 111 | endif() |
@@ -114,10 +114,10 @@ index fd69786544a..70580ccb129 100644 | |||
114 | set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) | 114 | set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) |
115 | endif() | 115 | endif() |
116 | diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake | 116 | diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake |
117 | index 9d2fcd9a793..acdb898149d 100644 | 117 | index 5f07acc1f692..47fe887e083b 100644 |
118 | --- a/llvm/cmake/modules/TableGen.cmake | 118 | --- a/llvm/cmake/modules/TableGen.cmake |
119 | +++ b/llvm/cmake/modules/TableGen.cmake | 119 | +++ b/llvm/cmake/modules/TableGen.cmake |
120 | @@ -161,14 +161,8 @@ macro(add_tablegen target project) | 120 | @@ -177,14 +177,8 @@ macro(add_tablegen target project) |
121 | endif() | 121 | endif() |
122 | 122 | ||
123 | if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) | 123 | if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) |
@@ -132,7 +132,7 @@ index 9d2fcd9a793..acdb898149d 100644 | |||
132 | COMPONENT ${target} | 132 | COMPONENT ${target} |
133 | RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) | 133 | RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) |
134 | if(NOT LLVM_ENABLE_IDE) | 134 | if(NOT LLVM_ENABLE_IDE) |
135 | @@ -177,5 +171,4 @@ macro(add_tablegen target project) | 135 | @@ -193,5 +187,4 @@ macro(add_tablegen target project) |
136 | COMPONENT ${target}) | 136 | COMPONENT ${target}) |
137 | endif() | 137 | endif() |
138 | endif() | 138 | endif() |
diff --git a/recipes-devtools/clang/clang/0023-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch index decab68..da4e3fe 100644 --- a/recipes-devtools/clang/clang/0023-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From ed3b5d8bb197f01556b42dfc2281693475fd830e Mon Sep 17 00:00:00 2001 | 1 | From 6ad331a0e464ee28eac7d0a1c658cd007e831297 Mon Sep 17 00:00:00 2001 |
2 | From: Jim Broadus <jbroadus@xevo.com> | 2 | From: Jim Broadus <jbroadus@xevo.com> |
3 | Date: Thu, 26 Mar 2020 16:05:53 -0700 | 3 | Date: Thu, 26 Mar 2020 16:05:53 -0700 |
4 | Subject: [PATCH] clang: Fix resource dir location for cross toolchains | 4 | Subject: [PATCH] clang: Fix resource dir location for cross toolchains |
@@ -13,29 +13,27 @@ As a fix for this, check the parent directory name. If that is "bin", then | |||
13 | use that directory's parent. | 13 | use that directory's parent. |
14 | 14 | ||
15 | Signed-off-by: Jim Broadus <jbroadus@xevo.com> | 15 | Signed-off-by: Jim Broadus <jbroadus@xevo.com> |
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | 17 | --- |
17 | clang/lib/Driver/Driver.cpp | 8 +++++++- | 18 | clang/lib/Driver/Driver.cpp | 8 +++++++- |
18 | 1 file changed, 7 insertions(+), 1 deletion(-) | 19 | 1 file changed, 7 insertions(+), 1 deletion(-) |
19 | 20 | ||
20 | diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp | 21 | diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp |
21 | index fb8335a3695..819887944b5 100644 | 22 | index 418e1d3e8ec9..44c9f6e59d3f 100644 |
22 | --- a/clang/lib/Driver/Driver.cpp | 23 | --- a/clang/lib/Driver/Driver.cpp |
23 | +++ b/clang/lib/Driver/Driver.cpp | 24 | +++ b/clang/lib/Driver/Driver.cpp |
24 | @@ -110,7 +110,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, | 25 | @@ -119,7 +119,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, |
25 | // With a static-library build of libclang, LibClangPath will contain the | 26 | // With a static-library build of libclang, LibClangPath will contain the |
26 | // path of the embedding binary, which for LLVM binaries will be in bin/. | 27 | // path of the embedding binary, which for LLVM binaries will be in bin/. |
27 | // ../lib gets us to lib/ in both cases. | 28 | // ../lib gets us to lib/ in both cases. |
28 | - P = llvm::sys::path::parent_path(Dir); | 29 | - P = llvm::sys::path::parent_path(Dir); |
29 | + Dir = llvm::sys::path::parent_path(Dir); | 30 | + Dir = std::string(llvm::sys::path::parent_path(Dir)); |
30 | + | 31 | + |
31 | + // OE cross toolchains are installed, by default, in a subdir of bin. | 32 | + // OE cross toolchains are installed, by default, in a subdir of bin. |
32 | + if (llvm::sys::path::filename(Dir) == "bin") { | 33 | + if (llvm::sys::path::filename(Dir) == "bin") { |
33 | + Dir = llvm::sys::path::parent_path(Dir); | 34 | + Dir = std::string(llvm::sys::path::parent_path(Dir)); |
34 | + } | 35 | + } |
35 | + P = Dir; | 36 | + P = Dir; |
36 | llvm::sys::path::append(P, Twine("lib") + CLANG_LIBDIR_SUFFIX, "clang", | 37 | llvm::sys::path::append(P, Twine("lib") + CLANG_LIBDIR_SUFFIX, "clang", |
37 | CLANG_VERSION_STRING); | 38 | CLANG_VERSION_STRING); |
38 | } | 39 | } |
39 | -- | ||
40 | 2.24.1 | ||
41 | |||
diff --git a/recipes-devtools/clang/clang/0024-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0023-fix-path-to-libffi.patch index 2890228..e22c0bd 100644 --- a/recipes-devtools/clang/clang/0024-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0023-fix-path-to-libffi.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 52b4e74809eba796663f0f65194ab4f3eafe2cb1 Mon Sep 17 00:00:00 2001 | 1 | From cbcfe7d13dfc5644c9b8a48e951b43bc15d9f4cf Mon Sep 17 00:00:00 2001 |
2 | From: Anuj Mittal <anuj.mittal@intel.com> | 2 | From: Anuj Mittal <anuj.mittal@intel.com> |
3 | Date: Fri, 3 Apr 2020 15:10:37 +0800 | 3 | Date: Fri, 3 Apr 2020 15:10:37 +0800 |
4 | Subject: [PATCH] fix path to libffi | 4 | Subject: [PATCH] fix path to libffi |
@@ -8,21 +8,19 @@ libLLVMInterpreter, we were looking for libffi in clang's recipe-sysroot instead | |||
8 | the recipe's sysroot. | 8 | the recipe's sysroot. |
9 | 9 | ||
10 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | 10 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> |
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | 12 | --- |
12 | llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt | 2 +- | 13 | llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt | 2 +- |
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
14 | 15 | ||
15 | diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt | 16 | diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt |
16 | index b8adea5..7d8434c 100644 | 17 | index 976219830d5e..9930e01559e9 100644 |
17 | --- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt | 18 | --- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt |
18 | +++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt | 19 | +++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt |
19 | @@ -16,5 +16,5 @@ add_llvm_component_library(LLVMInterpreter | 20 | @@ -22,5 +22,5 @@ add_llvm_component_library(LLVMInterpreter |
20 | ) | 21 | ) |
21 | 22 | ||
22 | if( LLVM_ENABLE_FFI ) | 23 | if( LLVM_ENABLE_FFI ) |
23 | - target_link_libraries( LLVMInterpreter PRIVATE ${FFI_LIBRARY_PATH} ) | 24 | - target_link_libraries( LLVMInterpreter PRIVATE ${FFI_LIBRARY_PATH} ) |
24 | + target_link_libraries( LLVMInterpreter PRIVATE ffi ) | 25 | + target_link_libraries( LLVMInterpreter PRIVATE ffi ) |
25 | endif() | 26 | endif() |
26 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/recipes-devtools/clang/clang/0025-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 43161c7..521f06d 100644 --- a/recipes-devtools/clang/clang/0025-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From fcafd24f9062eeecc9c87ac2fe9bce9accbe7534 Mon Sep 17 00:00:00 2001 | 1 | From 5f3d1b71c3e87017dfa471f1561f6c28f34a77f8 Mon Sep 17 00:00:00 2001 |
2 | From: Oleksandr Ocheretnyi <oocheret@cisco.com> | 2 | From: Oleksandr Ocheretnyi <oocheret@cisco.com> |
3 | Date: Wed, 15 Apr 2020 00:08:39 +0300 | 3 | Date: Wed, 15 Apr 2020 00:08:39 +0300 |
4 | Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso | 4 | Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso |
@@ -12,15 +12,16 @@ Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso | |||
12 | the usrmerge scenario. | 12 | the usrmerge scenario. |
13 | 13 | ||
14 | Signed-off-by: Oleksandr Ocheretnyi <oocheret@cisco.com> | 14 | Signed-off-by: Oleksandr Ocheretnyi <oocheret@cisco.com> |
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | 16 | --- |
16 | clang/lib/Driver/ToolChains/Linux.cpp | 16 ++++++++-------- | 17 | clang/lib/Driver/ToolChains/Linux.cpp | 16 ++++++++-------- |
17 | 1 file changed, 8 insertions(+), 8 deletions(-) | 18 | 1 file changed, 8 insertions(+), 8 deletions(-) |
18 | 19 | ||
19 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp | 20 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp |
20 | index fb579e7ad60..4ed5938cc59 100644 | 21 | index 604024bb3df4..812599cdaf84 100644 |
21 | --- a/clang/lib/Driver/ToolChains/Linux.cpp | 22 | --- a/clang/lib/Driver/ToolChains/Linux.cpp |
22 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp | 23 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp |
23 | @@ -604,8 +604,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 24 | @@ -515,8 +515,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
24 | LibDir = "lib64"; | 25 | LibDir = "lib64"; |
25 | Loader = | 26 | Loader = |
26 | (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; | 27 | (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; |
@@ -31,7 +32,7 @@ index fb579e7ad60..4ed5938cc59 100644 | |||
31 | LibDir = "lib"; | 32 | LibDir = "lib"; |
32 | } | 33 | } |
33 | break; | 34 | break; |
34 | @@ -613,8 +613,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 35 | @@ -524,8 +524,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
35 | LibDir = "lib64"; | 36 | LibDir = "lib64"; |
36 | Loader = | 37 | Loader = |
37 | (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; | 38 | (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; |
@@ -42,7 +43,7 @@ index fb579e7ad60..4ed5938cc59 100644 | |||
42 | LibDir = "lib"; | 43 | LibDir = "lib"; |
43 | } | 44 | } |
44 | break; | 45 | break; |
45 | @@ -638,8 +638,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 46 | @@ -549,8 +549,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
46 | case llvm::Triple::sparcv9: | 47 | case llvm::Triple::sparcv9: |
47 | LibDir = "lib64"; | 48 | LibDir = "lib64"; |
48 | Loader = "ld-linux.so.2"; | 49 | Loader = "ld-linux.so.2"; |
@@ -53,7 +54,7 @@ index fb579e7ad60..4ed5938cc59 100644 | |||
53 | LibDir = "lib"; | 54 | LibDir = "lib"; |
54 | } | 55 | } |
55 | break; | 56 | break; |
56 | @@ -656,8 +656,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | 57 | @@ -567,8 +567,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { |
57 | 58 | ||
58 | LibDir = X32 ? "libx32" : "lib64"; | 59 | LibDir = X32 ? "libx32" : "lib64"; |
59 | Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; | 60 | Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; |
@@ -64,6 +65,3 @@ index fb579e7ad60..4ed5938cc59 100644 | |||
64 | LibDir = "lib"; | 65 | LibDir = "lib"; |
65 | } | 66 | } |
66 | break; | 67 | break; |
67 | -- | ||
68 | 2.17.1 | ||
69 | |||
diff --git a/recipes-devtools/clang/clang/0025-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0025-clang-Use-python3-in-python-scripts.patch new file mode 100644 index 0000000..defbc8d --- /dev/null +++ b/recipes-devtools/clang/clang/0025-clang-Use-python3-in-python-scripts.patch | |||
@@ -0,0 +1,112 @@ | |||
1 | From fd3696213eed77e8c217be0ded0e220c0b597f1e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 14 Oct 2020 22:19:57 -0700 | ||
4 | Subject: [PATCH] clang: Use python3 in python scripts | ||
5 | |||
6 | Some scripts ask for python, but they work fine with python3 | ||
7 | and in OE python symlink is not exposed to build, only python3 is | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | .../find-all-symbols/tool/run-find-all-symbols.py | 2 +- | ||
13 | clang-tools-extra/clang-tidy/add_new_check.py | 2 +- | ||
14 | clang-tools-extra/clang-tidy/rename_check.py | 2 +- | ||
15 | clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | 2 +- | ||
16 | clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 2 +- | ||
17 | clang/tools/clang-format/clang-format-diff.py | 2 +- | ||
18 | clang/tools/clang-format/git-clang-format | 2 +- | ||
19 | clang/tools/scan-view/bin/scan-view | 2 +- | ||
20 | clang/utils/hmaptool/hmaptool | 2 +- | ||
21 | 9 files changed, 9 insertions(+), 9 deletions(-) | ||
22 | |||
23 | diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py | ||
24 | index 8655af137bb2..e95ba59a421c 100755 | ||
25 | --- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py | ||
26 | +++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py | ||
27 | @@ -1,4 +1,4 @@ | ||
28 | -#!/usr/bin/env python | ||
29 | +#!/usr/bin/env python3 | ||
30 | # | ||
31 | #=- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=# | ||
32 | # | ||
33 | diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py | ||
34 | index 14fcfe8d49ff..ee7e682690b7 100755 | ||
35 | --- a/clang-tools-extra/clang-tidy/add_new_check.py | ||
36 | +++ b/clang-tools-extra/clang-tidy/add_new_check.py | ||
37 | @@ -1,4 +1,4 @@ | ||
38 | -#!/usr/bin/env python | ||
39 | +#!/usr/bin/env python3 | ||
40 | # | ||
41 | #===- add_new_check.py - clang-tidy check generator ---------*- python -*--===# | ||
42 | # | ||
43 | diff --git a/clang-tools-extra/clang-tidy/rename_check.py b/clang-tools-extra/clang-tidy/rename_check.py | ||
44 | index 2410041fd5d2..976a02100cd6 100755 | ||
45 | --- a/clang-tools-extra/clang-tidy/rename_check.py | ||
46 | +++ b/clang-tools-extra/clang-tidy/rename_check.py | ||
47 | @@ -1,4 +1,4 @@ | ||
48 | -#!/usr/bin/env python | ||
49 | +#!/usr/bin/env python3 | ||
50 | # | ||
51 | #===- rename_check.py - clang-tidy check renamer ------------*- python -*--===# | ||
52 | # | ||
53 | diff --git a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | ||
54 | index 17086d15053e..a20b1f1f46b2 100755 | ||
55 | --- a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | ||
56 | +++ b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | ||
57 | @@ -1,4 +1,4 @@ | ||
58 | -#!/usr/bin/env python | ||
59 | +#!/usr/bin/env python3 | ||
60 | # | ||
61 | #===- clang-tidy-diff.py - ClangTidy Diff Checker -----------*- python -*--===# | ||
62 | # | ||
63 | diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | ||
64 | index 313ecd2f9571..a298e38b1a45 100755 | ||
65 | --- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | ||
66 | +++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | ||
67 | @@ -1,4 +1,4 @@ | ||
68 | -#!/usr/bin/env python | ||
69 | +#!/usr/bin/env python3 | ||
70 | # | ||
71 | #===- run-clang-tidy.py - Parallel clang-tidy runner --------*- python -*--===# | ||
72 | # | ||
73 | diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py | ||
74 | index 6e653a134289..1c31192a4562 100755 | ||
75 | --- a/clang/tools/clang-format/clang-format-diff.py | ||
76 | +++ b/clang/tools/clang-format/clang-format-diff.py | ||
77 | @@ -1,4 +1,4 @@ | ||
78 | -#!/usr/bin/env python | ||
79 | +#!/usr/bin/env python3 | ||
80 | # | ||
81 | #===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# | ||
82 | # | ||
83 | diff --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format | ||
84 | index ccd2f50fa4ad..cfcfb9fcbaef 100755 | ||
85 | --- a/clang/tools/clang-format/git-clang-format | ||
86 | +++ b/clang/tools/clang-format/git-clang-format | ||
87 | @@ -1,4 +1,4 @@ | ||
88 | -#!/usr/bin/env python | ||
89 | +#!/usr/bin/env python3 | ||
90 | # | ||
91 | #===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===# | ||
92 | # | ||
93 | diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view | ||
94 | index 04ad518a60cd..07effbca5969 100755 | ||
95 | --- a/clang/tools/scan-view/bin/scan-view | ||
96 | +++ b/clang/tools/scan-view/bin/scan-view | ||
97 | @@ -1,4 +1,4 @@ | ||
98 | -#!/usr/bin/env python2 | ||
99 | +#!/usr/bin/env python3 | ||
100 | |||
101 | from __future__ import print_function | ||
102 | |||
103 | diff --git a/clang/utils/hmaptool/hmaptool b/clang/utils/hmaptool/hmaptool | ||
104 | index e647cde6bc46..7ed2fdf674b1 100755 | ||
105 | --- a/clang/utils/hmaptool/hmaptool | ||
106 | +++ b/clang/utils/hmaptool/hmaptool | ||
107 | @@ -1,4 +1,4 @@ | ||
108 | -#!/usr/bin/env python | ||
109 | +#!/usr/bin/env python3 | ||
110 | from __future__ import absolute_import, division, print_function | ||
111 | |||
112 | import json | ||
diff --git a/recipes-devtools/clang/clang/0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch new file mode 100644 index 0000000..801696e --- /dev/null +++ b/recipes-devtools/clang/clang/0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 13dedb0bbf780f7d66ddad8b1b33b3a1e0de2d25 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 25 Jan 2021 16:14:35 +0800 | ||
4 | Subject: [PATCH] For x86_64, set Yocto based GCC install search path | ||
5 | |||
6 | Under Yocto host, while using clang-native to build, it searches | ||
7 | install host gcc failed which causing the include file not found | ||
8 | [snip] | ||
9 | |clang++ -target x86_64-linux -MMD -MF src/base/files/file_path_constants.o.d -I../../../tools/gn/src -I. \ | ||
10 | -isystem/tmp-glibc/work/x86_64-linux/gn-native/87.0.4280.141-r0/recipe-sysroot-native/usr/include -O2 -pipe \ | ||
11 | -std=c++17 -c ../../../tools/gn/src/base/files/file_path_constants.cc -o src/base/files/file_path_constants.o | ||
12 | |../../../tools/gn/src/base/files/file_path_constants.cc:7:10: fatal error: 'iterator' file not found | ||
13 | |#include <iterator> | ||
14 | | ^~~~~~~~ | ||
15 | [snip] | ||
16 | |||
17 | Set three Yocto based GCC triple: poky, oe-core and wind river | ||
18 | |||
19 | Before aplly the patch | ||
20 | [snip] | ||
21 | $ ../recipe-sysroot-native/usr/bin/clang++ -v | ||
22 | clang version 11.0.1 (https://github.com/llvm/llvm-project 43ff75f2c3feef64f9d73328230d34dac8832a91) | ||
23 | Target: x86_64-unknown-linux-gnu | ||
24 | Thread model: posix | ||
25 | InstalledDir:tmp-glibc/work/x86_64-linux/gn-native/87.0.4280.141-r0/chromium-87.0.4280.141/../recipe-sysroot-native/usr/bin | ||
26 | [snip] | ||
27 | |||
28 | After aplly the patch: | ||
29 | [snip] | ||
30 | $ ../recipe-sysroot-native/usr/bin/clang++ -v | ||
31 | clang version 11.0.1 (https://github.com/llvm/llvm-project 22c3241ff9a6224261df48d0258957fd8acc3d64) | ||
32 | Target: x86_64-unknown-linux-gnu | ||
33 | Thread model: posix | ||
34 | InstalledDir:tmp-glibc/work/x86_64-linux/gn-native/87.0.4280.141-r0/chromium-87.0.4280.141/../recipe-sysroot-native/usr/bin | ||
35 | Found candidate GCC installation: /usr/lib//x86_64-wrs-linux/10.1.0 | ||
36 | Found candidate GCC installation: /usr/lib/gcc/x86_64-wrs-linux/10.1.0 | ||
37 | Selected GCC installation: /usr/lib//x86_64-wrs-linux/10.1.0 | ||
38 | Candidate multilib: .;@m64 | ||
39 | Selected multilib: .;@m64 | ||
40 | [snip] | ||
41 | |||
42 | BTW, it is hardly to insert a triple by the replacement of TARGET_SYS | ||
43 | (=${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}), since TARGET_VENDOR | ||
44 | is different between clang and clang-native | ||
45 | |||
46 | The //CLANG_EXTRA_OE_VENDORS_TRIPLES string is replaced with list of | ||
47 | additional triples based on CLANG_EXTRA_OE_VENDORS variable in | ||
48 | recipes-devtools/clang/llvm-project-source.inc:add_more_target_vendors() | ||
49 | |||
50 | Upstream-Status: Inappropriate [oe specific] | ||
51 | |||
52 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
53 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
54 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
55 | --- | ||
56 | clang/lib/Driver/ToolChains/Gnu.cpp | 1 + | ||
57 | 1 file changed, 1 insertion(+) | ||
58 | |||
59 | diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp | ||
60 | index 05d1d3003881..33b1d7fb7061 100644 | ||
61 | --- a/clang/lib/Driver/ToolChains/Gnu.cpp | ||
62 | +++ b/clang/lib/Driver/ToolChains/Gnu.cpp | ||
63 | @@ -2109,6 +2109,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( | ||
64 | "x86_64-redhat-linux", "x86_64-suse-linux", | ||
65 | "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", | ||
66 | "x86_64-slackware-linux", "x86_64-unknown-linux", | ||
67 | + "x86_64-oe-linux",//CLANG_EXTRA_OE_VENDORS_TRIPLES | ||
68 | "x86_64-amazon-linux", "x86_64-linux-android"}; | ||
69 | static const char *const X32LibDirs[] = {"/libx32"}; | ||
70 | static const char *const X86LibDirs[] = {"/lib32", "/lib"}; | ||
diff --git a/recipes-devtools/clang/clang/0026-OpenCL-Fix-support-for-cl_khr_mipmap_image_writes.patch b/recipes-devtools/clang/clang/0026-OpenCL-Fix-support-for-cl_khr_mipmap_image_writes.patch deleted file mode 100644 index a8798fb..0000000 --- a/recipes-devtools/clang/clang/0026-OpenCL-Fix-support-for-cl_khr_mipmap_image_writes.patch +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | From 4770490fa38a03624376b3c3973705a4bf8cc193 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexey Sotkin <alexey.sotkin@intel.com> | ||
3 | Date: Mon, 27 Jan 2020 12:25:03 +0300 | ||
4 | Subject: [PATCH] [OpenCL] Fix support for cl_khr_mipmap_image_writes | ||
5 | |||
6 | Text of the extension is available here: | ||
7 | https://github.com/KhronosGroup/OpenCL-Docs/blob/master/ext/cl_khr_mipmap_image.asciidoc | ||
8 | |||
9 | Patch by Ilya Mashkov | ||
10 | |||
11 | Differential Revision: https://reviews.llvm.org/D71460 | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/f780e15caf1bed0a9fbc87fde70bd5ab3d80a439] | ||
14 | |||
15 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
16 | --- | ||
17 | clang/include/clang/Basic/OpenCLExtensions.def | 1 + | ||
18 | clang/lib/Headers/opencl-c.h | 18 ++++++++++-------- | ||
19 | clang/test/SemaOpenCL/extension-version.cl | 12 ++++++++++++ | ||
20 | 3 files changed, 23 insertions(+), 8 deletions(-) | ||
21 | |||
22 | diff --git a/clang/include/clang/Basic/OpenCLExtensions.def b/clang/include/clang/Basic/OpenCLExtensions.def | ||
23 | index 5536a6e8e4d..51748158431 100644 | ||
24 | --- a/clang/include/clang/Basic/OpenCLExtensions.def | ||
25 | +++ b/clang/include/clang/Basic/OpenCLExtensions.def | ||
26 | @@ -70,6 +70,7 @@ OPENCLEXT_INTERNAL(cl_khr_spir, 120, ~0U) | ||
27 | OPENCLEXT_INTERNAL(cl_khr_egl_event, 200, ~0U) | ||
28 | OPENCLEXT_INTERNAL(cl_khr_egl_image, 200, ~0U) | ||
29 | OPENCLEXT_INTERNAL(cl_khr_mipmap_image, 200, ~0U) | ||
30 | +OPENCLEXT_INTERNAL(cl_khr_mipmap_image_writes, 200, ~0U) | ||
31 | OPENCLEXT_INTERNAL(cl_khr_srgb_image_writes, 200, ~0U) | ||
32 | OPENCLEXT_INTERNAL(cl_khr_subgroups, 200, ~0U) | ||
33 | OPENCLEXT_INTERNAL(cl_khr_terminate_context, 200, ~0U) | ||
34 | diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h | ||
35 | index 06c5ab6a72f..3210f93cc85 100644 | ||
36 | --- a/clang/lib/Headers/opencl-c.h | ||
37 | +++ b/clang/lib/Headers/opencl-c.h | ||
38 | @@ -14682,7 +14682,7 @@ void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, flo | ||
39 | |||
40 | // OpenCL Extension v2.0 s9.18 - Mipmaps | ||
41 | #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
42 | -#ifdef cl_khr_mipmap_image | ||
43 | +#if defined(cl_khr_mipmap_image_writes) | ||
44 | void __ovld write_imagef(write_only image1d_t image, int coord, int lod, float4 color); | ||
45 | void __ovld write_imagei(write_only image1d_t image, int coord, int lod, int4 color); | ||
46 | void __ovld write_imageui(write_only image1d_t image, int coord, int lod, uint4 color); | ||
47 | @@ -14699,15 +14699,16 @@ void __ovld write_imagef(write_only image2d_array_t image_array, int4 coord, int | ||
48 | void __ovld write_imagei(write_only image2d_array_t image_array, int4 coord, int lod, int4 color); | ||
49 | void __ovld write_imageui(write_only image2d_array_t image_array, int4 coord, int lod, uint4 color); | ||
50 | |||
51 | -void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, int lod, float color); | ||
52 | -void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, int lod, float color); | ||
53 | +void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, int lod, float depth); | ||
54 | +void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, int lod, float depth); | ||
55 | |||
56 | #ifdef cl_khr_3d_image_writes | ||
57 | void __ovld write_imagef(write_only image3d_t image, int4 coord, int lod, float4 color); | ||
58 | void __ovld write_imagei(write_only image3d_t image, int4 coord, int lod, int4 color); | ||
59 | void __ovld write_imageui(write_only image3d_t image, int4 coord, int lod, uint4 color); | ||
60 | -#endif | ||
61 | -#endif //cl_khr_mipmap_image | ||
62 | +#endif //cl_khr_3d_image_writes | ||
63 | + | ||
64 | +#endif //defined(cl_khr_mipmap_image_writes) | ||
65 | #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
66 | |||
67 | // Image write functions for half4 type | ||
68 | @@ -14756,7 +14757,7 @@ void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, flo | ||
69 | #endif //cl_khr_depth_images | ||
70 | |||
71 | #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
72 | -#ifdef cl_khr_mipmap_image | ||
73 | +#if defined(cl_khr_mipmap_image_writes) | ||
74 | void __ovld write_imagef(read_write image1d_t image, int coord, int lod, float4 color); | ||
75 | void __ovld write_imagei(read_write image1d_t image, int coord, int lod, int4 color); | ||
76 | void __ovld write_imageui(read_write image1d_t image, int coord, int lod, uint4 color); | ||
77 | @@ -14780,8 +14781,9 @@ void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, int | ||
78 | void __ovld write_imagef(read_write image3d_t image, int4 coord, int lod, float4 color); | ||
79 | void __ovld write_imagei(read_write image3d_t image, int4 coord, int lod, int4 color); | ||
80 | void __ovld write_imageui(read_write image3d_t image, int4 coord, int lod, uint4 color); | ||
81 | -#endif | ||
82 | -#endif //cl_khr_mipmap_image | ||
83 | +#endif //cl_khr_3d_image_writes | ||
84 | + | ||
85 | +#endif //cl_khr_mipmap_image_writes | ||
86 | #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
87 | |||
88 | // Image write functions for half4 type | ||
89 | diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl | ||
90 | index 19d08849535..0e6bbb7d3bc 100644 | ||
91 | --- a/clang/test/SemaOpenCL/extension-version.cl | ||
92 | +++ b/clang/test/SemaOpenCL/extension-version.cl | ||
93 | @@ -242,6 +242,18 @@ | ||
94 | #endif | ||
95 | #pragma OPENCL EXTENSION cl_khr_mipmap_image : enable | ||
96 | |||
97 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
98 | +#ifndef cl_khr_mipmap_image_writes | ||
99 | +#error "Missing cl_khr_mipmap_image_writes define" | ||
100 | +#endif | ||
101 | +#else | ||
102 | +#ifdef cl_khr_mipmap_image_writes | ||
103 | +#error "Incorrect cl_khr_mipmap_image_writes define" | ||
104 | +#endif | ||
105 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_mipmap_image_writes' - ignoring}} | ||
106 | +#endif | ||
107 | +#pragma OPENCL EXTENSION cl_khr_mipmap_image_writes : enable | ||
108 | + | ||
109 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
110 | #ifndef cl_khr_srgb_image_writes | ||
111 | #error "Missing cl_khr_srgb_image_writes define" | ||
112 | -- | ||
113 | 2.17.1 | ||
114 | |||
diff --git a/recipes-devtools/clang/clang/0027-InstCombine-visitBitCast-do-not-crash-on-weird-bitca.patch b/recipes-devtools/clang/clang/0027-InstCombine-visitBitCast-do-not-crash-on-weird-bitca.patch deleted file mode 100644 index 77ca35b..0000000 --- a/recipes-devtools/clang/clang/0027-InstCombine-visitBitCast-do-not-crash-on-weird-bitca.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 381054a989ebd0b585fee46f2a01a7c5de10acf7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roman Lebedev <lebedev.ri@gmail.com> | ||
3 | Date: Wed, 24 Jun 2020 21:12:09 +0300 | ||
4 | Subject: [PATCH] [InstCombine] visitBitCast(): do not crash on weird `bitcast | ||
5 | <1 x i8*> to i8*` | ||
6 | |||
7 | Even if we know that RHS of a bitcast is a pointer, | ||
8 | we can't assume LHS is, because it might be | ||
9 | a single-element vector of pointer. | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/381054a989ebd0b585fee46f2a01a7c5de10acf7] | ||
12 | |||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | |||
15 | --- | ||
16 | lib/Transforms/InstCombine/InstCombineCasts.cpp | 3 ++- | ||
17 | test/Transforms/InstCombine/bitcast.ll | 6 ++++++ | ||
18 | 2 files changed, 8 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp | ||
21 | index 3750f31e3cf..a8c87ea3558 100644 | ||
22 | --- a/lib/Transforms/InstCombine/InstCombineCasts.cpp | ||
23 | +++ b/lib/Transforms/InstCombine/InstCombineCasts.cpp | ||
24 | @@ -2471,8 +2471,9 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) { | ||
25 | if (DestTy == Src->getType()) | ||
26 | return replaceInstUsesWith(CI, Src); | ||
27 | |||
28 | - if (PointerType *DstPTy = dyn_cast<PointerType>(DestTy)) { | ||
29 | + if (isa<PointerType>(SrcTy) && isa<PointerType>(DestTy)) { | ||
30 | PointerType *SrcPTy = cast<PointerType>(SrcTy); | ||
31 | + PointerType *DstPTy = cast<PointerType>(DestTy); | ||
32 | Type *DstElTy = DstPTy->getElementType(); | ||
33 | Type *SrcElTy = SrcPTy->getElementType(); | ||
34 | |||
35 | diff --git a/test/Transforms/InstCombine/bitcast.ll b/test/Transforms/InstCombine/bitcast.ll | ||
36 | index 0f0cbdb364a..c4ee52f27a8 100644 | ||
37 | --- a/test/Transforms/InstCombine/bitcast.ll | ||
38 | +++ b/test/Transforms/InstCombine/bitcast.ll | ||
39 | @@ -561,3 +561,9 @@ define void @constant_fold_vector_to_half() { | ||
40 | store volatile half bitcast (<4 x i4> <i4 0, i4 0, i4 0, i4 4> to half), half* undef | ||
41 | ret void | ||
42 | } | ||
43 | + | ||
44 | +; Ensure that we do not crash when looking at such a weird bitcast. | ||
45 | +define i8* @bitcast_from_single_element_pointer_vector_to_pointer(<1 x i8*> %ptrvec) { | ||
46 | + %ptr = bitcast <1 x i8*> %ptrvec to i8* | ||
47 | + ret i8* %ptr | ||
48 | +} | ||
49 | -- | ||
50 | 2.17.1 | ||
51 | |||
diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Include-stddef.h.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Include-stddef.h.patch new file mode 100644 index 0000000..3bd41ea --- /dev/null +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Include-stddef.h.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From f5367ee64b6e74039c0957e1f7d81dc8d597804d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 6 Feb 2021 12:44:30 -0800 | ||
4 | Subject: [PATCH] compiler-rt: Include stddef.h | ||
5 | |||
6 | size_t is use in the source needs relevant header to include the | ||
7 | definition, fixes build on musl | ||
8 | |||
9 | compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:82:61: error: unknown type name 'size_t'; did you mean 'std::size_t'? | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp | ||
17 | index b87798603fda..34e11727d77b 100644 | ||
18 | --- a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp | ||
19 | +++ b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp | ||
20 | @@ -26,6 +26,7 @@ | ||
21 | |||
22 | #include <cassert> | ||
23 | #include <cstdint> | ||
24 | +#include <cstddef> // for size_t | ||
25 | #include <dlfcn.h> // for dlsym() | ||
26 | |||
27 | static void *getFuncAddr(const char *name, uintptr_t wrapper_addr) { | ||
diff --git a/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch new file mode 100644 index 0000000..ef9b2ed --- /dev/null +++ b/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 6660c7d48601df4276fb3f51156c96fff103fb79 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 7 Feb 2021 23:58:41 -0800 | ||
4 | Subject: [PATCH] llvm: Do not use find_library for ncurses | ||
5 | |||
6 | This ensures that it lets OE to decide which lib to link | ||
7 | otherwise it adds absolute paths to linker cmdline and confuses it | ||
8 | horribly with native and target libs when build clang for target | ||
9 | |||
10 | TOPDIR/build/tmp/work/cortexa57-yoe-linux-musl/clang/12.0.0-r0/recipe-sysroot-native/usr/lib/libtinfo.so: error adding symbols: file in wrong format | ||
11 | clang-12: error: linker command failed with exit code 1 (use -v to see invocation) | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | compiler-rt/cmake/config-ix.cmake | 2 +- | ||
16 | llvm/cmake/config-ix.cmake | 2 +- | ||
17 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake | ||
20 | index 196aa62fd01c..49bbbd257d97 100644 | ||
21 | --- a/compiler-rt/cmake/config-ix.cmake | ||
22 | +++ b/compiler-rt/cmake/config-ix.cmake | ||
23 | @@ -140,7 +140,7 @@ else() | ||
24 | set(MAYBE_REQUIRED) | ||
25 | endif() | ||
26 | if(LLVM_ENABLE_TERMINFO) | ||
27 | - find_library(COMPILER_RT_TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED}) | ||
28 | + set(TERMINFO_LIB tinfo curses ncurses ncursesw) | ||
29 | endif() | ||
30 | if(COMPILER_RT_TERMINFO_LIB) | ||
31 | set(LLVM_ENABLE_TERMINFO 1) | ||
32 | diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake | ||
33 | index 818fafbce148..2f8ad6652334 100644 | ||
34 | --- a/llvm/cmake/config-ix.cmake | ||
35 | +++ b/llvm/cmake/config-ix.cmake | ||
36 | @@ -175,7 +175,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") | ||
37 | set(MAYBE_REQUIRED) | ||
38 | endif() | ||
39 | if(LLVM_ENABLE_TERMINFO) | ||
40 | - find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED}) | ||
41 | + set(TERMINFO_LIB tinfo curses ncurses ncursesw) | ||
42 | endif() | ||
43 | if(TERMINFO_LIB) | ||
44 | set(LLVM_ENABLE_TERMINFO 1) | ||
diff --git a/recipes-devtools/clang/clang/0028-nfc-Fix-missing-include.patch b/recipes-devtools/clang/clang/0028-nfc-Fix-missing-include.patch deleted file mode 100644 index 250e0da..0000000 --- a/recipes-devtools/clang/clang/0028-nfc-Fix-missing-include.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From b498303066a63a203d24f739b2d2e0e56dca70d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: serge-sans-paille <sguelton@redhat.com> | ||
3 | Date: Tue, 10 Nov 2020 14:55:25 +0100 | ||
4 | Subject: [PATCH] [nfc] Fix missing include | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1] | ||
7 | |||
8 | Signed-off-by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | ||
9 | |||
10 | --- | ||
11 | llvm/utils/benchmark/src/benchmark_register.h | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h | ||
15 | index 0705e219f2fa..4caa5ad4da07 100644 | ||
16 | --- a/llvm/utils/benchmark/src/benchmark_register.h | ||
17 | +++ b/llvm/utils/benchmark/src/benchmark_register.h | ||
18 | @@ -1,6 +1,7 @@ | ||
19 | #ifndef BENCHMARK_REGISTER_H | ||
20 | #define BENCHMARK_REGISTER_H | ||
21 | |||
22 | +#include <limits> | ||
23 | #include <vector> | ||
24 | |||
25 | #include "check.h" | ||
26 | -- | ||
27 | 2.31.1 | ||
28 | |||
diff --git a/recipes-devtools/clang/clang/0029-OpenMP-link-fix.patch b/recipes-devtools/clang/clang/0029-OpenMP-link-fix.patch deleted file mode 100644 index 3901268..0000000 --- a/recipes-devtools/clang/clang/0029-OpenMP-link-fix.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 11bd98436bd7e99fb1fc2c07c150c71e2250a262 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel Winarske <joel.winarske@gmail.com> | ||
3 | Date: Wed, 9 Feb 2022 11:11:55 -0800 | ||
4 | Subject: [PATCH] OpenMP link fix | ||
5 | |||
6 | Signed-off-by: Joel Winarske <joel.winarske@gmail.com> | ||
7 | --- | ||
8 | openmp/runtime/src/CMakeLists.txt | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt | ||
12 | index 9f46b4bd4..3106e497d 100644 | ||
13 | --- a/openmp/runtime/src/CMakeLists.txt | ||
14 | +++ b/openmp/runtime/src/CMakeLists.txt | ||
15 | @@ -168,7 +168,7 @@ endif() | ||
16 | |||
17 | # Linking command will include libraries in LIBOMP_CONFIGURED_LIBFLAGS | ||
18 | libomp_get_libflags(LIBOMP_CONFIGURED_LIBFLAGS) | ||
19 | -target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS}) | ||
20 | +target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS} "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports_so.txt") | ||
21 | |||
22 | # Create *.inc before compiling any sources | ||
23 | # objects depend on : .inc files | ||
24 | -- | ||
25 | 2.31.1 | ||
26 | |||
diff --git a/recipes-devtools/clang/clang/0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch new file mode 100644 index 0000000..a9658b3 --- /dev/null +++ b/recipes-devtools/clang/clang/0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 7bc8252aff944f2efeaad92c431b1f1c5cf606b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 11 Feb 2021 16:42:49 -0800 | ||
4 | Subject: [PATCH] llvm: Insert anchor for adding OE distro vendor names | ||
5 | |||
6 | This helps in making right detection for OE built gcc toolchains | ||
7 | |||
8 | The //CLANG_EXTRA_OE_VENDORS_CASES string is replaced with list of | ||
9 | additional Ceses based on CLANG_EXTRA_OE_VENDORS variable in | ||
10 | recipes-devtools/clang/llvm-project-source.inc:add_more_target_vendors() | ||
11 | |||
12 | Upstream-Status: Inappropriate [OE-specific] | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
16 | --- | ||
17 | llvm/lib/Support/Triple.cpp | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp | ||
21 | index 4f483c965282..ffd20d223133 100644 | ||
22 | --- a/llvm/lib/Support/Triple.cpp | ||
23 | +++ b/llvm/lib/Support/Triple.cpp | ||
24 | @@ -489,7 +489,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { | ||
25 | .Case("amd", Triple::AMD) | ||
26 | .Case("mesa", Triple::Mesa) | ||
27 | .Case("suse", Triple::SUSE) | ||
28 | - .Case("oe", Triple::OpenEmbedded) | ||
29 | + .Case("oe", Triple::OpenEmbedded)//CLANG_EXTRA_OE_VENDORS_CASES | ||
30 | .Default(Triple::UnknownVendor); | ||
31 | } | ||
32 | |||
diff --git a/recipes-devtools/clang/clang/0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/recipes-devtools/clang/clang/0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch new file mode 100644 index 0000000..8093de0 --- /dev/null +++ b/recipes-devtools/clang/clang/0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 4d51447a11ee6796594fd55718ea62575ecebc78 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 27 Nov 2020 10:11:08 +0000 | ||
4 | Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well | ||
5 | |||
6 | Otherwise, there are instances which are identical in | ||
7 | every other field and therefore sort non-reproducibly | ||
8 | (which breaks binary and source reproducibiliy). | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 ++++- | ||
15 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp | ||
18 | index 9d304910ba4e..d1b50b04fc71 100644 | ||
19 | --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp | ||
20 | +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp | ||
21 | @@ -359,7 +359,10 @@ public: | ||
22 | // name of a class shouldn't be significant. However, some of the backends | ||
23 | // accidentally rely on this behaviour, so it will have to stay like this | ||
24 | // until they are fixed. | ||
25 | - return ValueName < RHS.ValueName; | ||
26 | + if (ValueName != RHS.ValueName) | ||
27 | + return ValueName < RHS.ValueName; | ||
28 | + // All else being equal, we should sort by name, for source and binary reproducibility | ||
29 | + return Name < RHS.Name; | ||
30 | } | ||
31 | }; | ||
32 | |||
diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch new file mode 100644 index 0000000..1f3af25 --- /dev/null +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | From 4f45514fb8841a08d8d3bb68d9cb84b607e652f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 24 Mar 2021 00:32:09 -0700 | ||
4 | Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 | ||
5 | |||
6 | dsb is an armv7 instruction and wont work when we are building for armv6. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | compiler-rt/lib/builtins/arm/sync-ops.h | 8 ++++---- | ||
12 | compiler-rt/lib/builtins/assembly.h | 8 ++++++++ | ||
13 | 2 files changed, 12 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/compiler-rt/lib/builtins/arm/sync-ops.h b/compiler-rt/lib/builtins/arm/sync-ops.h | ||
16 | index c9623249e5d2..7a26170741ad 100644 | ||
17 | --- a/compiler-rt/lib/builtins/arm/sync-ops.h | ||
18 | +++ b/compiler-rt/lib/builtins/arm/sync-ops.h | ||
19 | @@ -19,14 +19,14 @@ | ||
20 | .thumb; \ | ||
21 | .syntax unified; \ | ||
22 | DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ | ||
23 | - dmb; \ | ||
24 | + DMB; \ | ||
25 | mov r12, r0; \ | ||
26 | LOCAL_LABEL(tryatomic_##op) : ldrex r0, [r12]; \ | ||
27 | op(r2, r0, r1); \ | ||
28 | strex r3, r2, [r12]; \ | ||
29 | cmp r3, #0; \ | ||
30 | bne LOCAL_LABEL(tryatomic_##op); \ | ||
31 | - dmb; \ | ||
32 | + DMB; \ | ||
33 | bx lr | ||
34 | |||
35 | #define SYNC_OP_8(op) \ | ||
36 | @@ -35,14 +35,14 @@ | ||
37 | .syntax unified; \ | ||
38 | DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ | ||
39 | push {r4, r5, r6, lr}; \ | ||
40 | - dmb; \ | ||
41 | + DMB; \ | ||
42 | mov r12, r0; \ | ||
43 | LOCAL_LABEL(tryatomic_##op) : ldrexd r0, r1, [r12]; \ | ||
44 | op(r4, r5, r0, r1, r2, r3); \ | ||
45 | strexd r6, r4, r5, [r12]; \ | ||
46 | cmp r6, #0; \ | ||
47 | bne LOCAL_LABEL(tryatomic_##op); \ | ||
48 | - dmb; \ | ||
49 | + DMB; \ | ||
50 | pop { r4, r5, r6, pc } | ||
51 | |||
52 | #define MINMAX_4(rD, rN, rM, cmp_kind) \ | ||
53 | diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h | ||
54 | index f6ce6a9fccff..5c6cd9376ac4 100644 | ||
55 | --- a/compiler-rt/lib/builtins/assembly.h | ||
56 | +++ b/compiler-rt/lib/builtins/assembly.h | ||
57 | @@ -181,6 +181,14 @@ | ||
58 | JMP(ip) | ||
59 | #endif | ||
60 | |||
61 | +#if __ARM_ARCH >= 7 | ||
62 | +#define DMB dmb | ||
63 | +#elif __ARM_ARCH >= 6 | ||
64 | +#define DMB mcr p15, #0, r0, c7, c10, #5 | ||
65 | +#else | ||
66 | +#error Only use this with ARMv6+ | ||
67 | +#endif | ||
68 | + | ||
69 | #if defined(USE_THUMB_2) | ||
70 | #define WIDE(op) op.w | ||
71 | #else | ||
diff --git a/recipes-devtools/clang/clang/0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch new file mode 100644 index 0000000..a022a71 --- /dev/null +++ b/recipes-devtools/clang/clang/0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 1d07b3e71bf073da0a25b30efb135adaa876e3df Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 15 Apr 2021 18:58:07 -0700 | ||
4 | Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux | ||
5 | |||
6 | GCC 11 has defaulted to DWARF-5 as well, this matches | ||
7 | debug info formats, so mix and match of components with GCC 11 | ||
8 | works. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | clang/lib/Driver/ToolChains/Linux.h | 2 ++ | ||
14 | 1 file changed, 2 insertions(+) | ||
15 | |||
16 | diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h | ||
17 | index 582d4bef81df..82c9494c744e 100644 | ||
18 | --- a/clang/lib/Driver/ToolChains/Linux.h | ||
19 | +++ b/clang/lib/Driver/ToolChains/Linux.h | ||
20 | @@ -58,6 +58,8 @@ public: | ||
21 | const llvm::opt::ArgList &DriverArgs, const JobAction &JA, | ||
22 | const llvm::fltSemantics *FPType = nullptr) const override; | ||
23 | |||
24 | + unsigned GetDefaultDwarfVersion() const override { return 5; } | ||
25 | + | ||
26 | protected: | ||
27 | Tool *buildAssembler() const override; | ||
28 | Tool *buildLinker() const override; | ||
diff --git a/recipes-devtools/clang/llvm-common/llvm-config b/recipes-devtools/clang/clang/llvm-config index a139514..a139514 100644 --- a/recipes-devtools/clang/llvm-common/llvm-config +++ b/recipes-devtools/clang/clang/llvm-config | |||
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 779c4ae..b0c81f1 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb | |||
@@ -15,7 +15,6 @@ BUILD_CXX_class-nativesdk = "clang++" | |||
15 | BUILD_AR_class-nativesdk = "llvm-ar" | 15 | BUILD_AR_class-nativesdk = "llvm-ar" |
16 | BUILD_RANLIB_class-nativesdk = "llvm-ranlib" | 16 | BUILD_RANLIB_class-nativesdk = "llvm-ranlib" |
17 | BUILD_NM_class-nativesdk = "llvm-nm" | 17 | BUILD_NM_class-nativesdk = "llvm-nm" |
18 | LDFLAGS_append_class-nativesdk = " -fuse-ld=gold" | ||
19 | 18 | ||
20 | inherit cmake cmake-native pkgconfig python3native | 19 | inherit cmake cmake-native pkgconfig python3native |
21 | 20 | ||
@@ -35,7 +34,8 @@ def get_clang_arch(bb, d, arch_var): | |||
35 | elif re.match('aarch64$', a): return 'AArch64' | 34 | elif re.match('aarch64$', a): return 'AArch64' |
36 | elif re.match('aarch64_be$', a): return 'AArch64' | 35 | elif re.match('aarch64_be$', a): return 'AArch64' |
37 | elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' | 36 | elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' |
38 | elif re.match('riscv(32|64)(eb|)$', a): return 'RISCV' | 37 | elif re.match('riscv32$', a): return 'riscv32' |
38 | elif re.match('riscv64$', a): return 'riscv64' | ||
39 | elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC' | 39 | elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC' |
40 | else: | 40 | else: |
41 | bb.note("'%s' is not a primary llvm architecture" % a) | 41 | bb.note("'%s' is not a primary llvm architecture" % a) |
@@ -51,19 +51,19 @@ def get_clang_experimental_target_arch(bb, d): | |||
51 | return get_clang_experimental_arch(bb, d, 'TARGET_ARCH') | 51 | return get_clang_experimental_arch(bb, d, 'TARGET_ARCH') |
52 | 52 | ||
53 | PACKAGECONFIG ??= "compiler-rt libcplusplus shared-libs lldb-wchar \ | 53 | PACKAGECONFIG ??= "compiler-rt libcplusplus shared-libs lldb-wchar \ |
54 | ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto full-lto', d)} \ | 54 | ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto lto', d)} \ |
55 | rtti eh libedit \ | 55 | rtti eh libedit terminfo \ |
56 | " | 56 | " |
57 | PACKAGECONFIG_class-native = "rtti eh libedit" | 57 | PACKAGECONFIG_class-native = "rtti eh libedit shared-libs" |
58 | PACKAGECONFIG_class-nativesdk = "rtti eh libedit ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto full-lto', d)}" | 58 | PACKAGECONFIG_class-nativesdk = "rtti eh libedit shared-libs ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto lto', d)}" |
59 | 59 | ||
60 | PACKAGECONFIG[compiler-rt] = "-DCLANG_DEFAULT_RTLIB=compiler-rt,,libcxx,compiler-rt" | 60 | PACKAGECONFIG[compiler-rt] = "-DCLANG_DEFAULT_RTLIB=compiler-rt,,libcxx,compiler-rt" |
61 | PACKAGECONFIG[libcplusplus] = "-DCLANG_DEFAULT_CXX_STDLIB=libc++,,libcxx" | 61 | PACKAGECONFIG[libcplusplus] = "-DCLANG_DEFAULT_CXX_STDLIB=libc++,,libcxx" |
62 | PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,libcxx" | 62 | PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,libcxx" |
63 | PACKAGECONFIG[thin-lto] = "-DLLVM_ENABLE_LTO=Thin -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," | 63 | PACKAGECONFIG[thin-lto] = "-DLLVM_ENABLE_LTO=Thin -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," |
64 | PACKAGECONFIG[full-lto] = "-DLLVM_ENABLE_LTO=Full -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," | 64 | PACKAGECONFIG[lto] = "-DLLVM_ENABLE_LTO=Full -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," |
65 | PACKAGECONFIG[shared-libs] = "-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON,,," | 65 | PACKAGECONFIG[shared-libs] = "-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON,,," |
66 | PACKAGECONFIG[terminfo] = "-DLLVM_ENABLE_TERMINFO=ON,-DLLVM_ENABLE_TERMINFO=OFF,ncurses," | 66 | PACKAGECONFIG[terminfo] = "-DLLVM_ENABLE_TERMINFO=ON -DCOMPILER_RT_TERMINFO_LIB=ON,-DLLVM_ENABLE_TERMINFO=OFF -DCOMPILER_RT_TERMINFO_LIB=OFF,ncurses," |
67 | PACKAGECONFIG[pfm] = "-DLLVM_ENABLE_LIBPFM=ON,-DLLVM_ENABLE_LIBPFM=OFF,libpfm," | 67 | PACKAGECONFIG[pfm] = "-DLLVM_ENABLE_LIBPFM=ON,-DLLVM_ENABLE_LIBPFM=OFF,libpfm," |
68 | PACKAGECONFIG[lldb-wchar] = "-DLLDB_EDITLINE_USE_WCHAR=1,-DLLDB_EDITLINE_USE_WCHAR=0," | 68 | PACKAGECONFIG[lldb-wchar] = "-DLLDB_EDITLINE_USE_WCHAR=1,-DLLDB_EDITLINE_USE_WCHAR=0," |
69 | PACKAGECONFIG[bootstrap] = "-DCLANG_ENABLE_BOOTSTRAP=On -DCLANG_BOOTSTRAP_PASSTHROUGH='${PASSTHROUGH}' -DBOOTSTRAP_LLVM_ENABLE_LTO=Thin -DBOOTSTRAP_LLVM_ENABLE_LLD=ON,,," | 69 | PACKAGECONFIG[bootstrap] = "-DCLANG_ENABLE_BOOTSTRAP=On -DCLANG_BOOTSTRAP_PASSTHROUGH='${PASSTHROUGH}' -DBOOTSTRAP_LLVM_ENABLE_LTO=Thin -DBOOTSTRAP_LLVM_ENABLE_LLD=ON,,," |
@@ -91,12 +91,10 @@ CMAKE_C_FLAGS_RELEASE;CMAKE_CXX_FLAGS_RELEASE;CMAKE_ASM_FLAGS_RELEASE;\ | |||
91 | " | 91 | " |
92 | # | 92 | # |
93 | # Default to build all OE-Core supported target arches (user overridable). | 93 | # Default to build all OE-Core supported target arches (user overridable). |
94 | # Gennerally setting LLVM_TARGETS_TO_BUILD = "" in local.conf is ok in most simple situations | ||
95 | # where only one target architecture is needed along with just one build arch (usually X86) | ||
94 | # | 96 | # |
95 | LLVM_TARGETS_TO_BUILD ?= "AMDGPU;AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86" | 97 | LLVM_TARGETS_TO_BUILD ?= "AMDGPU;AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86" |
96 | LLVM_TARGETS_TO_BUILD_append = ";${@get_clang_host_arch(bb, d)};${@get_clang_target_arch(bb, d)}" | ||
97 | |||
98 | LLVM_TARGETS_TO_BUILD_TARGET ?= "${LLVM_TARGETS_TO_BUILD}" | ||
99 | LLVM_TARGETS_TO_BUILD_TARGET_append ?= ";${@get_clang_target_arch(bb, d)}" | ||
100 | 98 | ||
101 | LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ?= "" | 99 | LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ?= "" |
102 | LLVM_EXPERIMENTAL_TARGETS_TO_BUILD_append = ";${@get_clang_experimental_target_arch(bb, d)}" | 100 | LLVM_EXPERIMENTAL_TARGETS_TO_BUILD_append = ";${@get_clang_experimental_target_arch(bb, d)}" |
@@ -104,6 +102,13 @@ LLVM_EXPERIMENTAL_TARGETS_TO_BUILD_append = ";${@get_clang_experimental_target_a | |||
104 | HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" | 102 | HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" |
105 | HF[vardepvalue] = "${HF}" | 103 | HF[vardepvalue] = "${HF}" |
106 | 104 | ||
105 | LLVM_PROJECTS ?= "clang;clang-tools-extra;lld;lldb" | ||
106 | # There is no LLDB support for RISCV | ||
107 | LLVM_PROJECTS_riscv32 ?= "clang;clang-tools-extra;lld" | ||
108 | LLVM_PROJECTS_riscv64 ?= "clang;clang-tools-extra;lld" | ||
109 | |||
110 | #CMAKE_VERBOSE = "VERBOSE=1" | ||
111 | |||
107 | EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ | 112 | EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ |
108 | -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ | 113 | -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ |
109 | -DLLVM_ENABLE_PIC=ON \ | 114 | -DLLVM_ENABLE_PIC=ON \ |
@@ -114,15 +119,17 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ | |||
114 | -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \ | 119 | -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \ |
115 | -DCMAKE_SYSTEM_NAME=Linux \ | 120 | -DCMAKE_SYSTEM_NAME=Linux \ |
116 | -DCMAKE_BUILD_TYPE=Release \ | 121 | -DCMAKE_BUILD_TYPE=Release \ |
122 | -DCMAKE_CXX_FLAGS_RELEASE='${CXXFLAGS} -DNDEBUG -g0' \ | ||
123 | -DCMAKE_C_FLAGS_RELEASE='${CFLAGS} -DNDEBUG -g0' \ | ||
117 | -DBUILD_SHARED_LIBS=OFF \ | 124 | -DBUILD_SHARED_LIBS=OFF \ |
118 | -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;lld;lldb' \ | 125 | -DLLVM_ENABLE_PROJECTS='${LLVM_PROJECTS}' \ |
119 | -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR} \ | 126 | -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR} \ |
120 | -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ | 127 | -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ |
128 | -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS_TO_BUILD}' \ | ||
129 | -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD='${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}' \ | ||
121 | " | 130 | " |
122 | 131 | ||
123 | EXTRA_OECMAKE_append_class-native = "\ | 132 | EXTRA_OECMAKE_append_class-native = "\ |
124 | -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS_TO_BUILD}' \ | ||
125 | -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD='${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}' \ | ||
126 | -DPYTHON_EXECUTABLE='${PYTHON}' \ | 133 | -DPYTHON_EXECUTABLE='${PYTHON}' \ |
127 | " | 134 | " |
128 | EXTRA_OECMAKE_append_class-nativesdk = "\ | 135 | EXTRA_OECMAKE_append_class-nativesdk = "\ |
@@ -131,8 +138,7 @@ EXTRA_OECMAKE_append_class-nativesdk = "\ | |||
131 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ | 138 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ |
132 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ | 139 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ |
133 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ | 140 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ |
134 | -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS_TO_BUILD}' \ | 141 | -DCMAKE_STRIP=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-strip \ |
135 | -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD='${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}' \ | ||
136 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | 142 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ |
137 | -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ | 143 | -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ |
138 | -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ | 144 | -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ |
@@ -145,12 +151,13 @@ EXTRA_OECMAKE_append_class-target = "\ | |||
145 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | 151 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ |
146 | -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ | 152 | -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ |
147 | -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ | 153 | -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ |
148 | -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS_TO_BUILD_TARGET}' \ | ||
149 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ | 154 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ |
150 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ | 155 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ |
151 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ | 156 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ |
157 | -DCMAKE_STRIP=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-strip \ | ||
152 | -DLLVM_TARGET_ARCH=${@get_clang_target_arch(bb, d)} \ | 158 | -DLLVM_TARGET_ARCH=${@get_clang_target_arch(bb, d)} \ |
153 | -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_SYS}${HF} \ | 159 | -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_SYS}${HF} \ |
160 | -DLLVM_HOST_TRIPLE=${TARGET_SYS}${HF} \ | ||
154 | -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ | 161 | -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ |
155 | -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ | 162 | -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ |
156 | -DLLVM_LIBDIR_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ | 163 | -DLLVM_LIBDIR_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ |
@@ -161,9 +168,6 @@ DEPENDS = "binutils zlib libffi libxml2 libxml2-native ninja-native swig-native" | |||
161 | DEPENDS_append_class-nativesdk = " clang-crosssdk-${SDK_ARCH} virtual/${TARGET_PREFIX}binutils-crosssdk nativesdk-python3" | 168 | DEPENDS_append_class-nativesdk = " clang-crosssdk-${SDK_ARCH} virtual/${TARGET_PREFIX}binutils-crosssdk nativesdk-python3" |
162 | DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} python3" | 169 | DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} python3" |
163 | 170 | ||
164 | COMPATIBLE_HOST_riscv64 = "null" | ||
165 | COMPATIBLE_HOST_riscv32 = "null" | ||
166 | |||
167 | RRECOMMENDS_${PN} = "binutils" | 171 | RRECOMMENDS_${PN} = "binutils" |
168 | RRECOMMENDS_${PN}_append_class-target = " libcxx-dev" | 172 | RRECOMMENDS_${PN}_append_class-target = " libcxx-dev" |
169 | 173 | ||
@@ -189,13 +193,16 @@ endif()\n" ${D}${libdir}/cmake/llvm/LLVMExports-release.cmake | |||
189 | lnr ${D}${nonarch_libdir}/clang ${D}${libdir}/clang | 193 | lnr ${D}${nonarch_libdir}/clang ${D}${libdir}/clang |
190 | rmdir --ignore-fail-on-non-empty ${D}${libdir} | 194 | rmdir --ignore-fail-on-non-empty ${D}${libdir} |
191 | fi | 195 | fi |
196 | for t in clang clang++ llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip; do | ||
197 | ln -sf $t ${D}${bindir}/${TARGET_PREFIX}$t | ||
198 | done | ||
192 | } | 199 | } |
193 | 200 | ||
194 | do_install_append_class-native () { | 201 | do_install_append_class-native () { |
195 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tblgen ${D}${bindir}/clang-tblgen | 202 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tblgen ${D}${bindir}/clang-tblgen |
196 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/lldb-tblgen ${D}${bindir}/lldb-tblgen | 203 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/lldb-tblgen ${D}${bindir}/lldb-tblgen |
197 | for f in `find ${D}${bindir} -executable -type f -not -type l`; do | 204 | for f in `find ${D}${bindir} -executable -type f -not -type l`; do |
198 | test -n "`file $f|grep -i ELF`" && ${STRIP} $f | 205 | test -n "`file -b $f|grep -i ELF`" && ${STRIP} $f |
199 | echo "stripped $f" | 206 | echo "stripped $f" |
200 | done | 207 | done |
201 | ln -sf clang-tblgen ${D}${bindir}/clang-tblgen${PV} | 208 | ln -sf clang-tblgen ${D}${bindir}/clang-tblgen${PV} |
@@ -207,7 +214,7 @@ do_install_append_class-nativesdk () { | |||
207 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tblgen ${D}${bindir}/clang-tblgen | 214 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tblgen ${D}${bindir}/clang-tblgen |
208 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/lldb-tblgen ${D}${bindir}/lldb-tblgen | 215 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/lldb-tblgen ${D}${bindir}/lldb-tblgen |
209 | for f in `find ${D}${bindir} -executable -type f -not -type l`; do | 216 | for f in `find ${D}${bindir} -executable -type f -not -type l`; do |
210 | test -n "`file $f|grep -i ELF`" && ${STRIP} $f | 217 | test -n "`file -b $f|grep -i ELF`" && ${STRIP} $f |
211 | done | 218 | done |
212 | ln -sf clang-tblgen ${D}${bindir}/clang-tblgen${PV} | 219 | ln -sf clang-tblgen ${D}${bindir}/clang-tblgen${PV} |
213 | ln -sf llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} | 220 | ln -sf llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} |
@@ -288,3 +295,14 @@ TOOLCHAIN_class-native = "gcc" | |||
288 | TOOLCHAIN_class-nativesdk = "clang" | 295 | TOOLCHAIN_class-nativesdk = "clang" |
289 | 296 | ||
290 | SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" | 297 | SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" |
298 | |||
299 | SYSROOT_PREPROCESS_FUNCS_append_class-target = " clang_sysroot_preprocess" | ||
300 | |||
301 | clang_sysroot_preprocess() { | ||
302 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
303 | install -m 0755 ${S}/../llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
304 | ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} | ||
305 | # LLDTargets.cmake references the lld executable(!) that some modules/plugins link to | ||
306 | install -d ${SYSROOT_DESTDIR}${bindir} | ||
307 | install -m 755 ${D}${bindir}/lld ${SYSROOT_DESTDIR}${bindir}/ | ||
308 | } | ||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index c7f4073..e211258 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
@@ -8,11 +8,12 @@ LICENSE = "Apache-2.0-with-LLVM-exception" | |||
8 | BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}" | 8 | BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}" |
9 | SRC_URI = "\ | 9 | SRC_URI = "\ |
10 | ${BASEURI} \ | 10 | ${BASEURI} \ |
11 | file://llvm-config \ | ||
11 | file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ | 12 | file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ |
12 | file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ | 13 | file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ |
13 | file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \ | 14 | file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \ |
14 | file://0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ | 15 | file://0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ |
15 | file://0001-compiler-rt-Fix-realpath-already-defined-error.patch \ | 16 | file://0005-compiler-rt-Disable-tsan-on-OE-glibc.patch \ |
16 | file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ | 17 | file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ |
17 | file://0007-llvm-allow-env-override-of-exe-path.patch \ | 18 | file://0007-llvm-allow-env-override-of-exe-path.patch \ |
18 | file://0008-clang-driver-Check-sysroot-for-ldso-path.patch \ | 19 | file://0008-clang-driver-Check-sysroot-for-ldso-path.patch \ |
@@ -24,21 +25,23 @@ SRC_URI = "\ | |||
24 | file://0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch \ | 25 | file://0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch \ |
25 | file://0015-clang-scan-view-needs-python-2.x.patch \ | 26 | file://0015-clang-scan-view-needs-python-2.x.patch \ |
26 | file://0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ | 27 | file://0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ |
27 | file://0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch \ | 28 | file://0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ |
28 | file://0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ | 29 | file://0018-Check-for-atomic-double-intrinsics.patch \ |
29 | file://0019-Check-for-atomic-double-intrinsics.patch \ | 30 | file://0019-clang-Enable-SSP-and-PIE-by-default.patch \ |
30 | file://0020-clang-Enable-SSP-and-PIE-by-default.patch \ | 31 | file://0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ |
31 | file://0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ | 32 | file://0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ |
32 | file://0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ | 33 | file://0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ |
33 | file://0023-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ | 34 | file://0023-fix-path-to-libffi.patch \ |
34 | file://0024-fix-path-to-libffi.patch \ | 35 | file://0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ |
35 | file://0025-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ | 36 | file://0025-clang-Use-python3-in-python-scripts.patch \ |
36 | file://0026-OpenCL-Fix-support-for-cl_khr_mipmap_image_writes.patch \ | 37 | file://0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ |
37 | file://0027-InstCombine-visitBitCast-do-not-crash-on-weird-bitca.patch;patchdir=llvm \ | 38 | file://0027-compiler-rt-Include-stddef.h.patch \ |
38 | file://0028-nfc-Fix-missing-include.patch \ | 39 | file://0028-llvm-Do-not-use-find_library-for-ncurses.patch \ |
39 | file://0029-OpenMP-link-fix.patch \ | 40 | file://0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ |
41 | file://0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ | ||
42 | file://0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ | ||
43 | file://0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ | ||
40 | " | 44 | " |
41 | |||
42 | # Fallback to no-PIE if not set | 45 | # Fallback to no-PIE if not set |
43 | GCCPIE ??= "" | 46 | GCCPIE ??= "" |
44 | 47 | ||
diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb new file mode 100644 index 0000000..aa3a9ac --- /dev/null +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb | |||
@@ -0,0 +1,97 @@ | |||
1 | # Copyright (C) 2021 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | DESCRIPTION = "LLVM based C/C++ compiler Runtime" | ||
5 | HOMEPAGE = "http://compiler-rt.llvm.org/" | ||
6 | SECTION = "base" | ||
7 | |||
8 | require clang.inc | ||
9 | require common-source.inc | ||
10 | |||
11 | inherit cmake pkgconfig python3native | ||
12 | |||
13 | |||
14 | LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a" | ||
15 | |||
16 | TUNE_CCARGS_remove = "-no-integrated-as" | ||
17 | |||
18 | RUNTIME = "llvm" | ||
19 | |||
20 | DEPENDS += "ninja-native clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" | ||
21 | DEPENDS_append_libc-glibc = " libxcrypt" | ||
22 | DEPENDS_append_class-nativesdk = " clang-native nativesdk-libxcrypt" | ||
23 | |||
24 | PACKAGECONFIG ??= "" | ||
25 | PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" | ||
26 | |||
27 | HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" | ||
28 | HF[vardepvalue] = "${HF}" | ||
29 | |||
30 | OECMAKE_TARGET_COMPILE = "compiler-rt" | ||
31 | OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers" | ||
32 | OECMAKE_SOURCEPATH = "${S}/llvm" | ||
33 | EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ | ||
34 | -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ | ||
35 | -DCOMPILER_RT_BUILD_BUILTINS=OFF \ | ||
36 | -DSANITIZER_CXX_ABI_LIBNAME=${@bb.utils.contains("RUNTIME", "llvm", "libc++", "libstdc++", d)} \ | ||
37 | -DSANITIZER_USE_STATIC_CXX_ABI=ON \ | ||
38 | -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON \ | ||
39 | -DCOMPILER_RT_BUILD_XRAY=ON \ | ||
40 | -DCOMPILER_RT_BUILD_SANITIZERS=ON \ | ||
41 | -DCOMPILER_RT_BUILD_LIBFUZZER=ON \ | ||
42 | -DCOMPILER_RT_BUILD_PROFILE=ON \ | ||
43 | -DCOMPILER_RT_BUILD_MEMPROF=ON \ | ||
44 | -DLLVM_ENABLE_PROJECTS='compiler-rt' \ | ||
45 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ | ||
46 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ | ||
47 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ | ||
48 | -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ | ||
49 | " | ||
50 | |||
51 | EXTRA_OECMAKE_append_class-nativesdk = "\ | ||
52 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
53 | -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ | ||
54 | " | ||
55 | |||
56 | EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " | ||
57 | EXTRA_OECMAKE_append_powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " | ||
58 | |||
59 | do_install_append () { | ||
60 | if [ -n "${LLVM_LIBDIR_SUFFIX}" ]; then | ||
61 | mkdir -p ${D}${nonarch_libdir} | ||
62 | mv ${D}${libdir}/clang ${D}${nonarch_libdir}/clang | ||
63 | rmdir --ignore-fail-on-non-empty ${D}${libdir} | ||
64 | fi | ||
65 | } | ||
66 | |||
67 | FILES_SOLIBSDEV = "" | ||
68 | FILES_${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ | ||
69 | ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ | ||
70 | ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" | ||
71 | FILES_${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" | ||
72 | FILES_${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ | ||
73 | ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include \ | ||
74 | ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \ | ||
75 | ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.asan-preinit*.a \ | ||
76 | " | ||
77 | INSANE_SKIP_${PN} = "dev-so libdir" | ||
78 | INSANE_SKIP_${PN}-dbg = "libdir" | ||
79 | |||
80 | #PROVIDES_append_class-target = "\ | ||
81 | # virtual/${TARGET_PREFIX}compilerlibs \ | ||
82 | # libgcc \ | ||
83 | # libgcc-initial \ | ||
84 | # libgcc-dev \ | ||
85 | # libgcc-initial-dev \ | ||
86 | # " | ||
87 | # | ||
88 | |||
89 | RDEPENDS_${PN}-dev += "${PN}-staticdev" | ||
90 | |||
91 | BBCLASSEXTEND = "native nativesdk" | ||
92 | |||
93 | ALLOW_EMPTY_${PN} = "1" | ||
94 | ALLOW_EMPTY_${PN}-dev = "1" | ||
95 | |||
96 | TOOLCHAIN_forcevariable = "clang" | ||
97 | SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" | ||
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 9178031..6dac9f6 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb | |||
@@ -19,7 +19,7 @@ TUNE_CCARGS_remove = "-no-integrated-as" | |||
19 | 19 | ||
20 | INHIBIT_DEFAULT_DEPS = "1" | 20 | INHIBIT_DEFAULT_DEPS = "1" |
21 | 21 | ||
22 | DEPENDS += "ninja-native clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs virtual/crypt" | 22 | DEPENDS += "ninja-native clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" |
23 | DEPENDS_append_class-nativesdk = " clang-native" | 23 | DEPENDS_append_class-nativesdk = " clang-native" |
24 | 24 | ||
25 | PACKAGECONFIG ??= "" | 25 | PACKAGECONFIG ??= "" |
@@ -34,6 +34,10 @@ OECMAKE_SOURCEPATH = "${S}/llvm" | |||
34 | EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ | 34 | EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ |
35 | -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ | 35 | -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ |
36 | -DCOMPILER_RT_BUILD_XRAY=OFF \ | 36 | -DCOMPILER_RT_BUILD_XRAY=OFF \ |
37 | -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ | ||
38 | -DCOMPILER_RT_BUILD_MEMPROF=OFF \ | ||
39 | -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ | ||
40 | -DCOMPILER_RT_BUILD_PROFILE=ON \ | ||
37 | -DLLVM_ENABLE_PROJECTS='compiler-rt' \ | 41 | -DLLVM_ENABLE_PROJECTS='compiler-rt' \ |
38 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ | 42 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ |
39 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ | 43 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ |
@@ -45,10 +49,6 @@ EXTRA_OECMAKE_append_class-nativesdk = "\ | |||
45 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | 49 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ |
46 | -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ | 50 | -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ |
47 | " | 51 | " |
48 | |||
49 | EXTRA_OECMAKE_append_libc-musl = " -DCOMPILER_RT_BUILD_SANITIZERS=OFF " | ||
50 | CXXFLAGS_append_libc-musl = " -D_LIBCPP_HAS_MUSL_LIBC=ON " | ||
51 | EXTRA_OECMAKE_append_mipsarch = " -DCOMPILER_RT_BUILD_SANITIZERS=OFF " | ||
52 | EXTRA_OECMAKE_append_powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " | 52 | EXTRA_OECMAKE_append_powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " |
53 | 53 | ||
54 | do_install_append () { | 54 | do_install_append () { |
diff --git a/recipes-devtools/clang/libclc_git.bb b/recipes-devtools/clang/libclc_git.bb new file mode 100644 index 0000000..9525b25 --- /dev/null +++ b/recipes-devtools/clang/libclc_git.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | DESCRIPTION = "LLVM based OpenCL runtime support library" | ||
2 | HOMEPAGE = "http://libclc.llvm.org/" | ||
3 | SECTION = "libs" | ||
4 | |||
5 | require clang.inc | ||
6 | require common-source.inc | ||
7 | |||
8 | TOOLCHAIN = "clang" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://libclc/LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db" | ||
11 | |||
12 | inherit cmake pkgconfig python3native qemu | ||
13 | |||
14 | DEPENDS += "qemu-native clang spirv-tools spirv-llvm-translator spirv-llvm-translator-native ncurses" | ||
15 | |||
16 | OECMAKE_SOURCEPATH = "${S}/libclc" | ||
17 | |||
18 | EXTRA_OECMAKE += " \ | ||
19 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
20 | -Dclc_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeCLCCompiler.cmake.in \ | ||
21 | -Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \ | ||
22 | " | ||
23 | |||
24 | do_configure_prepend () { | ||
25 | # Write out a qemu wrapper that will be used by cmake | ||
26 | # so that it can run target helper binaries through that. | ||
27 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
28 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
29 | #!/bin/sh | ||
30 | $qemu_binary "\$@" | ||
31 | EOF | ||
32 | chmod +x ${WORKDIR}/qemuwrapper | ||
33 | } | ||
34 | |||
35 | FILES_${PN} += "${datadir}/clc" | ||
36 | |||
37 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 789da5b..80eaa78 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb | |||
@@ -11,8 +11,6 @@ require common-source.inc | |||
11 | inherit cmake python3native | 11 | inherit cmake python3native |
12 | 12 | ||
13 | PACKAGECONFIG ??= "compiler-rt exceptions ${@bb.utils.contains("RUNTIME", "llvm", "unwind", "", d)}" | 13 | PACKAGECONFIG ??= "compiler-rt exceptions ${@bb.utils.contains("RUNTIME", "llvm", "unwind", "", d)}" |
14 | PACKAGECONFIG_riscv32 = "exceptions" | ||
15 | PACKAGECONFIG_riscv64 = "exceptions" | ||
16 | PACKAGECONFIG_append_armv5 = " no-atomics" | 14 | PACKAGECONFIG_append_armv5 = " no-atomics" |
17 | 15 | ||
18 | PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=ON -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON,-DLIBCXXABI_USE_LLVM_UNWINDER=OFF,," | 16 | PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=ON -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON,-DLIBCXXABI_USE_LLVM_UNWINDER=OFF,," |
@@ -24,7 +22,7 @@ DEPENDS += "ninja-native" | |||
24 | DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" | 22 | DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" |
25 | 23 | ||
26 | LIBCPLUSPLUS = "" | 24 | LIBCPLUSPLUS = "" |
27 | COMPILER_RT ?= "-rtlib=compiler-rt ${UNWINDLIB}" | 25 | COMPILER_RT ?= "${@bb.utils.contains("PACKAGECONFIG", "compiler-rt", "-rtlib=compiler-rt", "", d)} ${UNWINDLIB}" |
28 | UNWINDLIB ?= "${@bb.utils.contains("RUNTIME", "gnu", "--unwindlib=libgcc", "", d)}" | 26 | UNWINDLIB ?= "${@bb.utils.contains("RUNTIME", "gnu", "--unwindlib=libgcc", "", d)}" |
29 | 27 | ||
30 | INHIBIT_DEFAULT_DEPS = "1" | 28 | INHIBIT_DEFAULT_DEPS = "1" |
diff --git a/recipes-devtools/clang/llvm-common.bb b/recipes-devtools/clang/llvm-common.bb deleted file mode 100644 index 893abd1..0000000 --- a/recipes-devtools/clang/llvm-common.bb +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | SUMMARY = "Helper script for OE's llvm support" | ||
2 | LICENSE = "Apache-2.0-with-LLVM-exception" | ||
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab" | ||
4 | |||
5 | SRC_URI = "file://llvm-config" | ||
6 | |||
7 | S = "${WORKDIR}" | ||
8 | |||
9 | ALLOW_EMPTY_${PN} = "1" | ||
10 | SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_common_sysroot_preprocess" | ||
11 | |||
12 | llvm_common_sysroot_preprocess() { | ||
13 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
14 | install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
15 | } | ||
16 | |||
17 | do_install_class-native() { | ||
18 | install -d ${D}${bindir} | ||
19 | install -m 0755 ${WORKDIR}/llvm-config ${D}${bindir} | ||
20 | } | ||
21 | |||
22 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-devtools/clang/llvm-project-source.bbappend b/recipes-devtools/clang/llvm-project-source.bbappend new file mode 100644 index 0000000..5d47c23 --- /dev/null +++ b/recipes-devtools/clang/llvm-project-source.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | # This needs to override meta-intel (which pulls in the | ||
2 | # LLVM 10/11 version of SPIRV-LLVM-Translator) | ||
3 | |||
4 | SPIRV_BRANCH = "llvm_release_120" | ||
5 | SRC_URI_append_intel-x86-common = " \ | ||
6 | git://github.com/KhronosGroup/SPIRV-LLVM-Translator.git;protocol=https;branch=${SPIRV_BRANCH};destsuffix=git/llvm/projects/llvm-spirv;name=spirv \ | ||
7 | " | ||
8 | SRCREV_spirv = "67d3e271a28287b2c92ecef2f5e98c49134e5946" | ||
9 | |||
diff --git a/recipes-devtools/clang/llvm-project-source.inc b/recipes-devtools/clang/llvm-project-source.inc index f6c552d..d7b91e0 100644 --- a/recipes-devtools/clang/llvm-project-source.inc +++ b/recipes-devtools/clang/llvm-project-source.inc | |||
@@ -18,3 +18,39 @@ STAMPCLEAN = "${STAMPS_DIR}/work-shared/llvm-project-source-${PV}-*" | |||
18 | INHIBIT_DEFAULT_DEPS = "1" | 18 | INHIBIT_DEFAULT_DEPS = "1" |
19 | DEPENDS = "" | 19 | DEPENDS = "" |
20 | PACKAGES = "" | 20 | PACKAGES = "" |
21 | |||
22 | # space separated list of additional distro vendor values we want to support e.g. | ||
23 | # "yoe webos" or "-yoe -webos" '-' is optional | ||
24 | CLANG_EXTRA_OE_VENDORS ?= "${TARGET_VENDOR} ${SDK_VENDOR}" | ||
25 | |||
26 | python add_distro_vendor() { | ||
27 | import subprocess | ||
28 | case = "" | ||
29 | triple = "" | ||
30 | vendors = d.getVar('CLANG_EXTRA_OE_VENDORS') | ||
31 | multilib_variants = d.getVar('MULTILIB_VARIANTS').split() | ||
32 | vendors_to_add = [] | ||
33 | for vendor in vendors.split(): | ||
34 | # convert -yoe into yoe | ||
35 | vendor = vendor.lstrip('-') | ||
36 | # generate possible multilib vendor names for yoe | ||
37 | # such as yoemllib32 | ||
38 | vendors_to_add.extend([vendor + 'ml' + variant for variant in multilib_variants]) | ||
39 | # skip oe since already part of the cpp file | ||
40 | if vendor != "oe": | ||
41 | vendors_to_add.append(vendor) | ||
42 | |||
43 | for vendor_to_add in vendors_to_add: | ||
44 | case += '\\n .Case("' + vendor_to_add + '", Triple::OpenEmbedded)' | ||
45 | triple += ' "x86_64-' + vendor_to_add + '-linux",' | ||
46 | |||
47 | bb.note("Adding support following TARGET_VENDOR values") | ||
48 | bb.note(str(vendors_to_add)) | ||
49 | bb.note("in llvm/lib/Support/Triple.cpp and ${S}/clang/lib/Driver/ToolChains/Gnu.cpp") | ||
50 | cmd = d.expand("sed -i 's#//CLANG_EXTRA_OE_VENDORS_TRIPLES#%s#g' ${S}/clang/lib/Driver/ToolChains/Gnu.cpp" % (triple)) | ||
51 | subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | ||
52 | cmd = d.expand("sed -i 's#//CLANG_EXTRA_OE_VENDORS_CASES#%s#g' -i ${S}/llvm/lib/Support/Triple.cpp" % (case)) | ||
53 | subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | ||
54 | } | ||
55 | |||
56 | do_patch[postfuncs] += "add_distro_vendor" | ||
diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb index 4c6be98..a1fa3b1 100644 --- a/recipes-devtools/clang/openmp_git.bb +++ b/recipes-devtools/clang/openmp_git.bb | |||
@@ -34,8 +34,7 @@ FILES_SOLIBSDEV = "" | |||
34 | FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}" | 34 | FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}" |
35 | INSANE_SKIP_${PN} = "dev-so" | 35 | INSANE_SKIP_${PN} = "dev-so" |
36 | 36 | ||
37 | COMPATIBLE_HOST_riscv64 = "null" | ||
38 | COMPATIBLE_HOST_riscv32 = "null" | ||
39 | COMPATIBLE_HOST_mips64 = "null" | 37 | COMPATIBLE_HOST_mips64 = "null" |
38 | COMPATIBLE_HOST_riscv32 = "null" | ||
40 | 39 | ||
41 | BBCLASSEXTEND = "native nativesdk" | 40 | BBCLASSEXTEND = "native nativesdk" |