summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-07-29 23:04:31 -0700
committerKhem Raj <raj.khem@gmail.com>2019-08-12 22:00:22 -0700
commit610a8e1a2ce02b77f905bac261e80b023450b573 (patch)
tree3618fab7398e489267dfee8dd1dc485ba1d1d948
parentc969fa61147845efdc6d3a47c782e2a71de745f9 (diff)
downloadmeta-clang-610a8e1a2ce02b77f905bac261e80b023450b573.tar.gz
clang: Upgrade to 9.x-rcX
dont package six.py, its provided by python3-six package default to lp64d ABI and rv64gc ISA. Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-devtools/clang/clang-cross-canadian_git.bb3
-rw-r--r--recipes-devtools/clang/clang-cross_git.bb3
-rw-r--r--recipes-devtools/clang/clang-crosssdk_git.bb3
-rw-r--r--recipes-devtools/clang/clang.inc14
-rw-r--r--recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch (renamed from recipes-devtools/clang/clang/0014-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch)8
-rw-r--r--recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch (renamed from recipes-devtools/clang/clang/0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch)19
-rw-r--r--recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch (renamed from recipes-devtools/clang/clang/0016-compiler-rt-support-a-new-embedded-linux-target.patch)19
-rw-r--r--recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch (renamed from recipes-devtools/clang/clang/0017-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch)10
-rw-r--r--recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch (renamed from recipes-devtools/clang/clang/0018-compiler-rt-Disable-tsan-on-OE-glibc.patch)33
-rw-r--r--recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch (renamed from recipes-devtools/clang/clang/0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch)22
-rw-r--r--recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch (renamed from recipes-devtools/clang/clang/0012-llvm-allow-env-override-of-exe-path.patch)10
-rw-r--r--recipes-devtools/clang/clang/0008-llvm-Enhance-path-prefix-mapping.patch (renamed from recipes-devtools/clang/clang/0019-llvm-Enhance-path-prefix-mapping.patch)16
-rw-r--r--recipes-devtools/clang/clang/0009-clang-Enable-SSP-and-PIE-by-default.patch (renamed from recipes-devtools/clang/clang/0001-clang-Enable-SSP-and-PIE-by-default.patch)16
-rw-r--r--recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch33
-rw-r--r--recipes-devtools/clang/clang/0010-clang-driver-Use-lib-for-ldso-on-OE.patch (renamed from recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch)14
-rw-r--r--recipes-devtools/clang/clang/0011-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch (renamed from recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch)12
-rw-r--r--recipes-devtools/clang/clang/0012-clang-musl-ppc-does-not-support-128-bit-long-double.patch (renamed from recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch)12
-rw-r--r--recipes-devtools/clang/clang/0013-clang-Prepend-trailing-to-sysroot.patch (renamed from recipes-devtools/clang/clang/0005-clang-Prepend-trailing-to-sysroot.patch)10
-rw-r--r--recipes-devtools/clang/clang/0013-llvm-AARCH64-Add-support-for-.dword-directives.patch57
-rw-r--r--recipes-devtools/clang/clang/0014-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch (renamed from recipes-devtools/clang/clang/0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch)12
-rw-r--r--recipes-devtools/clang/clang/0015-clang-Define-releative-gcc-installation-dir.patch (renamed from recipes-devtools/clang/clang/0007-clang-Define-releative-gcc-installation-dir.patch)10
-rw-r--r--recipes-devtools/clang/clang/0016-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch (renamed from recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch)12
-rw-r--r--recipes-devtools/clang/clang/0017-clang-scan-view-needs-python-2.x.patch (renamed from recipes-devtools/clang/clang/0009-clang-scan-view-needs-python-2.x.patch)6
-rw-r--r--recipes-devtools/clang/clang/0018-clang-Initial-implementation-of-fmacro-prefix-map-an.patch (renamed from recipes-devtools/clang/clang/0020-clang-Initial-implementation-of-fmacro-prefix-map-an.patch)66
-rw-r--r--recipes-devtools/clang/clang/0019-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch39
-rw-r--r--recipes-devtools/clang/clang/0020-clang-default-to-lp64d-ABI-and-rv64gc-ISA.patch52
-rw-r--r--recipes-devtools/clang/clang_git.bb1
-rw-r--r--recipes-devtools/clang/common.inc42
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb9
-rw-r--r--recipes-devtools/clang/libcxx_git.bb7
-rw-r--r--recipes-devtools/clang/lldb_git.bb1
-rw-r--r--recipes-devtools/clang/llvm-common.bb4
-rw-r--r--recipes-devtools/clang/nativesdk-clang-glue.bb4
-rw-r--r--recipes-devtools/clang/openmp_git.bb5
34 files changed, 288 insertions, 296 deletions
diff --git a/recipes-devtools/clang/clang-cross-canadian_git.bb b/recipes-devtools/clang/clang-cross-canadian_git.bb
index e93e8a4..b16dbe1 100644
--- a/recipes-devtools/clang/clang-cross-canadian_git.bb
+++ b/recipes-devtools/clang/clang-cross-canadian_git.bb
@@ -3,8 +3,7 @@
3 3
4DESCRIPTION = "Clang/LLVM based C/C++ compiler (cross-canadian for ${TARGET_ARCH} target)" 4DESCRIPTION = "Clang/LLVM based C/C++ compiler (cross-canadian for ${TARGET_ARCH} target)"
5HOMEPAGE = "http://clang.llvm.org/" 5HOMEPAGE = "http://clang.llvm.org/"
6LICENSE = "NCSA" 6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
7LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7"
8SECTION = "devel" 7SECTION = "devel"
9 8
10PN = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}" 9PN = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}"
diff --git a/recipes-devtools/clang/clang-cross_git.bb b/recipes-devtools/clang/clang-cross_git.bb
index ffe144a..fd8ece5 100644
--- a/recipes-devtools/clang/clang-cross_git.bb
+++ b/recipes-devtools/clang/clang-cross_git.bb
@@ -3,8 +3,7 @@
3 3
4DESCRIPTION = "Cross compiler wrappers for LLVM based C/C++ compiler" 4DESCRIPTION = "Cross compiler wrappers for LLVM based C/C++ compiler"
5HOMEPAGE = "http://clang.llvm.org/" 5HOMEPAGE = "http://clang.llvm.org/"
6LICENSE = "NCSA" 6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
7LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7"
8SECTION = "devel" 7SECTION = "devel"
9 8
10PN = "clang-cross-${TARGET_ARCH}" 9PN = "clang-cross-${TARGET_ARCH}"
diff --git a/recipes-devtools/clang/clang-crosssdk_git.bb b/recipes-devtools/clang/clang-crosssdk_git.bb
index 8f07a83..eaea765 100644
--- a/recipes-devtools/clang/clang-crosssdk_git.bb
+++ b/recipes-devtools/clang/clang-crosssdk_git.bb
@@ -3,8 +3,7 @@
3 3
4DESCRIPTION = "SDK Cross compiler wrappers for LLVM based C/C++ compiler" 4DESCRIPTION = "SDK Cross compiler wrappers for LLVM based C/C++ compiler"
5HOMEPAGE = "http://clang.llvm.org/" 5HOMEPAGE = "http://clang.llvm.org/"
6LICENSE = "NCSA" 6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
7LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7"
8SECTION = "devel" 7SECTION = "devel"
9 8
10PN = "clang-crosssdk-${TARGET_ARCH}" 9PN = "clang-crosssdk-${TARGET_ARCH}"
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc
index 3a0e01a..60e74d5 100644
--- a/recipes-devtools/clang/clang.inc
+++ b/recipes-devtools/clang/clang.inc
@@ -4,18 +4,18 @@ LLVM_DIR = "llvm${LLVM_RELEASE}"
4LLVM_GIT ?= "git://github.com/llvm" 4LLVM_GIT ?= "git://github.com/llvm"
5LLVM_GIT_PROTOCOL ?= "https" 5LLVM_GIT_PROTOCOL ?= "https"
6 6
7MAJOR_VER = "8" 7MAJOR_VER = "9"
8MINOR_VER = "0" 8MINOR_VER = "0"
9PATCH_VER = "1" 9PATCH_VER = "0"
10 10
11SRCREV ?= "19a71f6bdf2dddb10764939e7f0ec2b98dba76c9" 11SRCREV ?= "4b59015880aa4db564f6aaa9c11cade58adb9f4e"
12 12
13PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" 13PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}"
14BRANCH = "release/${MAJOR_VER}.x" 14BRANCH = "release/${MAJOR_VER}.x"
15 15
16LLVMMD5SUM = "c6b766a4e85dd28301eeed54a6684648" 16LLVMMD5SUM = "8a15a0759ef07f2682d2ba4b893c9afe"
17CLANGMD5SUM = "9a0fe3a7846ba0ffc822a70d6f7f6903" 17CLANGMD5SUM = "ff42885ed2ab98f1ecb8c1fc41205343"
18LLDMD5SUM = "f4941ace8ddb3d6cf177fff94966319a" 18LLDMD5SUM = "ae7dc7c027b1fa89b5b013d391d3ee2b"
19LLDBMD5SUM = "b6320ed0b0d00ae661dd94f277bbf024" 19LLDBMD5SUM = "2e0d44968471fcde980034dbb826bea9"
20 20
21require common.inc 21require common.inc
diff --git a/recipes-devtools/clang/clang/0014-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 b9b67cb..79ad13f 100644
--- a/recipes-devtools/clang/clang/0014-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,7 +1,7 @@
1From 6f7cf16d8a891d7e1cdc143dc21623175373c33b Mon Sep 17 00:00:00 2001 1From 79ec5a3eca699011c6f95de36ce027dbfdad0aff Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 22 May 2017 17:36:16 -0700 3Date: Mon, 22 May 2017 17:36:16 -0700
4Subject: [PATCH 14/18] lldb: Add -lxml2 to linker cmdline of xml is found 4Subject: [PATCH 01/20] lldb: Add -lxml2 to linker cmdline of xml is found
5 5
6When cross compiling for systems where static libs 6When cross compiling for systems where static libs
7for libxml are not available cmake's detection mechanism 7for libxml are not available cmake's detection mechanism
@@ -23,7 +23,7 @@ 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
25diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt 25diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt
26index 333f109a9a2..a5237c4b779 100644 26index 4bb8d363b57..3b58c36c641 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@@ -148,7 +148,7 @@ if (APPLE) 29@@ -148,7 +148,7 @@ if (APPLE)
@@ -36,5 +36,5 @@ index 333f109a9a2..a5237c4b779 100644
36 endif () 36 endif ()
37 if (HAVE_LIBDL) 37 if (HAVE_LIBDL)
38-- 38--
392.20.1 392.22.0
40 40
diff --git a/recipes-devtools/clang/clang/0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
index a6d9183..bdd148e 100644
--- a/recipes-devtools/clang/clang/0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
+++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
@@ -1,7 +1,7 @@
1From 74775fbe6fcee36cbc74703f824a95ef883392e2 Mon Sep 17 00:00:00 2001 1From 112e33992bbe21dceb1d14978585bd9d083648ec Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 27 Aug 2017 10:37:49 -0700 3Date: Sun, 27 Aug 2017 10:37:49 -0700
4Subject: [PATCH 15/18] libcxxabi: Find libunwind headers when 4Subject: [PATCH 02/20] libcxxabi: Find libunwind headers when
5 LIBCXXABI_LIBUNWIND_INCLUDES is set 5 LIBCXXABI_LIBUNWIND_INCLUDES is set
6 6
7Currently, when LIBCXXABI_LIBUNWIND_INCLUDES is set via CMake arguments 7Currently, when LIBCXXABI_LIBUNWIND_INCLUDES is set via CMake arguments
@@ -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
19diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt 19diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
20index 92c7dc5dc55..d67bb43aba3 100644 20index ce69fff1370..47e09e34fc2 100644
21--- a/libcxxabi/CMakeLists.txt 21--- a/libcxxabi/CMakeLists.txt
22+++ b/libcxxabi/CMakeLists.txt 22+++ b/libcxxabi/CMakeLists.txt
23@@ -434,15 +434,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") 23@@ -455,14 +455,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}")
24 # Setup Source Code 24 # Setup Source Code
25 #=============================================================================== 25 #===============================================================================
26 26
@@ -31,13 +31,12 @@ index 92c7dc5dc55..d67bb43aba3 100644
31- 31-
32 include_directories(include) 32 include_directories(include)
33 if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) 33 if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
34 find_path( 34- find_path(LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL libunwind.h
35- LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL 35+ find_path(LIBCXXABI_LIBUNWIND_INCLUDES libunwind.h
36+ LIBCXXABI_LIBUNWIND_INCLUDES
37 libunwind.h
38 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} 36 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES}
39 ${LIBCXXABI_LIBUNWIND_PATH}/include 37 ${LIBCXXABI_LIBUNWIND_PATH}/include
40@@ -454,15 +449,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) 38 ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES}
39@@ -473,15 +468,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
41 NO_CMAKE_FIND_ROOT_PATH 40 NO_CMAKE_FIND_ROOT_PATH
42 ) 41 )
43 42
@@ -64,5 +63,5 @@ index 92c7dc5dc55..d67bb43aba3 100644
64 # soname, etc... 63 # soname, etc...
65 add_subdirectory(src) 64 add_subdirectory(src)
66-- 65--
672.20.1 662.22.0
68 67
diff --git a/recipes-devtools/clang/clang/0016-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 0539989..4a6a915 100644
--- a/recipes-devtools/clang/clang/0016-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,31 +1,30 @@
1From 81fb306633c76d1ff8956af426173c6da811e605 Mon Sep 17 00:00:00 2001 1From fb4985d596e3f1d74de0b62074b121f8a368c88d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 19 Apr 2015 15:16:23 -0700 3Date: Sun, 19 Apr 2015 15:16:23 -0700
4Subject: [PATCH 16/18] compiler-rt: support a new embedded linux target 4Subject: [PATCH 03/20] compiler-rt: support a new embedded linux target
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7--- 7---
8 compiler-rt/lib/builtins/int_util.c | 3 +- 8 compiler-rt/lib/builtins/int_util.c | 2 +-
9 .../make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++ 9 .../make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++
10 .../clang_linux_embedded_test_input.c | 0 10 .../clang_linux_embedded_test_input.c | 0
11 3 files changed, 287 insertions(+), 2 deletions(-) 11 3 files changed, 287 insertions(+), 1 deletion(-)
12 create mode 100644 compiler-rt/make/platform/clang_linux_embedded.mk 12 create mode 100644 compiler-rt/make/platform/clang_linux_embedded.mk
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
15diff --git a/compiler-rt/lib/builtins/int_util.c b/compiler-rt/lib/builtins/int_util.c 15diff --git a/compiler-rt/lib/builtins/int_util.c b/compiler-rt/lib/builtins/int_util.c
16index 752f2015580..494c870b41d 100644 16index 226a6e93440..efc977acbb3 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@@ -58,8 +58,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) {
20 #else 20 #else
21 21
22 /* Get the system definition of abort() */ 22 // Get the system definition of abort()
23-#include <stdlib.h> 23-#include <stdlib.h>
24-
25+extern void abort (void) __attribute__ ((__noreturn__)); 24+extern void abort (void) __attribute__ ((__noreturn__));
25
26 #ifndef _WIN32 26 #ifndef _WIN32
27 __attribute__((weak)) 27 __attribute__((weak))
28 __attribute__((visibility("hidden")))
29diff --git a/compiler-rt/make/platform/clang_linux_embedded.mk b/compiler-rt/make/platform/clang_linux_embedded.mk 28diff --git a/compiler-rt/make/platform/clang_linux_embedded.mk b/compiler-rt/make/platform/clang_linux_embedded.mk
30new file mode 100644 29new file mode 100644
31index 00000000000..d0a890075a1 30index 00000000000..d0a890075a1
@@ -322,5 +321,5 @@ diff --git a/compiler-rt/make/platform/clang_linux_embedded_test_input.c b/compi
322new file mode 100644 321new file mode 100644
323index 00000000000..e69de29bb2d 322index 00000000000..e69de29bb2d
324-- 323--
3252.20.1 3242.22.0
326 325
diff --git a/recipes-devtools/clang/clang/0017-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 65bbf62..0de7b14 100644
--- a/recipes-devtools/clang/clang/0017-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,7 +1,7 @@
1From 988c7e3842fcca00faf03d735bd1a25c9e1da30f Mon Sep 17 00:00:00 2001 1From cf524dbb79dd6cd5ad2daf41683c7ecadd32009d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 23:11:45 -0700 3Date: Thu, 19 May 2016 23:11:45 -0700
4Subject: [PATCH 17/18] compiler-rt: Simplify cross-compilation. Don't use 4Subject: [PATCH 04/20] compiler-rt: Simplify cross-compilation. Don't use
5 native-compiled llvm-config. 5 native-compiled llvm-config.
6 6
7 Note: AddLLVM.cmake does not expose the LLVM source directory. 7 Note: AddLLVM.cmake does not expose the LLVM source directory.
@@ -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
22diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt 22diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
23index aa360a3ef36..264d39c95c3 100644 23index ae4ed3857db..dbc10652c28 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@@ -66,7 +66,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN 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)
@@ -42,5 +42,5 @@ index aa360a3ef36..264d39c95c3 100644
42 # Loading the llvm config causes this target to be imported so place it 42 # Loading the llvm config causes this target to be imported so place it
43 # under the appropriate folder in an IDE. 43 # under the appropriate folder in an IDE.
44-- 44--
452.20.1 452.22.0
46 46
diff --git a/recipes-devtools/clang/clang/0018-compiler-rt-Disable-tsan-on-OE-glibc.patch b/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch
index 6a690c7..137c309 100644
--- a/recipes-devtools/clang/clang/0018-compiler-rt-Disable-tsan-on-OE-glibc.patch
+++ b/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch
@@ -1,7 +1,7 @@
1From 80820b9db8217eeaee5675795380d9b3b1b9c410 Mon Sep 17 00:00:00 2001 1From 28443a32a50da7631e24e9892f3ab420d1fb4a01 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 18 Jul 2016 08:05:02 +0000 3Date: Mon, 18 Jul 2016 08:05:02 +0000
4Subject: [PATCH 18/18] compiler-rt: Disable tsan on OE/glibc 4Subject: [PATCH 05/20] compiler-rt: Disable tsan on OE/glibc
5 5
6It does not build see 6It does not build see
7http://lists.llvm.org/pipermail/llvm-dev/2016-July/102235.html 7http://lists.llvm.org/pipermail/llvm-dev/2016-July/102235.html
@@ -9,14 +9,14 @@ http://lists.llvm.org/pipermail/llvm-dev/2016-July/102235.html
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10--- 10---
11 compiler-rt/cmake/config-ix.cmake | 2 +- 11 compiler-rt/cmake/config-ix.cmake | 2 +-
12 compiler-rt/test/sanitizer_common/CMakeLists.txt | 1 - 12 compiler-rt/test/sanitizer_common/CMakeLists.txt | 2 +-
13 2 files changed, 1 insertion(+), 2 deletions(-) 13 2 files changed, 2 insertions(+), 2 deletions(-)
14 14
15diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake 15diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
16index 5b943387717..151b6069e16 100644 16index 3cc4c22304e..9da891b62e9 100644
17--- a/compiler-rt/cmake/config-ix.cmake 17--- a/compiler-rt/cmake/config-ix.cmake
18+++ b/compiler-rt/cmake/config-ix.cmake 18+++ b/compiler-rt/cmake/config-ix.cmake
19@@ -594,7 +594,7 @@ else() 19@@ -619,7 +619,7 @@ else()
20 endif() 20 endif()
21 21
22 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND 22 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
@@ -26,17 +26,18 @@ index 5b943387717..151b6069e16 100644
26 else() 26 else()
27 set(COMPILER_RT_HAS_TSAN FALSE) 27 set(COMPILER_RT_HAS_TSAN FALSE)
28diff --git a/compiler-rt/test/sanitizer_common/CMakeLists.txt b/compiler-rt/test/sanitizer_common/CMakeLists.txt 28diff --git a/compiler-rt/test/sanitizer_common/CMakeLists.txt b/compiler-rt/test/sanitizer_common/CMakeLists.txt
29index 23292e54820..cae7e010885 100644 29index 48fccf05855..b4a7f0adf14 100644
30--- a/compiler-rt/test/sanitizer_common/CMakeLists.txt 30--- a/compiler-rt/test/sanitizer_common/CMakeLists.txt
31+++ b/compiler-rt/test/sanitizer_common/CMakeLists.txt 31+++ b/compiler-rt/test/sanitizer_common/CMakeLists.txt
32@@ -8,7 +8,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|SunOS") 32@@ -6,7 +6,7 @@ set(SANITIZER_COMMON_TESTSUITES)
33 list(APPEND SUPPORTED_TOOLS asan) 33 # FIXME(dliew): We should switch to COMPILER_RT_SANITIZERS_TO_BUILD instead of
34 endif() 34 # the hard coded `SUPPORTED_TOOLS_INIT` list once we know that the other
35 if(CMAKE_SYSTEM_NAME MATCHES "NetBSD" OR (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)) 35 # sanitizers work.
36- list(APPEND SUPPORTED_TOOLS tsan) 36-set(SUPPORTED_TOOLS_INIT asan lsan msan tsan ubsan)
37 list(APPEND SUPPORTED_TOOLS msan) 37+set(SUPPORTED_TOOLS_INIT asan lsan msan ubsan)
38 list(APPEND SUPPORTED_TOOLS ubsan) 38 set(SUPPORTED_TOOLS)
39 endif() 39 foreach(SANITIZER_TOOL ${SUPPORTED_TOOLS_INIT})
40 string(TOUPPER ${SANITIZER_TOOL} SANITIZER_TOOL_UPPER)
40-- 41--
412.20.1 422.22.0
42 43
diff --git a/recipes-devtools/clang/clang/0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index 643031d..1d23d71 100644
--- a/recipes-devtools/clang/clang/0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,7 +1,7 @@
1From 2a5fbe70a26e6898d970d0f88355cf92e723c00b Mon Sep 17 00:00:00 2001 1From 45151eede54f84bb1f2c5afae7cfd56eccf8e32b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 21 May 2016 00:33:20 +0000 3Date: Sat, 21 May 2016 00:33:20 +0000
4Subject: [PATCH 11/18] llvm: TargetLibraryInfo: Undefine libc functions if 4Subject: [PATCH 06/20] llvm: TargetLibraryInfo: Undefine libc functions if
5 they are macros 5 they are macros
6 6
7musl defines some functions as macros and not inline functions 7musl defines some functions as macros and not inline functions
@@ -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
15diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def 15diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
16index 518a85ee1a0..6b4ead4efc6 100644 16index afed404f04c..876888656f2 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@@ -731,6 +731,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") 19@@ -782,6 +782,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 518a85ee1a0..6b4ead4efc6 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@@ -778,6 +781,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") 29@@ -829,6 +832,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 518a85ee1a0..6b4ead4efc6 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@@ -788,6 +794,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") 39@@ -839,6 +845,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 518a85ee1a0..6b4ead4efc6 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@@ -803,6 +812,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") 49@@ -854,6 +863,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 518a85ee1a0..6b4ead4efc6 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@@ -929,6 +941,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") 59@@ -980,6 +992,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 518a85ee1a0..6b4ead4efc6 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@@ -1154,6 +1169,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") 69@@ -1205,6 +1220,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 518a85ee1a0..6b4ead4efc6 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@@ -1283,6 +1301,9 @@ TLI_DEFINE_STRING_INTERNAL("times") 79@@ -1340,6 +1358,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)
@@ -87,5 +87,5 @@ index 518a85ee1a0..6b4ead4efc6 100644
87 TLI_DEFINE_STRING_INTERNAL("tmpfile64") 87 TLI_DEFINE_STRING_INTERNAL("tmpfile64")
88 /// int toascii(int c); 88 /// int toascii(int c);
89-- 89--
902.20.1 902.22.0
91 91
diff --git a/recipes-devtools/clang/clang/0012-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch
index 5d0fcff..162d4e1 100644
--- a/recipes-devtools/clang/clang/0012-llvm-allow-env-override-of-exe-path.patch
+++ b/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch
@@ -1,7 +1,7 @@
1From 7111770e8290082530d920e120995bf81431b0aa Mon Sep 17 00:00:00 2001 1From eb2aeff635789738b25907388ea1ef8ea3e12641 Mon Sep 17 00:00:00 2001
2From: Martin Kelly <mkelly@xevo.com> 2From: Martin Kelly <mkelly@xevo.com>
3Date: Fri, 19 May 2017 00:22:57 -0700 3Date: Fri, 19 May 2017 00:22:57 -0700
4Subject: [PATCH 12/18] llvm: allow env override of exe path 4Subject: [PATCH 07/20] llvm: allow env override of exe path
5 5
6When using a native llvm-config from inside a sysroot, we need llvm-config to 6When using a native llvm-config from inside a sysroot, we need llvm-config to
7return the libraries, include directories, etc. from inside the sysroot rather 7return the libraries, include directories, etc. from inside the sysroot rather
@@ -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
17diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp 17diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
18index bec89fef98c..f9a2862a55d 100644 18index 7ef7c46a262..a4f7ed82c7b 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@@ -226,6 +226,13 @@ Typical components:\n\ 21@@ -225,6 +225,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) {
@@ -33,5 +33,5 @@ index bec89fef98c..f9a2862a55d 100644
33 // allow taking the address of ::main however. 33 // allow taking the address of ::main however.
34 void *P = (void *)(intptr_t)GetExecutablePath; 34 void *P = (void *)(intptr_t)GetExecutablePath;
35-- 35--
362.20.1 362.22.0
37 37
diff --git a/recipes-devtools/clang/clang/0019-llvm-Enhance-path-prefix-mapping.patch b/recipes-devtools/clang/clang/0008-llvm-Enhance-path-prefix-mapping.patch
index cbfc0be..c491bb6 100644
--- a/recipes-devtools/clang/clang/0019-llvm-Enhance-path-prefix-mapping.patch
+++ b/recipes-devtools/clang/clang/0008-llvm-Enhance-path-prefix-mapping.patch
@@ -1,7 +1,7 @@
1From 07594e15b8e9740012c3bcac00f935faf77f1c99 Mon Sep 17 00:00:00 2001 1From 262518322d0397ba7fd3876a8710dd453e7d4c59 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 Feb 2019 11:32:09 -0800 3Date: Fri, 15 Feb 2019 11:32:09 -0800
4Subject: [PATCH 1/2] llvm: Enhance path prefix mapping 4Subject: [PATCH 08/20] llvm: Enhance path prefix mapping
5 5
6Upstream-Status: Submitted [https://reviews.llvm.org/D56769] 6Upstream-Status: Submitted [https://reviews.llvm.org/D56769]
7Signed-off-by: Khem Raj <raj.khem@gmail.com> 7Signed-off-by: Khem Raj <raj.khem@gmail.com>
@@ -56,10 +56,10 @@ index 5c0bee58f18..20332c09852 100644
56 /// Append to path. 56 /// Append to path.
57 /// 57 ///
58diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp 58diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp
59index 8f580c66d24..e368fe0e17b 100644 59index c49260125db..89a1c193d14 100644
60--- a/llvm/lib/Support/Path.cpp 60--- a/llvm/lib/Support/Path.cpp
61+++ b/llvm/lib/Support/Path.cpp 61+++ b/llvm/lib/Support/Path.cpp
62@@ -520,27 +520,53 @@ void replace_extension(SmallVectorImpl<char> &path, const Twine &extension, 62@@ -496,27 +496,53 @@ void replace_extension(SmallVectorImpl<char> &path, const Twine &extension,
63 path.append(ext.begin(), ext.end()); 63 path.append(ext.begin(), ext.end());
64 } 64 }
65 65
@@ -123,10 +123,10 @@ index 8f580c66d24..e368fe0e17b 100644
123 123
124 void native(const Twine &path, SmallVectorImpl<char> &result, Style style) { 124 void native(const Twine &path, SmallVectorImpl<char> &result, Style style) {
125diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp 125diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
126index 7ce6d2d52db..eaf8557ca8d 100644 126index ccd72d7f176..13af998d8f8 100644
127--- a/llvm/unittests/Support/Path.cpp 127--- a/llvm/unittests/Support/Path.cpp
128+++ b/llvm/unittests/Support/Path.cpp 128+++ b/llvm/unittests/Support/Path.cpp
129@@ -1207,7 +1207,9 @@ TEST(Support, RemoveDots) { 129@@ -1219,7 +1219,9 @@ TEST(Support, RemoveDots) {
130 TEST(Support, ReplacePathPrefix) { 130 TEST(Support, ReplacePathPrefix) {
131 SmallString<64> Path1("/foo"); 131 SmallString<64> Path1("/foo");
132 SmallString<64> Path2("/old/foo"); 132 SmallString<64> Path2("/old/foo");
@@ -136,7 +136,7 @@ index 7ce6d2d52db..eaf8557ca8d 100644
136 SmallString<64> NewPrefix("/new"); 136 SmallString<64> NewPrefix("/new");
137 SmallString<64> NewPrefix2("/longernew"); 137 SmallString<64> NewPrefix2("/longernew");
138 SmallString<64> EmptyPrefix(""); 138 SmallString<64> EmptyPrefix("");
139@@ -1227,6 +1229,33 @@ TEST(Support, ReplacePathPrefix) { 139@@ -1239,6 +1241,33 @@ TEST(Support, ReplacePathPrefix) {
140 Path = Path2; 140 Path = Path2;
141 path::replace_path_prefix(Path, OldPrefix, EmptyPrefix); 141 path::replace_path_prefix(Path, OldPrefix, EmptyPrefix);
142 EXPECT_EQ(Path, "/foo"); 142 EXPECT_EQ(Path, "/foo");
@@ -171,5 +171,5 @@ index 7ce6d2d52db..eaf8557ca8d 100644
171 171
172 TEST_F(FileSystemTest, OpenFileForRead) { 172 TEST_F(FileSystemTest, OpenFileForRead) {
173-- 173--
1742.20.1 1742.22.0
175 175
diff --git a/recipes-devtools/clang/clang/0001-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0009-clang-Enable-SSP-and-PIE-by-default.patch
index 12fb8c5..5700fa0 100644
--- a/recipes-devtools/clang/clang/0001-clang-Enable-SSP-and-PIE-by-default.patch
+++ b/recipes-devtools/clang/clang/0009-clang-Enable-SSP-and-PIE-by-default.patch
@@ -1,7 +1,7 @@
1From c43bf91bc4f9c913b572f546190ce89a758ee288 Mon Sep 17 00:00:00 2001 1From 6ad9263f3bc8ebbf27467f97233e109dfd7987ed Mon Sep 17 00:00:00 2001
2From: Evangelos Foutras <evangelos@foutrelis.com> 2From: Evangelos Foutras <evangelos@foutrelis.com>
3Date: Thu, 20 Sep 2018 06:20:28 +0300 3Date: Thu, 20 Sep 2018 06:20:28 +0300
4Subject: [PATCH 01/18] clang: Enable SSP and PIE by default 4Subject: [PATCH 09/20] clang: Enable SSP and PIE by default
5 5
6This is a minimal set of changes needed to make clang use SSP and PIE by 6This is a minimal set of changes needed to make clang use SSP and PIE by
7default on Arch Linux. Tests that were easy to adjust have been changed 7default on Arch Linux. Tests that were easy to adjust have been changed
@@ -22,10 +22,10 @@ of a compile-time option (https://bugs.llvm.org/show_bug.cgi?id=13410)
22 2 files changed, 13 insertions(+), 2 deletions(-) 22 2 files changed, 13 insertions(+), 2 deletions(-)
23 23
24diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 24diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
25index 65ab9b2daf5..5b757b8028c 100644 25index d900508ad93..3e68d50dac2 100644
26--- a/clang/lib/Driver/ToolChains/Linux.cpp 26--- a/clang/lib/Driver/ToolChains/Linux.cpp
27+++ b/clang/lib/Driver/ToolChains/Linux.cpp 27+++ b/clang/lib/Driver/ToolChains/Linux.cpp
28@@ -968,8 +968,18 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, 28@@ -972,8 +972,18 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs,
29 } 29 }
30 30
31 bool Linux::isPIEDefault() const { 31 bool Linux::isPIEDefault() const {
@@ -45,19 +45,19 @@ index 65ab9b2daf5..5b757b8028c 100644
45+ return 2; 45+ return 2;
46 } 46 }
47 47
48 bool Linux::IsMathErrnoDefault() const { 48 bool Linux::isNoExecStackDefault() const {
49diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h 49diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h
50index 4a662cb4b42..2ddd4056573 100644 50index 4c61994691c..66134a3a327 100644
51--- a/clang/lib/Driver/ToolChains/Linux.h 51--- a/clang/lib/Driver/ToolChains/Linux.h
52+++ b/clang/lib/Driver/ToolChains/Linux.h 52+++ b/clang/lib/Driver/ToolChains/Linux.h
53@@ -39,6 +39,7 @@ public: 53@@ -39,6 +39,7 @@ public:
54 llvm::opt::ArgStringList &CC1Args) const override;
55 CXXStdlibType GetDefaultCXXStdlibType() const override; 54 CXXStdlibType GetDefaultCXXStdlibType() const override;
56 bool isPIEDefault() const override; 55 bool isPIEDefault() const override;
56 bool isNoExecStackDefault() const override;
57+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override; 57+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override;
58 bool IsMathErrnoDefault() const override; 58 bool IsMathErrnoDefault() const override;
59 SanitizerMask getSupportedSanitizers() const override; 59 SanitizerMask getSupportedSanitizers() const override;
60 void addProfileRTLibs(const llvm::opt::ArgList &Args, 60 void addProfileRTLibs(const llvm::opt::ArgList &Args,
61-- 61--
622.20.1 622.22.0
63 63
diff --git a/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch b/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch
deleted file mode 100644
index 0ca7335..0000000
--- a/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 6c98b7b1df55972f26da3ceceaf87b050e3f05b9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 25 Jan 2019 14:39:04 -0800
4Subject: [PATCH 10/18] clang: Append libunwind to compiler-rt for linking
5
6Some packages which use libgcc tend to use low level unwind functions
7too, and they are missing in compiler-rt but provided by llvm libunwind
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 clang/lib/Driver/ToolChains/CommonArgs.cpp | 6 ++++++
12 1 file changed, 6 insertions(+)
13
14diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
15index d7e316befa6..5f6b24e33eb 100644
16--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
17+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
18@@ -1191,6 +1191,12 @@ void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D,
19 switch (RLT) {
20 case ToolChain::RLT_CompilerRT:
21 CmdArgs.push_back(TC.getCompilerRTArgString(Args, "builtins"));
22+ CmdArgs.push_back("--as-needed");
23+ CmdArgs.push_back("-l:libunwind.a");
24+ CmdArgs.push_back("-lpthread");
25+ CmdArgs.push_back("-ldl");
26+ CmdArgs.push_back("--no-as-needed");
27+
28 break;
29 case ToolChain::RLT_Libgcc:
30 // Make sure libgcc is not used under MSVC environment by default
31--
322.20.1
33
diff --git a/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch b/recipes-devtools/clang/clang/0010-clang-driver-Use-lib-for-ldso-on-OE.patch
index 3b92897..6d94df2 100644
--- a/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch
+++ b/recipes-devtools/clang/clang/0010-clang-driver-Use-lib-for-ldso-on-OE.patch
@@ -1,7 +1,7 @@
1From b9831e3886b22d243eeb01f0ae67e9485aafd64b Mon Sep 17 00:00:00 2001 1From 07f5fef22be3800e37c5f635781805fcd60ae00a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 21 May 2016 21:52:36 -0700 3Date: Sat, 21 May 2016 21:52:36 -0700
4Subject: [PATCH 01/18] clang: driver: Use /lib for ldso on OE 4Subject: [PATCH 10/20] clang: driver: Use /lib for ldso on OE
5 5
6OE does not follow the default base_libdir 6OE does not follow the default base_libdir
7that clang has, therefore adjust it for OE 7that clang has, therefore adjust it for OE
@@ -18,10 +18,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
18 1 file changed, 7 insertions(+), 5 deletions(-) 18 1 file changed, 7 insertions(+), 5 deletions(-)
19 19
20diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 20diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
21index e9169e91fd4..9c08a794f5c 100644 21index 3e68d50dac2..dbe5ed7d89e 100644
22--- a/clang/lib/Driver/ToolChains/Linux.cpp 22--- a/clang/lib/Driver/ToolChains/Linux.cpp
23+++ b/clang/lib/Driver/ToolChains/Linux.cpp 23+++ b/clang/lib/Driver/ToolChains/Linux.cpp
24@@ -595,12 +595,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 24@@ -593,12 +593,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
25 Loader = "ld.so.1"; 25 Loader = "ld.so.1";
26 break; 26 break;
27 case llvm::Triple::ppc64: 27 case llvm::Triple::ppc64:
@@ -36,7 +36,7 @@ index e9169e91fd4..9c08a794f5c 100644
36 Loader = 36 Loader =
37 (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; 37 (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2";
38 break; 38 break;
39@@ -622,7 +622,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 39@@ -620,7 +620,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
40 Loader = "ld-linux.so.2"; 40 Loader = "ld-linux.so.2";
41 break; 41 break;
42 case llvm::Triple::sparcv9: 42 case llvm::Triple::sparcv9:
@@ -45,7 +45,7 @@ index e9169e91fd4..9c08a794f5c 100644
45 Loader = "ld-linux.so.2"; 45 Loader = "ld-linux.so.2";
46 break; 46 break;
47 case llvm::Triple::systemz: 47 case llvm::Triple::systemz:
48@@ -635,8 +635,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 48@@ -633,8 +633,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
49 break; 49 break;
50 case llvm::Triple::x86_64: { 50 case llvm::Triple::x86_64: {
51 bool X32 = Triple.getEnvironment() == llvm::Triple::GNUX32; 51 bool X32 = Triple.getEnvironment() == llvm::Triple::GNUX32;
@@ -59,5 +59,5 @@ index e9169e91fd4..9c08a794f5c 100644
59 break; 59 break;
60 } 60 }
61-- 61--
622.21.0 622.22.0
63 63
diff --git a/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0011-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
index 191e21d..a013a36 100644
--- a/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
+++ b/recipes-devtools/clang/clang/0011-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
@@ -1,7 +1,7 @@
1From 74e2a7f0f28e64f496fc33c38428c81dfc15b783 Mon Sep 17 00:00:00 2001 1From 314859edd5f1a221d4a2c6b787e5bddd9b1c4606 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 21:11:06 -0700 3Date: Thu, 19 May 2016 21:11:06 -0700
4Subject: [PATCH 03/18] clang: Driver/tools.cpp: Add -lssp_nonshared on musl 4Subject: [PATCH 11/20] clang: Driver/tools.cpp: Add -lssp_nonshared on musl
5 5
6musl driver will need to add ssp_nonshared for stack_check_local 6musl driver will need to add ssp_nonshared for stack_check_local
7on the linker cmdline when using stack protector commands on 7on the linker cmdline when using stack protector commands on
@@ -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
15diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp 15diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
16index 2ad45097dce..c841399193e 100644 16index 33cdd3585c2..8b14b8ea9cb 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@@ -525,6 +525,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, 19@@ -579,6 +579,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
@@ -26,9 +26,9 @@ index 2ad45097dce..c841399193e 100644
26+ Args.hasArg(options::OPT_fstack_protector_all))) { 26+ Args.hasArg(options::OPT_fstack_protector_all))) {
27+ CmdArgs.push_back("-lssp_nonshared"); 27+ CmdArgs.push_back("-lssp_nonshared");
28+ } 28+ }
29 if (Args.hasArg(options::OPT_static)) 29 if (IsStatic || IsStaticPIE)
30 CmdArgs.push_back("--end-group"); 30 CmdArgs.push_back("--end-group");
31 else 31 else
32-- 32--
332.20.1 332.22.0
34 34
diff --git a/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0012-clang-musl-ppc-does-not-support-128-bit-long-double.patch
index 3d257f2..fe5206f 100644
--- a/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch
+++ b/recipes-devtools/clang/clang/0012-clang-musl-ppc-does-not-support-128-bit-long-double.patch
@@ -1,7 +1,7 @@
1From 5a58280d449830a216da015b4a67cbe49b1fd516 Mon Sep 17 00:00:00 2001 1From ed78a6b28aa36afbfc7825dcbbacea46d4ea528d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 10 May 2016 02:00:11 -0700 3Date: Tue, 10 May 2016 02:00:11 -0700
4Subject: [PATCH 04/18] clang: musl/ppc does not support 128-bit long double 4Subject: [PATCH 12/20] clang: musl/ppc does not support 128-bit long double
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7--- 7---
@@ -9,11 +9,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 1 file changed, 4 insertions(+) 9 1 file changed, 4 insertions(+)
10 10
11diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h 11diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h
12index cbe7a9a2fa8..8df609a9b04 100644 12index 6e5df097921..107cef297e2 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@@ -342,6 +342,10 @@ public: 15@@ -354,6 +354,10 @@ public:
16 break; 16 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
17 } 17 }
18 18
19+ if (getTriple().isMusl()) { 19+ if (getTriple().isMusl()) {
@@ -24,5 +24,5 @@ index cbe7a9a2fa8..8df609a9b04 100644
24 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32; 24 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
25 } 25 }
26-- 26--
272.20.1 272.22.0
28 28
diff --git a/recipes-devtools/clang/clang/0005-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0013-clang-Prepend-trailing-to-sysroot.patch
index 1c6e16e..b8a23c9 100644
--- a/recipes-devtools/clang/clang/0005-clang-Prepend-trailing-to-sysroot.patch
+++ b/recipes-devtools/clang/clang/0013-clang-Prepend-trailing-to-sysroot.patch
@@ -1,7 +1,7 @@
1From cb8ba6da2df40db219bf343e4f2da93089df300b Mon Sep 17 00:00:00 2001 1From c37bf49c9734a1ebc9a286225aa2ceae06427c06 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Mar 2017 09:02:13 -0700 3Date: Thu, 16 Mar 2017 09:02:13 -0700
4Subject: [PATCH 05/18] clang: Prepend trailing '/' to sysroot 4Subject: [PATCH 13/20] clang: Prepend trailing '/' to sysroot
5 5
6This is needed to handle a case where clang 6This is needed to handle a case where clang
7isntall and target sysroot are perilously same 7isntall and target sysroot are perilously same
@@ -24,10 +24,10 @@ 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
26diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 26diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
27index 552d329e7b8..7d5a85ed744 100644 27index dbe5ed7d89e..9bf66207ac9 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@@ -219,7 +219,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) 30@@ -223,7 +223,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();
@@ -37,5 +37,5 @@ index 552d329e7b8..7d5a85ed744 100644
37 // Cross-compiling binutils and GCC installations (vanilla and openSUSE at 37 // Cross-compiling binutils and GCC installations (vanilla and openSUSE at
38 // least) put various tools in a triple-prefixed directory off of the parent 38 // least) put various tools in a triple-prefixed directory off of the parent
39-- 39--
402.20.1 402.22.0
41 41
diff --git a/recipes-devtools/clang/clang/0013-llvm-AARCH64-Add-support-for-.dword-directives.patch b/recipes-devtools/clang/clang/0013-llvm-AARCH64-Add-support-for-.dword-directives.patch
deleted file mode 100644
index 2ceda2e..0000000
--- a/recipes-devtools/clang/clang/0013-llvm-AARCH64-Add-support-for-.dword-directives.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 55786ec791b0aa77e3fbd1f647780a4d4a3db8f6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Jan 2019 10:53:22 -0800
4Subject: [PATCH 13/18] llvm: [AARCH64] Add support for .dword directives
5
6This directives is supported in GNU assembler, Add support via addAliasForDirective.
7Add a testcase to check for data directives
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 .../AArch64/AsmParser/AArch64AsmParser.cpp | 3 ++-
12 llvm/test/MC/AArch64/data-directives-invalid.s | 16 ++++++++++++++++
13 2 files changed, 18 insertions(+), 1 deletion(-)
14 create mode 100644 llvm/test/MC/AArch64/data-directives-invalid.s
15
16diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
17index 6cc9b67e4d2..c43b9827cbd 100644
18--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
19+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
20@@ -244,10 +244,11 @@ public:
21
22 // Alias .hword/.word/xword to the target-independent .2byte/.4byte/.8byte
23 // directives as they have the same form and semantics:
24- /// ::= (.hword | .word | .xword ) [ expression (, expression)* ]
25+ /// ::= (.hword | .word | .xword | .dword ) [ expression (, expression)* ]
26 Parser.addAliasForDirective(".hword", ".2byte");
27 Parser.addAliasForDirective(".word", ".4byte");
28 Parser.addAliasForDirective(".xword", ".8byte");
29+ Parser.addAliasForDirective(".dword", ".8byte");
30
31 // Initialize the set of available features.
32 setAvailableFeatures(ComputeAvailableFeatures(getSTI().getFeatureBits()));
33diff --git a/llvm/test/MC/AArch64/data-directives-invalid.s b/llvm/test/MC/AArch64/data-directives-invalid.s
34new file mode 100644
35index 00000000000..7b59a2e60fa
36--- /dev/null
37+++ b/llvm/test/MC/AArch64/data-directives-invalid.s
38@@ -0,0 +1,16 @@
39+# RUN: not llvm-mc -triple aarch64 < %s 2>&1 | FileCheck %s
40+
41+# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.hword' directive
42+.hword 0xffffa
43+# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.2byte' directive
44+.2byte 0xffffa
45+# CHECK: [[@LINE+1]]:7: error: out of range literal value in '.word' directive
46+.word 0xffffffffa
47+# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.4byte' directive
48+.4byte 0xffffffffa
49+# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.dword' directive
50+.dword 0xffffffffffffffffa
51+# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.xword' directive
52+.xword 0xffffffffffffffffa
53+# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.8byte' directive
54+.8byte 0xffffffffffffffffa
55--
562.20.1
57
diff --git a/recipes-devtools/clang/clang/0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0014-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
index 9535829..5bc6020 100644
--- a/recipes-devtools/clang/clang/0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
+++ b/recipes-devtools/clang/clang/0014-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
@@ -1,7 +1,7 @@
1From 3d38148e5ae42e06d4c4f6f29c194c3406402868 Mon Sep 17 00:00:00 2001 1From ec8c0bb6f7c252b7d58ee988ccb79e49bb348cfa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Mar 2017 19:06:26 -0700 3Date: Thu, 16 Mar 2017 19:06:26 -0700
4Subject: [PATCH 06/18] clang: Look inside the target sysroot for compiler 4Subject: [PATCH 14/20] clang: Look inside the target sysroot for compiler
5 runtime 5 runtime
6 6
7In OE compiler-rt and libc++ are built and staged into target 7In OE compiler-rt and libc++ are built and staged into target
@@ -16,10 +16,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 1 file changed, 5 insertions(+), 1 deletion(-) 16 1 file changed, 5 insertions(+), 1 deletion(-)
17 17
18diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp 18diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
19index 88a627eab6d..d56b5264b4d 100644 19index b1fddb0af55..6eb8fbb8de4 100644
20--- a/clang/lib/Driver/ToolChain.cpp 20--- a/clang/lib/Driver/ToolChain.cpp
21+++ b/clang/lib/Driver/ToolChain.cpp 21+++ b/clang/lib/Driver/ToolChain.cpp
22@@ -13,6 +13,7 @@ 22@@ -12,6 +12,7 @@
23 #include "ToolChains/Clang.h" 23 #include "ToolChains/Clang.h"
24 #include "clang/Basic/ObjCRuntime.h" 24 #include "clang/Basic/ObjCRuntime.h"
25 #include "clang/Basic/Sanitizers.h" 25 #include "clang/Basic/Sanitizers.h"
@@ -27,7 +27,7 @@ index 88a627eab6d..d56b5264b4d 100644
27 #include "clang/Config/config.h" 27 #include "clang/Config/config.h"
28 #include "clang/Driver/Action.h" 28 #include "clang/Driver/Action.h"
29 #include "clang/Driver/Driver.h" 29 #include "clang/Driver/Driver.h"
30@@ -353,7 +354,10 @@ StringRef ToolChain::getOSLibName() const { 30@@ -352,7 +353,10 @@ StringRef ToolChain::getOSLibName() const {
31 } 31 }
32 32
33 std::string ToolChain::getCompilerRTPath() const { 33 std::string ToolChain::getCompilerRTPath() const {
@@ -40,5 +40,5 @@ index 88a627eab6d..d56b5264b4d 100644
40 llvm::sys::path::append(Path, "lib"); 40 llvm::sys::path::append(Path, "lib");
41 } else { 41 } else {
42-- 42--
432.20.1 432.22.0
44 44
diff --git a/recipes-devtools/clang/clang/0007-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0015-clang-Define-releative-gcc-installation-dir.patch
index ab035ce..905a8bd 100644
--- a/recipes-devtools/clang/clang/0007-clang-Define-releative-gcc-installation-dir.patch
+++ b/recipes-devtools/clang/clang/0015-clang-Define-releative-gcc-installation-dir.patch
@@ -1,7 +1,7 @@
1From 2d544dc208202f2017fb897cf956a6e85f8c1597 Mon Sep 17 00:00:00 2001 1From fb1eda44238f4f20f7b0f75cd00d1f715b96693b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 21 May 2017 15:38:25 -0700 3Date: Sun, 21 May 2017 15:38:25 -0700
4Subject: [PATCH 07/18] clang: Define / releative gcc installation dir 4Subject: [PATCH 15/20] clang: Define / releative gcc installation dir
5 5
6This is required for OE gcc installation to work. 6This is required for OE gcc installation to work.
7Without this its not able to find the paths for libgcc 7Without this its not able to find the paths for libgcc
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 1 file changed, 3 insertions(+) 14 1 file changed, 3 insertions(+)
15 15
16diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp 16diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
17index c841399193e..468ee821a57 100644 17index 8b14b8ea9cb..20517a369f7 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@@ -2280,6 +2280,9 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( 20@@ -2355,6 +2355,9 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
21 {"gcc-cross/" + CandidateTriple.str(), "../..", 21 {"gcc-cross/" + CandidateTriple.str(), "../..",
22 TargetTriple.getOS() != llvm::Triple::Solaris}, 22 TargetTriple.getOS() != llvm::Triple::Solaris},
23 23
@@ -28,5 +28,5 @@ index c841399193e..468ee821a57 100644
28 // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well. Only do 28 // <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 29 // this on Freescale triples, though, since some systems put a *lot* of
30-- 30--
312.20.1 312.22.0
32 32
diff --git a/recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch b/recipes-devtools/clang/clang/0016-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
index ca7de9f..7f6e3da 100644
--- a/recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
+++ b/recipes-devtools/clang/clang/0016-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
@@ -1,7 +1,7 @@
1From 977b058e4921ff7908bbf972ea61d4ca34ea8b11 Mon Sep 17 00:00:00 2001 1From bb1af5985b7b6e02281be669c28eb897a58c7c2f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 16 Aug 2017 15:16:15 -0700 3Date: Wed, 16 Aug 2017 15:16:15 -0700
4Subject: [PATCH 08/18] clang: Fix ldso for musl on x86 and x32 architectures 4Subject: [PATCH 16/20] clang: Fix ldso for musl on x86 and x32 architectures
5 5
6x32 linker is called ld-musl-x32.so.1 and x86 linker 6x32 linker is called ld-musl-x32.so.1 and x86 linker
7is called ld-musl-i386.so.1, Currently, linker for 7is called ld-musl-i386.so.1, Currently, linker for
@@ -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
16diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 16diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
17index 7d5a85ed744..4dfef25aa63 100644 17index 9bf66207ac9..fc7d6c17484 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@@ -516,6 +516,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 20@@ -519,6 +519,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 7d5a85ed744..4dfef25aa63 100644
25 25
26 switch (Arch) { 26 switch (Arch) {
27 case llvm::Triple::arm: 27 case llvm::Triple::arm:
28@@ -528,6 +529,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 28@@ -531,6 +532,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;
@@ -40,5 +40,5 @@ index 7d5a85ed744..4dfef25aa63 100644
40 ArchName = Triple.getArchName().str(); 40 ArchName = Triple.getArchName().str();
41 } 41 }
42-- 42--
432.20.1 432.22.0
44 44
diff --git a/recipes-devtools/clang/clang/0009-clang-scan-view-needs-python-2.x.patch b/recipes-devtools/clang/clang/0017-clang-scan-view-needs-python-2.x.patch
index b6804b4..5c309ff 100644
--- a/recipes-devtools/clang/clang/0009-clang-scan-view-needs-python-2.x.patch
+++ b/recipes-devtools/clang/clang/0017-clang-scan-view-needs-python-2.x.patch
@@ -1,7 +1,7 @@
1From afa19d2337434c874bb9328d2f955fa33ad1aa65 Mon Sep 17 00:00:00 2001 1From 151f2f72b1bfd1ae7c177912c06324af1bb08d69 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 15 May 2018 10:28:43 -0700 3Date: Tue, 15 May 2018 10:28:43 -0700
4Subject: [PATCH 09/18] clang: scan-view needs python 2.x 4Subject: [PATCH 17/20] clang: scan-view needs python 2.x
5 5
6Some distributions e.g. archlinux have switched to pointing 6Some distributions e.g. archlinux have switched to pointing
7python to python3, therefore its better to be specific about 7python to python3, therefore its better to be specific about
@@ -23,5 +23,5 @@ index 6165432e7af..04ad518a60c 100755
23 from __future__ import print_function 23 from __future__ import print_function
24 24
25-- 25--
262.20.1 262.22.0
27 27
diff --git a/recipes-devtools/clang/clang/0020-clang-Initial-implementation-of-fmacro-prefix-map-an.patch b/recipes-devtools/clang/clang/0018-clang-Initial-implementation-of-fmacro-prefix-map-an.patch
index a8e1c9a..d58c4f5 100644
--- a/recipes-devtools/clang/clang/0020-clang-Initial-implementation-of-fmacro-prefix-map-an.patch
+++ b/recipes-devtools/clang/clang/0018-clang-Initial-implementation-of-fmacro-prefix-map-an.patch
@@ -1,7 +1,7 @@
1From 29a090d31273e78646cc34a392fa292e63e8e4e4 Mon Sep 17 00:00:00 2001 1From a4a34addc4d6942bb68a3c298fb07d0e4794e295 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 Feb 2019 10:02:52 -0800 3Date: Fri, 15 Feb 2019 10:02:52 -0800
4Subject: [PATCH 2/2] clang: Initial implementation of -fmacro-prefix-map and 4Subject: [PATCH 18/20] clang: Initial implementation of -fmacro-prefix-map and
5 -ffile-prefix-map 5 -ffile-prefix-map
6 6
7Upstream-Status: Submitted [https://reviews.llvm.org/D49466] 7Upstream-Status: Submitted [https://reviews.llvm.org/D49466]
@@ -16,21 +16,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 clang/lib/Driver/ToolChains/FreeBSD.cpp | 14 +++++++ 16 clang/lib/Driver/ToolChains/FreeBSD.cpp | 14 +++++++
17 clang/lib/Driver/ToolChains/Gnu.cpp | 12 ++++++ 17 clang/lib/Driver/ToolChains/Gnu.cpp | 12 ++++++
18 clang/lib/Frontend/CompilerInvocation.cpp | 3 ++ 18 clang/lib/Frontend/CompilerInvocation.cpp | 3 ++
19 clang/lib/Lex/PPMacroExpansion.cpp | 14 ++++++- 19 clang/lib/Lex/PPMacroExpansion.cpp | 13 ++++++-
20 clang/test/CodeGen/debug-prefix-map.c | 2 + 20 clang/test/CodeGen/debug-prefix-map.c | 2 +
21 clang/test/Driver/debug-prefix-map.S | 1 + 21 clang/test/Driver/debug-prefix-map.S | 1 +
22 clang/test/Driver/debug-prefix-map.c | 37 ++++++++++++++----- 22 clang/test/Driver/debug-prefix-map.c | 37 ++++++++++++++-----
23 clang/test/Preprocessor/file_test.c | 22 +++++++++++ 23 clang/test/Preprocessor/file_test.c | 22 +++++++++++
24 clang/test/Preprocessor/file_test.h | 2 + 24 clang/test/Preprocessor/file_test.h | 2 +
25 15 files changed, 133 insertions(+), 18 deletions(-) 25 15 files changed, 132 insertions(+), 18 deletions(-)
26 create mode 100644 clang/test/Preprocessor/file_test.c 26 create mode 100644 clang/test/Preprocessor/file_test.c
27 create mode 100644 clang/test/Preprocessor/file_test.h 27 create mode 100644 clang/test/Preprocessor/file_test.h
28 28
29diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td 29diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td
30index 189e0565a83..46972e7c288 100644 30index eab453ee20e..adee339938e 100644
31--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td 31--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td
32+++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td 32+++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td
33@@ -114,8 +114,8 @@ def err_drv_missing_arg_mtp : Error< 33@@ -143,8 +143,8 @@ def err_drv_missing_arg_mtp : Error<
34 "missing argument to '%0'">; 34 "missing argument to '%0'">;
35 def err_drv_invalid_libcxx_deployment : Error< 35 def err_drv_invalid_libcxx_deployment : Error<
36 "invalid deployment target for -stdlib=libc++ (requires %0 or later)">; 36 "invalid deployment target for -stdlib=libc++ (requires %0 or later)">;
@@ -42,10 +42,10 @@ index 189e0565a83..46972e7c288 100644
42 "malformed sanitizer blacklist: '%0'">; 42 "malformed sanitizer blacklist: '%0'">;
43 def err_drv_duplicate_config : Error< 43 def err_drv_duplicate_config : Error<
44diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td 44diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
45index a6a6e3b5b53..b9734ea8e4d 100644 45index 4ea8bfff097..cf73c9ca465 100644
46--- a/clang/include/clang/Driver/Options.td 46--- a/clang/include/clang/Driver/Options.td
47+++ b/clang/include/clang/Driver/Options.td 47+++ b/clang/include/clang/Driver/Options.td
48@@ -1838,10 +1838,16 @@ def fsplit_dwarf_inlining: Flag <["-"], "fsplit-dwarf-inlining">, Group<f_Group> 48@@ -1866,10 +1866,16 @@ def fsplit_dwarf_inlining: Flag <["-"], "fsplit-dwarf-inlining">, Group<f_Group>
49 Flags<[CC1Option]>, HelpText<"Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF">; 49 Flags<[CC1Option]>, HelpText<"Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF">;
50 def fno_split_dwarf_inlining: Flag<["-"], "fno-split-dwarf-inlining">, Group<f_Group>, 50 def fno_split_dwarf_inlining: Flag<["-"], "fno-split-dwarf-inlining">, Group<f_Group>,
51 Flags<[CC1Option]>; 51 Flags<[CC1Option]>;
@@ -77,10 +77,10 @@ index 1480548c7fb..712b423e679 100644
77 PreprocessorOptions() : PrecompiledPreambleBytes(0, false) {} 77 PreprocessorOptions() : PrecompiledPreambleBytes(0, false) {}
78 78
79diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp 79diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
80index ce48f8bb132..c5d41667487 100644 80index f6ee7ee26d4..8a190558533 100644
81--- a/clang/lib/CodeGen/CGDebugInfo.cpp 81--- a/clang/lib/CodeGen/CGDebugInfo.cpp
82+++ b/clang/lib/CodeGen/CGDebugInfo.cpp 82+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
83@@ -470,10 +470,13 @@ CGDebugInfo::createFile(StringRef FileName, 83@@ -475,10 +475,13 @@ CGDebugInfo::createFile(StringRef FileName,
84 } 84 }
85 85
86 std::string CGDebugInfo::remapDIPath(StringRef Path) const { 86 std::string CGDebugInfo::remapDIPath(StringRef Path) const {
@@ -98,10 +98,10 @@ index ce48f8bb132..c5d41667487 100644
98 98
99 unsigned CGDebugInfo::getLineNumber(SourceLocation Loc) { 99 unsigned CGDebugInfo::getLineNumber(SourceLocation Loc) {
100diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h 100diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
101index 67331b65d3b..c88665d269c 100644 101index 7edbea86633..7077d0f043c 100644
102--- a/clang/lib/CodeGen/CGDebugInfo.h 102--- a/clang/lib/CodeGen/CGDebugInfo.h
103+++ b/clang/lib/CodeGen/CGDebugInfo.h 103+++ b/clang/lib/CodeGen/CGDebugInfo.h
104@@ -82,7 +82,7 @@ class CGDebugInfo { 104@@ -83,7 +83,7 @@ class CGDebugInfo {
105 /// Cache of previously constructed Types. 105 /// Cache of previously constructed Types.
106 llvm::DenseMap<const void *, llvm::TrackingMDRef> TypeCache; 106 llvm::DenseMap<const void *, llvm::TrackingMDRef> TypeCache;
107 107
@@ -111,10 +111,10 @@ index 67331b65d3b..c88665d269c 100644
111 /// Cache that maps VLA types to size expressions for that type, 111 /// Cache that maps VLA types to size expressions for that type,
112 /// represented by instantiated Metadata nodes. 112 /// represented by instantiated Metadata nodes.
113diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp 113diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
114index fc95003e41b..974bc19403c 100644 114index cb861f27aed..1c788d97c16 100644
115--- a/clang/lib/Driver/ToolChains/Clang.cpp 115--- a/clang/lib/Driver/ToolChains/Clang.cpp
116+++ b/clang/lib/Driver/ToolChains/Clang.cpp 116+++ b/clang/lib/Driver/ToolChains/Clang.cpp
117@@ -613,16 +613,30 @@ static void addDebugCompDirArg(const ArgList &Args, ArgStringList &CmdArgs) { 117@@ -612,16 +612,30 @@ static void addDebugCompDirArg(const ArgList &Args, ArgStringList &CmdArgs,
118 118
119 /// Add a CC1 and CC1AS option to specify the debug file path prefix map. 119 /// Add a CC1 and CC1AS option to specify the debug file path prefix map.
120 static void addDebugPrefixMapArg(const Driver &D, const ArgList &Args, ArgStringList &CmdArgs) { 120 static void addDebugPrefixMapArg(const Driver &D, const ArgList &Args, ArgStringList &CmdArgs) {
@@ -145,9 +145,9 @@ index fc95003e41b..974bc19403c 100644
145+} 145+}
146+ 146+
147 /// Vectorize at all optimization levels greater than 1 except for -Oz. 147 /// Vectorize at all optimization levels greater than 1 except for -Oz.
148 /// For -Oz the loop vectorizer is disable, while the slp vectorizer is enabled. 148 /// For -Oz the loop vectorizer is disabled, while the slp vectorizer is
149 static bool shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) { 149 /// enabled.
150@@ -1261,6 +1275,8 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, 150@@ -1306,6 +1320,8 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
151 // For IAMCU add special include arguments. 151 // For IAMCU add special include arguments.
152 getToolChain().AddIAMCUIncludeArgs(Args, CmdArgs); 152 getToolChain().AddIAMCUIncludeArgs(Args, CmdArgs);
153 } 153 }
@@ -157,7 +157,7 @@ index fc95003e41b..974bc19403c 100644
157 157
158 // FIXME: Move to target hook. 158 // FIXME: Move to target hook.
159diff --git a/clang/lib/Driver/ToolChains/FreeBSD.cpp b/clang/lib/Driver/ToolChains/FreeBSD.cpp 159diff --git a/clang/lib/Driver/ToolChains/FreeBSD.cpp b/clang/lib/Driver/ToolChains/FreeBSD.cpp
160index 55586df9e2f..63d5ebe6984 100644 160index 3a0bab8d07f..6eea9f04620 100644
161--- a/clang/lib/Driver/ToolChains/FreeBSD.cpp 161--- a/clang/lib/Driver/ToolChains/FreeBSD.cpp
162+++ b/clang/lib/Driver/ToolChains/FreeBSD.cpp 162+++ b/clang/lib/Driver/ToolChains/FreeBSD.cpp
163@@ -12,6 +12,7 @@ 163@@ -12,6 +12,7 @@
@@ -196,10 +196,10 @@ index 55586df9e2f..63d5ebe6984 100644
196 196
197 CmdArgs.push_back("-o"); 197 CmdArgs.push_back("-o");
198diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp 198diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
199index e3d836a0b2c..02a1169772b 100644 199index 20517a369f7..ebb315d9c15 100644
200--- a/clang/lib/Driver/ToolChains/Gnu.cpp 200--- a/clang/lib/Driver/ToolChains/Gnu.cpp
201+++ b/clang/lib/Driver/ToolChains/Gnu.cpp 201+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
202@@ -804,6 +804,18 @@ void tools::gnutools::Assembler::ConstructJob(Compilation &C, 202@@ -874,6 +874,18 @@ void tools::gnutools::Assembler::ConstructJob(Compilation &C,
203 } 203 }
204 } 204 }
205 205
@@ -219,10 +219,10 @@ index e3d836a0b2c..02a1169772b 100644
219 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); 219 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler);
220 220
221diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp 221diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
222index bda8427b1a1..0f396d1cc7c 100644 222index bc54e38a1a6..ff68adb865d 100644
223--- a/clang/lib/Frontend/CompilerInvocation.cpp 223--- a/clang/lib/Frontend/CompilerInvocation.cpp
224+++ b/clang/lib/Frontend/CompilerInvocation.cpp 224+++ b/clang/lib/Frontend/CompilerInvocation.cpp
225@@ -3084,6 +3084,9 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, 225@@ -3180,6 +3180,9 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
226 for (const auto *A : Args.filtered(OPT_error_on_deserialized_pch_decl)) 226 for (const auto *A : Args.filtered(OPT_error_on_deserialized_pch_decl))
227 Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue()); 227 Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue());
228 228
@@ -233,7 +233,7 @@ index bda8427b1a1..0f396d1cc7c 100644
233 StringRef Value(A->getValue()); 233 StringRef Value(A->getValue());
234 size_t Comma = Value.find(','); 234 size_t Comma = Value.find(',');
235diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp 235diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
236index 2e9c686b2a0..9e72596145f 100644 236index 687b9a9d3b7..9fffe35d924 100644
237--- a/clang/lib/Lex/PPMacroExpansion.cpp 237--- a/clang/lib/Lex/PPMacroExpansion.cpp
238+++ b/clang/lib/Lex/PPMacroExpansion.cpp 238+++ b/clang/lib/Lex/PPMacroExpansion.cpp
239@@ -28,6 +28,7 @@ 239@@ -28,6 +28,7 @@
@@ -244,15 +244,7 @@ index 2e9c686b2a0..9e72596145f 100644
244 #include "clang/Lex/Token.h" 244 #include "clang/Lex/Token.h"
245 #include "llvm/ADT/ArrayRef.h" 245 #include "llvm/ADT/ArrayRef.h"
246 #include "llvm/ADT/DenseMap.h" 246 #include "llvm/ADT/DenseMap.h"
247@@ -43,6 +44,7 @@ 247@@ -1436,6 +1437,15 @@ static bool isTargetEnvironment(const TargetInfo &TI,
248 #include "llvm/Support/Casting.h"
249 #include "llvm/Support/ErrorHandling.h"
250 #include "llvm/Support/Format.h"
251+#include "llvm/Support/Path.h"
252 #include "llvm/Support/raw_ostream.h"
253 #include <algorithm>
254 #include <cassert>
255@@ -1455,6 +1457,15 @@ static bool isTargetEnvironment(const TargetInfo &TI,
256 return TI.getTriple().getEnvironment() == Env.getEnvironment(); 248 return TI.getTriple().getEnvironment() == Env.getEnvironment();
257 } 249 }
258 250
@@ -268,14 +260,18 @@ index 2e9c686b2a0..9e72596145f 100644
268 /// ExpandBuiltinMacro - If an identifier token is read that is to be expanded 260 /// ExpandBuiltinMacro - If an identifier token is read that is to be expanded
269 /// as a builtin macro, handle it and return the next token as 'Tok'. 261 /// as a builtin macro, handle it and return the next token as 'Tok'.
270 void Preprocessor::ExpandBuiltinMacro(Token &Tok) { 262 void Preprocessor::ExpandBuiltinMacro(Token &Tok) {
271@@ -1518,10 +1529,11 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { 263@@ -1502,7 +1512,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) {
272 } 264 }
273 265
274 // Escape this filename. Turn '\' -> '\\' '"' -> '\"' 266 // Escape this filename. Turn '\' -> '\\' '"' -> '\"'
275- SmallString<128> FN; 267- SmallString<128> FN;
276+ SmallString<256> FN; 268+ SmallString<256> FN;
277 if (PLoc.isValid()) { 269 if (PLoc.isValid()) {
278 FN += PLoc.getFilename(); 270 // __FILE_NAME__ is a Clang-specific extension that expands to the
271 // the last part of __FILE__.
272@@ -1518,6 +1528,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) {
273 FN += PLoc.getFilename();
274 }
279 Lexer::Stringify(FN); 275 Lexer::Stringify(FN);
280+ remapMacroPath(FN, PPOpts->MacroPrefixMap); 276+ remapMacroPath(FN, PPOpts->MacroPrefixMap);
281 OS << '"' << FN << '"'; 277 OS << '"' << FN << '"';
@@ -383,5 +379,5 @@ index 00000000000..c289e5c8362
383+filename: __FILE__ 379+filename: __FILE__
384+basefile: __BASE_FILE__ 380+basefile: __BASE_FILE__
385-- 381--
3862.20.1 3822.22.0
387 383
diff --git a/recipes-devtools/clang/clang/0019-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0019-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch
new file mode 100644
index 0000000..6fa3d5a
--- /dev/null
+++ b/recipes-devtools/clang/clang/0019-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch
@@ -0,0 +1,39 @@
1From 7d855716ab05ec3d7b693cf302713efad5c118fa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 31 Jul 2019 22:51:39 -0700
4Subject: [PATCH 19/20] clang: Add -lpthread and -ldl along with -lunwind for
5 static linking
6
7When doing static liking with --unwindlib=libunwind -static we encounter
8undefined symbols
9libunwind/src/RWMutex.hpp:68: undefined reference to `pthread_rwlock_wrlock'
10
11and
12
13libunwind/src/AddressSpace.hpp:597: undefined reference to `dladdr'
14
15therefore we need to link in libpthread and libdl to fill these symbols
16
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 clang/lib/Driver/ToolChains/CommonArgs.cpp | 4 ++++
20 1 file changed, 4 insertions(+)
21
22diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
23index 99691cb43dc..92b3bfbd77f 100644
24--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
25+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
26@@ -1185,6 +1185,10 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D,
27 }
28 case ToolChain::UNW_CompilerRT:
29 CmdArgs.push_back("-lunwind");
30+ if (Args.hasArg(options::OPT_static)) {
31+ CmdArgs.push_back("-lpthread");
32+ CmdArgs.push_back("-ldl");
33+ }
34 break;
35 }
36
37--
382.22.0
39
diff --git a/recipes-devtools/clang/clang/0020-clang-default-to-lp64d-ABI-and-rv64gc-ISA.patch b/recipes-devtools/clang/clang/0020-clang-default-to-lp64d-ABI-and-rv64gc-ISA.patch
new file mode 100644
index 0000000..0c931ce
--- /dev/null
+++ b/recipes-devtools/clang/clang/0020-clang-default-to-lp64d-ABI-and-rv64gc-ISA.patch
@@ -0,0 +1,52 @@
1From db66a7c23a2462e618b12e06f1920d30a49f5dce Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 12 Aug 2019 08:59:28 -0700
4Subject: [PATCH 20/20] clang: default to lp64d ABI and rv64gc ISA
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 9 ++++++++-
9 clang/lib/Driver/ToolChains/Clang.cpp | 2 +-
10 2 files changed, 9 insertions(+), 2 deletions(-)
11
12diff --git a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
13index b6768de4d29..9671ea270ef 100644
14--- a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
15+++ b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
16@@ -350,6 +350,13 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const ArgList &Args,
17
18 // Handle all other types of extensions.
19 getExtensionFeatures(D, Args, Features, MArch, OtherExts);
20+ } else {
21+ // Default to imafdc aka gc
22+ Features.push_back("+m");
23+ Features.push_back("+a");
24+ Features.push_back("+f");
25+ Features.push_back("+d");
26+ Features.push_back("+c");
27 }
28
29 // -mrelax is default, unless -mno-relax is specified.
30@@ -375,5 +382,5 @@ StringRef riscv::getRISCVABI(const ArgList &Args, const llvm::Triple &Triple) {
31 if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ))
32 return A->getValue();
33
34- return Triple.getArch() == llvm::Triple::riscv32 ? "ilp32" : "lp64";
35+ return Triple.getArch() == llvm::Triple::riscv32 ? "ilp32" : "lp64d";
36 }
37diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
38index 1c788d97c16..50839de1bf9 100644
39--- a/clang/lib/Driver/ToolChains/Clang.cpp
40+++ b/clang/lib/Driver/ToolChains/Clang.cpp
41@@ -1867,7 +1867,7 @@ void Clang::AddRISCVTargetArgs(const ArgList &Args,
42 else if (Triple.getArch() == llvm::Triple::riscv32)
43 ABIName = "ilp32";
44 else if (Triple.getArch() == llvm::Triple::riscv64)
45- ABIName = "lp64";
46+ ABIName = "lp64d";
47 else
48 llvm_unreachable("Unexpected triple!");
49
50--
512.22.0
52
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index 2b4461b..75b56ce 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -160,6 +160,7 @@ do_compile() {
160 160
161do_install() { 161do_install() {
162 DESTDIR=${D} ninja ${PARALLEL_MAKE} ${INSTALLTARGET} 162 DESTDIR=${D} ninja ${PARALLEL_MAKE} ${INSTALLTARGET}
163 rm -rf ${D}${libdir}/python3*/site-packages/six.py
163} 164}
164 165
165do_install_append_class-native () { 166do_install_append_class-native () {
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc
index fec78fb..82f5bfd 100644
--- a/recipes-devtools/clang/common.inc
+++ b/recipes-devtools/clang/common.inc
@@ -3,31 +3,31 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:"
3LIC_FILES_CHKSUM = "file://llvm/LICENSE.TXT;md5=${LLVMMD5SUM} \ 3LIC_FILES_CHKSUM = "file://llvm/LICENSE.TXT;md5=${LLVMMD5SUM} \
4 file://clang/LICENSE.TXT;md5=${CLANGMD5SUM} \ 4 file://clang/LICENSE.TXT;md5=${CLANGMD5SUM} \
5" 5"
6LICENSE = "NCSA" 6LICENSE = "Apache-2.0-with-LLVM-exception"
7 7
8BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}" 8BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}"
9SRC_URI = "\ 9SRC_URI = "\
10 ${BASEURI} \ 10 ${BASEURI} \
11 ${@'file://0001-clang-Enable-SSP-and-PIE-by-default.patch' if '${GCCPIE}' else ''} \ 11 file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \
12 file://0002-clang-driver-Use-lib-for-ldso-on-OE.patch \ 12 file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \
13 file://0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ 13 file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \
14 file://0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch \ 14 file://0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \
15 file://0005-clang-Prepend-trailing-to-sysroot.patch \ 15 file://0005-compiler-rt-Disable-tsan-on-OE-glibc.patch \
16 file://0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ 16 file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
17 file://0007-clang-Define-releative-gcc-installation-dir.patch \ 17 file://0007-llvm-allow-env-override-of-exe-path.patch \
18 file://0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch \ 18 file://0008-llvm-Enhance-path-prefix-mapping.patch \
19 file://0009-clang-scan-view-needs-python-2.x.patch \ 19 ${@'file://0009-clang-Enable-SSP-and-PIE-by-default.patch' if '${GCCPIE}' else ''} \
20 file://0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch \ 20 file://0010-clang-driver-Use-lib-for-ldso-on-OE.patch \
21 file://0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ 21 file://0011-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \
22 file://0012-llvm-allow-env-override-of-exe-path.patch \ 22 file://0012-clang-musl-ppc-does-not-support-128-bit-long-double.patch \
23 file://0013-llvm-AARCH64-Add-support-for-.dword-directives.patch \ 23 file://0013-clang-Prepend-trailing-to-sysroot.patch \
24 file://0014-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ 24 file://0014-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \
25 file://0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ 25 file://0015-clang-Define-releative-gcc-installation-dir.patch \
26 file://0016-compiler-rt-support-a-new-embedded-linux-target.patch \ 26 file://0016-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch \
27 file://0017-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ 27 file://0017-clang-scan-view-needs-python-2.x.patch \
28 file://0018-compiler-rt-Disable-tsan-on-OE-glibc.patch \ 28 file://0018-clang-Initial-implementation-of-fmacro-prefix-map-an.patch \
29 file://0019-llvm-Enhance-path-prefix-mapping.patch \ 29 file://0019-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \
30 file://0020-clang-Initial-implementation-of-fmacro-prefix-map-an.patch \ 30 file://0020-clang-default-to-lp64d-ABI-and-rv64gc-ISA.patch \
31" 31"
32 32
33# Fallback to no-PIE if not set 33# Fallback to no-PIE if not set
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 9a15211..ff8d353 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -3,7 +3,6 @@
3 3
4DESCRIPTION = "LLVM based C/C++ compiler Runtime" 4DESCRIPTION = "LLVM based C/C++ compiler Runtime"
5HOMEPAGE = "http://compiler-rt.llvm.org/" 5HOMEPAGE = "http://compiler-rt.llvm.org/"
6LICENSE = "MIT | NCSA"
7SECTION = "base" 6SECTION = "base"
8 7
9require clang.inc 8require clang.inc
@@ -12,8 +11,7 @@ require common-source.inc
12inherit cmake pkgconfig pythonnative 11inherit cmake pkgconfig pythonnative
13 12
14 13
15LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=f981c4637a4cd67915ac527b3ead3a59; \ 14LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a"
16"
17 15
18BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt libcxx" 16BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt libcxx"
19DEPENDS_append_toolchain-clang_class-target = " virtual/${TARGET_PREFIX}compilerlibs" 17DEPENDS_append_toolchain-clang_class-target = " virtual/${TARGET_PREFIX}compilerlibs"
@@ -70,6 +68,7 @@ do_install_append () {
70 install -D -m 0644 $f ${D}${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/`basename $f` 68 install -D -m 0644 $f ${D}${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/`basename $f`
71 rm $f 69 rm $f
72 done 70 done
71 rm -rf ${D}${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o
73} 72}
74 73
75FILES_SOLIBSDEV = "" 74FILES_SOLIBSDEV = ""
@@ -77,7 +76,9 @@ FILES_${PN} += "${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux
77 ${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ 76 ${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \
78 ${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" 77 ${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt"
79FILES_${PN}-staticdev += "${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" 78FILES_${PN}-staticdev += "${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a"
80FILES_${PN}-dev += "${datadir} ${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms" 79FILES_${PN}-dev += "${datadir} ${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \
80 ${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \
81 "
81INSANE_SKIP_${PN} = "dev-so" 82INSANE_SKIP_${PN} = "dev-so"
82 83
83#PROVIDES_append_class-target = "\ 84#PROVIDES_append_class-target = "\
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb
index aced724..c115da0 100644
--- a/recipes-devtools/clang/libcxx_git.bb
+++ b/recipes-devtools/clang/libcxx_git.bb
@@ -3,7 +3,6 @@
3 3
4DESCRIPTION = "libc++ is a new implementation of the C++ standard library, targeting C++11" 4DESCRIPTION = "libc++ is a new implementation of the C++ standard library, targeting C++11"
5HOMEPAGE = "http://libcxx.llvm.org/" 5HOMEPAGE = "http://libcxx.llvm.org/"
6LICENSE = "MIT | NCSA"
7SECTION = "base" 6SECTION = "base"
8 7
9require clang.inc 8require clang.inc
@@ -25,9 +24,9 @@ PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBUNWIND_ENABLE_SHA
25#PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'unwind', 'libunwind', '', d)}" 24#PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'unwind', 'libunwind', '', d)}"
26LIBUNWIND = "${@bb.utils.contains('PACKAGECONFIG', 'unwind', ';libunwind', '', d)}" 25LIBUNWIND = "${@bb.utils.contains('PACKAGECONFIG', 'unwind', ';libunwind', '', d)}"
27 26
28LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=3de3deb8323d5cf3360104190e804a75 \ 27LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \
29 file://libcxxabi/LICENSE.TXT;md5=9dad5a191d1fc03b31525706040c4ed1 \ 28 file://libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \
30 file://libunwind/LICENSE.TXT;md5=af2bc0b29ead3c8f201c5486f3c9d59b \ 29 file://libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \
31" 30"
32THUMB_TUNE_CCARGS = "" 31THUMB_TUNE_CCARGS = ""
33#TUNE_CCARGS += "-nostdlib" 32#TUNE_CCARGS += "-nostdlib"
diff --git a/recipes-devtools/clang/lldb_git.bb b/recipes-devtools/clang/lldb_git.bb
index 5cfbdb7..933aa44 100644
--- a/recipes-devtools/clang/lldb_git.bb
+++ b/recipes-devtools/clang/lldb_git.bb
@@ -3,7 +3,6 @@
3 3
4DESCRIPTION = "Next generation, high-performance debugger" 4DESCRIPTION = "Next generation, high-performance debugger"
5HOMEPAGE = "http://lldb.llvm.org/" 5HOMEPAGE = "http://lldb.llvm.org/"
6LICENSE = "MIT | NCSA"
7SECTION = "devel" 6SECTION = "devel"
8 7
9DEPENDS += "clang-native zlib libxml2 ninja-native" 8DEPENDS += "clang-native zlib libxml2 ninja-native"
diff --git a/recipes-devtools/clang/llvm-common.bb b/recipes-devtools/clang/llvm-common.bb
index f17f01c..893abd1 100644
--- a/recipes-devtools/clang/llvm-common.bb
+++ b/recipes-devtools/clang/llvm-common.bb
@@ -1,6 +1,6 @@
1SUMMARY = "Helper script for OE's llvm support" 1SUMMARY = "Helper script for OE's llvm support"
2LICENSE = "MIT" 2LICENSE = "Apache-2.0-with-LLVM-exception"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" 3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
4 4
5SRC_URI = "file://llvm-config" 5SRC_URI = "file://llvm-config"
6 6
diff --git a/recipes-devtools/clang/nativesdk-clang-glue.bb b/recipes-devtools/clang/nativesdk-clang-glue.bb
index add6a8b..90eec6a 100644
--- a/recipes-devtools/clang/nativesdk-clang-glue.bb
+++ b/recipes-devtools/clang/nativesdk-clang-glue.bb
@@ -3,8 +3,8 @@
3 3
4DESCRIPTION = "SDK Cross compiler wrappers for LLVM based C/C++ compiler" 4DESCRIPTION = "SDK Cross compiler wrappers for LLVM based C/C++ compiler"
5HOMEPAGE = "http://clang.llvm.org/" 5HOMEPAGE = "http://clang.llvm.org/"
6LICENSE = "NCSA" 6LICENSE = "Apache-2.0-with-LLVM-exception"
7LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7" 7LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/'Apache-2.0 WITH LLVM-exception';md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
8SECTION = "devel" 8SECTION = "devel"
9 9
10inherit nativesdk 10inherit nativesdk
diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb
index f219a0a..e051631 100644
--- a/recipes-devtools/clang/openmp_git.bb
+++ b/recipes-devtools/clang/openmp_git.bb
@@ -3,8 +3,7 @@
3 3
4DESCRIPTION = "LLVM based C/C++ compiler Runtime" 4DESCRIPTION = "LLVM based C/C++ compiler Runtime"
5HOMEPAGE = "http://openmp.llvm.org/" 5HOMEPAGE = "http://openmp.llvm.org/"
6LICENSE = "MIT | NCSA" 6SECTION = "libs"
7SECTION = "base"
8 7
9require clang.inc 8require clang.inc
10require common-source.inc 9require common-source.inc
@@ -16,7 +15,7 @@ RPROVIDES_${PN}-dev += "libgomp-dev"
16 15
17TOOLCHAIN = "clang" 16TOOLCHAIN = "clang"
18 17
19LIC_FILES_CHKSUM = "file://openmp/LICENSE.txt;md5=b1dcbf2c86cbf9bdc0b7cea88a543010" 18LIC_FILES_CHKSUM = "file://openmp/LICENSE.txt;md5=d75288d1ce0450b28b8d58a284c09c79"
20 19
21inherit cmake pkgconfig perlnative 20inherit cmake pkgconfig perlnative
22 21