summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/compiler-rt
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-10-15 19:49:43 -0700
committerKhem Raj <raj.khem@gmail.com>2016-10-15 19:49:43 -0700
commitdd04c7f561c66e6edd9363e5da266fffa3bca26e (patch)
treed1aca2643c90a20b5a9cd56f40504680b53c84f1 /recipes-devtools/clang/compiler-rt
parentafcd6a10cf70ffc92f6be8a13e57647635555192 (diff)
downloadmeta-clang-dd04c7f561c66e6edd9363e5da266fffa3bca26e.tar.gz
clang/llvm: Switch to 4.0.0 development version
3.9 is now branched for morty Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/compiler-rt')
-rw-r--r--recipes-devtools/clang/compiler-rt/0001-compiler-rt-Fix-target-architecture-matching.patch37
-rw-r--r--recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch (renamed from recipes-devtools/clang/compiler-rt/0002-support-a-new-embedded-linux-target.patch)6
-rw-r--r--recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch45
-rw-r--r--recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch (renamed from recipes-devtools/clang/compiler-rt/0004-Disable-tsan-on-OE-glibc.patch)10
-rw-r--r--recipes-devtools/clang/compiler-rt/0003-Simplify-cross-compilation.-Don-t-use-native-compile.patch67
-rw-r--r--recipes-devtools/clang/compiler-rt/0005-builtins-Specifiy-builtins-using-VFP-separately.patch147
6 files changed, 53 insertions, 259 deletions
diff --git a/recipes-devtools/clang/compiler-rt/0001-compiler-rt-Fix-target-architecture-matching.patch b/recipes-devtools/clang/compiler-rt/0001-compiler-rt-Fix-target-architecture-matching.patch
deleted file mode 100644
index 604d1eb..0000000
--- a/recipes-devtools/clang/compiler-rt/0001-compiler-rt-Fix-target-architecture-matching.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 921549310c98ac7d594d1f290f053b8e2b3a32d0 Mon Sep 17 00:00:00 2001
2From: Francis Ricci <francisjricci@gmail.com>
3Date: Wed, 20 Jul 2016 18:06:31 +0000
4Subject: [PATCH 1/4] [compiler-rt] Fix target architecture matching
5
6Summary:
7Use stricter comparisons for architecture. This prevents cmake from failing
8for sysroots which can only compile armhf and not arm, since
9arm MATCHES armhf is true, while arm STREQUAL armhf is false.
10
11Reviewers: beanz, compnerd
12
13Subscribers: aemerson, llvm-commits
14
15Differential Revision: https://reviews.llvm.org/D22473
16
17git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276148 91177308-0d34-0410-b5e6-96231b3b80d8
18---
19 cmake/Modules/CompilerRTUtils.cmake | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
23index 78b6dce..5987cf5 100644
24--- a/cmake/Modules/CompilerRTUtils.cmake
25+++ b/cmake/Modules/CompilerRTUtils.cmake
26@@ -126,7 +126,7 @@ macro(test_target_arch arch def)
27 endif()
28 if(${CAN_TARGET_${arch}})
29 list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
30- elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "${arch}" AND
31+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" STREQUAL "${arch}" AND
32 COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE)
33 # Bail out if we cannot target the architecture we plan to test.
34 message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}")
35--
362.9.0
37
diff --git a/recipes-devtools/clang/compiler-rt/0002-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch
index 67c7678..111c556 100644
--- a/recipes-devtools/clang/compiler-rt/0002-support-a-new-embedded-linux-target.patch
+++ b/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch
@@ -1,7 +1,7 @@
1From 4bdc7871ab0a6134ee01c138e863476de9c08e25 Mon Sep 17 00:00:00 2001 1From 2d08c5752ce9d3170798d12d46827e85a6e8ef42 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 2/4] support a new embedded linux target 4Subject: [PATCH 1/3] 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---
@@ -322,5 +322,5 @@ diff --git a/make/platform/clang_linux_embedded_test_input.c b/make/platform/cla
322new file mode 100644 322new file mode 100644
323index 0000000..e69de29 323index 0000000..e69de29
324-- 324--
3252.9.0 3252.10.0
326 326
diff --git a/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch b/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch
new file mode 100644
index 0000000..dbf3ea5
--- /dev/null
+++ b/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch
@@ -0,0 +1,45 @@
1From dc8fde5074321b80d23419127d28ce90ac984c96 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 23:11:45 -0700
4Subject: [PATCH 2/3] Simplify cross-compilation. Don't use native-compiled
5 llvm-config.
6
7 Note: AddLLVM.cmake does not expose the LLVM source directory.
8 So if you want to run the test suite, you need to either:
9
10 1) set LLVM_MAIN_SRC_DIR explicitly (to find lit.py)
11 2) change AddLLVM.cmake to point to an installed 'lit'.
12 3) add_subdirectory(compiler-rt/test) from clang instead of compiler-rt.
13
14https://us.codeaurora.org/patches/quic/llvm/50683/compiler-rt-cross-compilation.patch
15
16Signed-off-by: Greg Fitzgerald <gregf@codeaurora.org>
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 CMakeLists.txt | 10 +++++++++-
20 1 file changed, 9 insertions(+), 1 deletion(-)
21
22diff --git a/CMakeLists.txt b/CMakeLists.txt
23index 5b1591e..7c6c0f4 100644
24--- a/CMakeLists.txt
25+++ b/CMakeLists.txt
26@@ -42,7 +42,15 @@ option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
27 mark_as_advanced(COMPILER_RT_BUILD_XRAY)
28
29 if (COMPILER_RT_STANDALONE_BUILD)
30- load_llvm_config()
31+ find_package(LLVM REQUIRED)
32+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
33+
34+ # Variables that AddLLVM.cmake depends on (included by AddCompilerRT)
35+ set(LLVM_TOOLS_BINARY_DIR "${LLVM_INSTALL_PREFIX}/bin")
36+ set(LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib")
37+
38+ set(LLVM_LIBRARY_OUTPUT_INTDIR
39+ ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
40
41 # Find Python interpreter.
42 set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5)
43--
442.10.0
45
diff --git a/recipes-devtools/clang/compiler-rt/0004-Disable-tsan-on-OE-glibc.patch b/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch
index 8da7512..67e660d 100644
--- a/recipes-devtools/clang/compiler-rt/0004-Disable-tsan-on-OE-glibc.patch
+++ b/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch
@@ -1,7 +1,7 @@
1From baeeb27bb523b2bff96ab2fe2c5b38ecdd0570d0 Mon Sep 17 00:00:00 2001 1From 622ef6bbd65f71ebbaf3525d50fb357e62631a08 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 4/4] Disable tsan on OE/glibc 4Subject: [PATCH 3/3] 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
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 1 file changed, 1 insertion(+), 1 deletion(-) 12 1 file changed, 1 insertion(+), 1 deletion(-)
13 13
14diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake 14diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
15index ddb0304..4241771 100644 15index cb9f74b..d7e0fba 100644
16--- a/cmake/config-ix.cmake 16--- a/cmake/config-ix.cmake
17+++ b/cmake/config-ix.cmake 17+++ b/cmake/config-ix.cmake
18@@ -452,7 +452,7 @@ else() 18@@ -472,7 +472,7 @@ else()
19 endif() 19 endif()
20 20
21 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND 21 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
@@ -25,5 +25,5 @@ index ddb0304..4241771 100644
25 else() 25 else()
26 set(COMPILER_RT_HAS_TSAN FALSE) 26 set(COMPILER_RT_HAS_TSAN FALSE)
27-- 27--
282.9.0 282.10.0
29 29
diff --git a/recipes-devtools/clang/compiler-rt/0003-Simplify-cross-compilation.-Don-t-use-native-compile.patch b/recipes-devtools/clang/compiler-rt/0003-Simplify-cross-compilation.-Don-t-use-native-compile.patch
deleted file mode 100644
index 9354f66..0000000
--- a/recipes-devtools/clang/compiler-rt/0003-Simplify-cross-compilation.-Don-t-use-native-compile.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1From 6676553c56ac1879d8d597351b457ba2e087168c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 23:11:45 -0700
4Subject: [PATCH 3/4] Simplify cross-compilation. Don't use native-compiled
5 llvm-config.
6
7 Note: AddLLVM.cmake does not expose the LLVM source directory.
8 So if you want to run the test suite, you need to either:
9
10 1) set LLVM_MAIN_SRC_DIR explicitly (to find lit.py)
11 2) change AddLLVM.cmake to point to an installed 'lit'.
12 3) add_subdirectory(compiler-rt/test) from clang instead of compiler-rt.
13
14https://us.codeaurora.org/patches/quic/llvm/50683/compiler-rt-cross-compilation.patch
15
16Signed-off-by: Greg Fitzgerald <gregf@codeaurora.org>
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 CMakeLists.txt | 32 ++++++--------------------------
20 1 file changed, 6 insertions(+), 26 deletions(-)
21
22diff --git a/CMakeLists.txt b/CMakeLists.txt
23index a067581..ce904c0 100644
24--- a/CMakeLists.txt
25+++ b/CMakeLists.txt
26@@ -39,32 +39,12 @@ option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON)
27 mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS)
28
29 if (COMPILER_RT_STANDALONE_BUILD)
30- if (NOT LLVM_CONFIG_PATH)
31- find_program(LLVM_CONFIG_PATH "llvm-config"
32- DOC "Path to llvm-config binary")
33- if (NOT LLVM_CONFIG_PATH)
34- message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
35- endif()
36- endif()
37- execute_process(
38- COMMAND ${LLVM_CONFIG_PATH} "--obj-root" "--bindir" "--libdir" "--src-root"
39- RESULT_VARIABLE HAD_ERROR
40- OUTPUT_VARIABLE CONFIG_OUTPUT)
41- if (HAD_ERROR)
42- message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
43- endif()
44- string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT})
45- list(GET CONFIG_OUTPUT 0 LLVM_BINARY_DIR)
46- list(GET CONFIG_OUTPUT 1 LLVM_TOOLS_BINARY_DIR)
47- list(GET CONFIG_OUTPUT 2 LLVM_LIBRARY_DIR)
48- list(GET CONFIG_OUTPUT 3 LLVM_MAIN_SRC_DIR)
49-
50- # Make use of LLVM CMake modules.
51- file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE)
52- set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
53- list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
54- # Get some LLVM variables from LLVMConfig.
55- include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
56+ find_package(LLVM REQUIRED)
57+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
58+
59+ # Variables that AddLLVM.cmake depends on (included by AddCompilerRT)
60+ set(LLVM_TOOLS_BINARY_DIR "${LLVM_INSTALL_PREFIX}/bin")
61+ set(LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib")
62
63 set(LLVM_LIBRARY_OUTPUT_INTDIR
64 ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
65--
662.9.0
67
diff --git a/recipes-devtools/clang/compiler-rt/0005-builtins-Specifiy-builtins-using-VFP-separately.patch b/recipes-devtools/clang/compiler-rt/0005-builtins-Specifiy-builtins-using-VFP-separately.patch
deleted file mode 100644
index 5e7a43b..0000000
--- a/recipes-devtools/clang/compiler-rt/0005-builtins-Specifiy-builtins-using-VFP-separately.patch
+++ /dev/null
@@ -1,147 +0,0 @@
1From 59cffbd825a2f9c9c9b21d1314f7a2824e01a158 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 13 Aug 2016 00:33:15 +0000
4Subject: [PATCH] builtins: Specifiy builtins using VFP separately
5
6This helps in compiling compiler-rt for armv5
7using soft-float
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 lib/builtins/CMakeLists.txt | 84 +++++++++++++++++++++++----------------------
12 1 file changed, 43 insertions(+), 41 deletions(-)
13
14diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
15index d5a1efe..d84bf96 100644
16--- a/lib/builtins/CMakeLists.txt
17+++ b/lib/builtins/CMakeLists.txt
18@@ -257,8 +257,6 @@ else () # MSVC
19 endif () # if (NOT MSVC)
20
21 set(arm_SOURCES
22- arm/adddf3vfp.S
23- arm/addsf3vfp.S
24 arm/aeabi_cdcmp.S
25 arm/aeabi_cdcmpeq_check_nan.c
26 arm/aeabi_cfcmp.S
27@@ -281,10 +279,44 @@ set(arm_SOURCES
28 arm/clzdi2.S
29 arm/clzsi2.S
30 arm/comparesf2.S
31- arm/divdf3vfp.S
32 arm/divmodsi4.S
33- arm/divsf3vfp.S
34 arm/divsi3.S
35+ arm/modsi3.S
36+ arm/switch16.S
37+ arm/switch32.S
38+ arm/switch8.S
39+ arm/switchu8.S
40+ arm/sync_fetch_and_add_4.S
41+ arm/sync_fetch_and_add_8.S
42+ arm/sync_fetch_and_and_4.S
43+ arm/sync_fetch_and_and_8.S
44+ arm/sync_fetch_and_max_4.S
45+ arm/sync_fetch_and_max_8.S
46+ arm/sync_fetch_and_min_4.S
47+ arm/sync_fetch_and_min_8.S
48+ arm/sync_fetch_and_nand_4.S
49+ arm/sync_fetch_and_nand_8.S
50+ arm/sync_fetch_and_or_4.S
51+ arm/sync_fetch_and_or_8.S
52+ arm/sync_fetch_and_sub_4.S
53+ arm/sync_fetch_and_sub_8.S
54+ arm/sync_fetch_and_umax_4.S
55+ arm/sync_fetch_and_umax_8.S
56+ arm/sync_fetch_and_umin_4.S
57+ arm/sync_fetch_and_umin_8.S
58+ arm/sync_fetch_and_xor_4.S
59+ arm/sync_fetch_and_xor_8.S
60+ arm/sync_synchronize.S
61+ arm/udivmodsi4.S
62+ arm/udivsi3.S
63+ arm/umodsi3.S
64+ ${GENERIC_SOURCES})
65+
66+set(armvfp_SOURCES
67+ arm/adddf3vfp.S
68+ arm/addsf3vfp.S
69+ arm/divdf3vfp.S
70+ arm/divsf3vfp.S
71 arm/eqdf2vfp.S
72 arm/eqsf2vfp.S
73 arm/extendsfdf2vfp.S
74@@ -304,7 +336,6 @@ set(arm_SOURCES
75 arm/lesf2vfp.S
76 arm/ltdf2vfp.S
77 arm/ltsf2vfp.S
78- arm/modsi3.S
79 arm/muldf3vfp.S
80 arm/mulsf3vfp.S
81 arm/nedf2vfp.S
82@@ -315,38 +346,9 @@ set(arm_SOURCES
83 arm/save_vfp_d8_d15_regs.S
84 arm/subdf3vfp.S
85 arm/subsf3vfp.S
86- arm/switch16.S
87- arm/switch32.S
88- arm/switch8.S
89- arm/switchu8.S
90- arm/sync_fetch_and_add_4.S
91- arm/sync_fetch_and_add_8.S
92- arm/sync_fetch_and_and_4.S
93- arm/sync_fetch_and_and_8.S
94- arm/sync_fetch_and_max_4.S
95- arm/sync_fetch_and_max_8.S
96- arm/sync_fetch_and_min_4.S
97- arm/sync_fetch_and_min_8.S
98- arm/sync_fetch_and_nand_4.S
99- arm/sync_fetch_and_nand_8.S
100- arm/sync_fetch_and_or_4.S
101- arm/sync_fetch_and_or_8.S
102- arm/sync_fetch_and_sub_4.S
103- arm/sync_fetch_and_sub_8.S
104- arm/sync_fetch_and_umax_4.S
105- arm/sync_fetch_and_umax_8.S
106- arm/sync_fetch_and_umin_4.S
107- arm/sync_fetch_and_umin_8.S
108- arm/sync_fetch_and_xor_4.S
109- arm/sync_fetch_and_xor_8.S
110- arm/sync_synchronize.S
111 arm/truncdfsf2vfp.S
112- arm/udivmodsi4.S
113- arm/udivsi3.S
114- arm/umodsi3.S
115 arm/unorddf2vfp.S
116- arm/unordsf2vfp.S
117- ${GENERIC_SOURCES})
118+ arm/unordsf2vfp.S)
119
120 set(aarch64_SOURCES
121 comparetf2.c
122@@ -367,16 +369,16 @@ set(aarch64_SOURCES
123 trunctfsf2.c
124 ${GENERIC_SOURCES})
125
126-set(armhf_SOURCES ${arm_SOURCES})
127-set(armv7_SOURCES ${arm_SOURCES})
128-set(armv7s_SOURCES ${arm_SOURCES})
129-set(armv7k_SOURCES ${arm_SOURCES})
130+set(armhf_SOURCES ${arm_SOURCES} ${armvfp_SOURCES})
131+set(armv7_SOURCES ${arm_SOURCES} ${armvfp_SOURCES})
132+set(armv7s_SOURCES ${arm_SOURCES} ${armvfp_SOURCES})
133+set(armv7k_SOURCES ${arm_SOURCES} ${armvfp_SOURCES})
134 set(arm64_SOURCES ${aarch64_SOURCES})
135
136 # macho_embedded archs
137 set(armv6m_SOURCES ${GENERIC_SOURCES})
138-set(armv7m_SOURCES ${arm_SOURCES})
139-set(armv7em_SOURCES ${arm_SOURCES})
140+set(armv7m_SOURCES ${arm_SOURCES} ${armvfp_SOURCES})
141+set(armv7em_SOURCES ${arm_SOURCES} ${armvfp_SOURCES})
142
143 set(mips_SOURCES ${GENERIC_SOURCES})
144 set(mipsel_SOURCES ${mips_SOURCES})
145--
1461.9.1
147