diff options
| author | Khem Raj <raj.khem@gmail.com> | 2018-12-27 10:47:14 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-12-27 17:29:06 -0800 |
| commit | 3d4c48bd0afb67396aacbc444fa7f6698724860e (patch) | |
| tree | c6baddd7ea8c73f781a9f691585108d228684d30 /recipes-devtools/clang/compiler-rt | |
| parent | 463509e8b983a0e999d01c803a1a999b76d70411 (diff) | |
| download | meta-clang-3d4c48bd0afb67396aacbc444fa7f6698724860e.tar.gz | |
recipes: Rework llvm/clang/compiler-rt/libcxx/lldb recipes
This is an overhaul of clang/llvm project related recipes
* switch to using a flat mono repo for all clang/llvm projects
* Add llvm-project-source recipe which will prepare source tree in
work-shared for all recipes much like kernel and gcc
* build lld as part of clang recipes, its much easier and saves build
time and hopefully nativesdk version will be built now for free
* switch to official git repos at git://github.com/llvm-project
* Adjust all recipes to use shared sources
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/compiler-rt')
4 files changed, 0 insertions, 458 deletions
diff --git a/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch deleted file mode 100644 index 19651d1..0000000 --- a/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch +++ /dev/null | |||
| @@ -1,326 +0,0 @@ | |||
| 1 | From 0bff81915ecc52416e20b7226dddf6d7f3df29c9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 19 Apr 2015 15:16:23 -0700 | ||
| 4 | Subject: [PATCH 1/5] support a new embedded linux target | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | --- | ||
| 8 | lib/builtins/int_util.c | 3 +- | ||
| 9 | make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++ | ||
| 10 | .../clang_linux_embedded_test_input.c | 0 | ||
| 11 | 3 files changed, 287 insertions(+), 2 deletions(-) | ||
| 12 | create mode 100644 make/platform/clang_linux_embedded.mk | ||
| 13 | create mode 100644 make/platform/clang_linux_embedded_test_input.c | ||
| 14 | |||
| 15 | diff --git a/lib/builtins/int_util.c b/lib/builtins/int_util.c | ||
| 16 | index de87410db..0d5b56fe1 100644 | ||
| 17 | --- a/lib/builtins/int_util.c | ||
| 18 | +++ b/lib/builtins/int_util.c | ||
| 19 | @@ -58,8 +58,7 @@ void compilerrt_abort_impl(const char *file, int line, const char *function) { | ||
| 20 | #else | ||
| 21 | |||
| 22 | /* Get the system definition of abort() */ | ||
| 23 | -#include <stdlib.h> | ||
| 24 | - | ||
| 25 | +extern void abort (void) __attribute__ ((__noreturn__)); | ||
| 26 | #ifndef _WIN32 | ||
| 27 | __attribute__((weak)) | ||
| 28 | __attribute__((visibility("hidden"))) | ||
| 29 | diff --git a/make/platform/clang_linux_embedded.mk b/make/platform/clang_linux_embedded.mk | ||
| 30 | new file mode 100644 | ||
| 31 | index 000000000..d0a890075 | ||
| 32 | --- /dev/null | ||
| 33 | +++ b/make/platform/clang_linux_embedded.mk | ||
| 34 | @@ -0,0 +1,286 @@ | ||
| 35 | +# These are the functions which clang needs when it is targeting a previous | ||
| 36 | +# version of the OS. The issue is that the backend may use functions which were | ||
| 37 | +# not present in the libgcc that shipped on the platform. In such cases, we link | ||
| 38 | +# with a version of the library which contains private_extern definitions of all | ||
| 39 | +# the extra functions which might be referenced. | ||
| 40 | + | ||
| 41 | +Description := Static runtime libraries for embedded clang/Linux | ||
| 42 | + | ||
| 43 | +# A function that ensures we don't try to build for architectures that we | ||
| 44 | +# don't have working toolchains for. | ||
| 45 | +CheckArches = \ | ||
| 46 | + $(shell \ | ||
| 47 | + result=""; \ | ||
| 48 | + for arch in $(1); do \ | ||
| 49 | + if $(CC) -arch $$arch -c \ | ||
| 50 | + -integrated-as \ | ||
| 51 | + $(ProjSrcRoot)/make/platform/clang_linux_embedded_test_input.c \ | ||
| 52 | + -o /dev/null > /dev/null 2> /dev/null; then \ | ||
| 53 | + result="$$result$$arch "; \ | ||
| 54 | + else \ | ||
| 55 | + printf 1>&2 \ | ||
| 56 | + "warning: clang_linux_embedded.mk: dropping arch '$$arch' from lib '$(2)'\n"; \ | ||
| 57 | + fi; \ | ||
| 58 | + done; \ | ||
| 59 | + echo $$result) | ||
| 60 | + | ||
| 61 | +XCRun = \ | ||
| 62 | + $(shell \ | ||
| 63 | + result=`xcrun -find $(1) 2> /dev/null`; \ | ||
| 64 | + if [ "$$?" != "0" ]; then result=$(1); fi; \ | ||
| 65 | + echo $$result) | ||
| 66 | + | ||
| 67 | +### | ||
| 68 | + | ||
| 69 | +CC := $(call XCRun,clang) | ||
| 70 | +AR := $(call XCRun,ar) | ||
| 71 | +RANLIB := $(call XCRun,ranlib) | ||
| 72 | +STRIP := $(call XCRun,strip) | ||
| 73 | +LIPO := $(call XCRun,lipo) | ||
| 74 | +DSYMUTIL := $(call XCRun,dsymutil) | ||
| 75 | +Configs := | ||
| 76 | +UniversalArchs := | ||
| 77 | + | ||
| 78 | +# Soft-float version of the runtime. No floating-point instructions will be used | ||
| 79 | +# and the ABI (out of necessity) passes floating values in normal registers: | ||
| 80 | +# non-VFP variant of the AAPCS. | ||
| 81 | +UniversalArchs.soft_static := $(call CheckArches,arm armv7m armv7em armv7,soft_static) | ||
| 82 | +Configs += $(if $(UniversalArchs.soft_static),soft_static) | ||
| 83 | + | ||
| 84 | +# Hard-float version of the runtime. On ARM VFP instructions and registers are | ||
| 85 | +# allowed, and floating point values get passed in them. VFP variant of the | ||
| 86 | +# AAPCS. | ||
| 87 | +UniversalArchs.hard_static := $(call CheckArches,armv7em armv7 i386 x86_64,hard_static) | ||
| 88 | +Configs += $(if $(UniversalArchs.hard_static),hard_static) | ||
| 89 | + | ||
| 90 | +UniversalArchs.soft_pic := $(call CheckArches,armv6m armv7m armv7em armv7,soft_pic) | ||
| 91 | +Configs += $(if $(UniversalArchs.soft_pic),soft_pic) | ||
| 92 | + | ||
| 93 | +UniversalArchs.hard_pic := $(call CheckArches,armv7em armv7 i386 x86_64,hard_pic) | ||
| 94 | +Configs += $(if $(UniversalArchs.hard_pic),hard_pic) | ||
| 95 | + | ||
| 96 | +CFLAGS := -Wall -Werror -Oz -fomit-frame-pointer -ffreestanding | ||
| 97 | + | ||
| 98 | +PIC_CFLAGS := -fPIC | ||
| 99 | +STATIC_CFLAGS := -static | ||
| 100 | + | ||
| 101 | +CFLAGS_SOFT := -mfloat-abi=soft | ||
| 102 | +CFLAGS_HARD := -mfloat-abi=hard | ||
| 103 | + | ||
| 104 | +CFLAGS_I386 := -march=pentium | ||
| 105 | + | ||
| 106 | +CFLAGS.soft_static := $(CFLAGS) $(STATIC_CFLAGS) $(CFLAGS_SOFT) | ||
| 107 | +CFLAGS.hard_static := $(CFLAGS) $(STATIC_CFLAGS) $(CFLAGS_HARD) | ||
| 108 | +CFLAGS.soft_pic := $(CFLAGS) $(PIC_CFLAGS) $(CFLAGS_SOFT) | ||
| 109 | +CFLAGS.hard_pic := $(CFLAGS) $(PIC_CFLAGS) $(CFLAGS_HARD) | ||
| 110 | + | ||
| 111 | +CFLAGS.soft_static.armv7 := $(CFLAGS.soft_static) $(CFLAGS_ARMV7) | ||
| 112 | +CFLAGS.hard_static.armv7 := $(CFLAGS.hard_static) $(CFLAGS_ARMV7) | ||
| 113 | +CFLAGS.soft_pic.armv7 := $(CFLAGS.soft_pic) $(CFLAGS_ARMV7) | ||
| 114 | +CFLAGS.hard_pic.armv7 := $(CFLAGS.hard_pic) $(CFLAGS_ARMV7) | ||
| 115 | + | ||
| 116 | +# x86 platforms ignore -mfloat-abi options and complain about doing so. Despite | ||
| 117 | +# this they're hard-float. | ||
| 118 | +CFLAGS.hard_static.i386 := $(CFLAGS) $(STATIC_CFLAGS) $(CFLAGS_I386) | ||
| 119 | +CFLAGS.hard_pic.i386 := $(CFLAGS) $(PIC_CFLAGS) $(CFLAGS_I386) | ||
| 120 | +CFLAGS.hard_static.x86_64 := $(CFLAGS) $(STATIC_CFLAGS) | ||
| 121 | +CFLAGS.hard_pic.x86_64 := $(CFLAGS) $(PIC_CFLAGS) | ||
| 122 | + | ||
| 123 | +# Functions not wanted: | ||
| 124 | +# + eprintf is obsolete anyway | ||
| 125 | +# + *vfp: designed for Thumb1 CPUs with VFPv2 | ||
| 126 | + | ||
| 127 | +COMMON_FUNCTIONS := \ | ||
| 128 | + absvdi2 \ | ||
| 129 | + absvsi2 \ | ||
| 130 | + addvdi3 \ | ||
| 131 | + addvsi3 \ | ||
| 132 | + ashldi3 \ | ||
| 133 | + ashrdi3 \ | ||
| 134 | + bswapdi2 \ | ||
| 135 | + bswapsi2 \ | ||
| 136 | + clzdi2 \ | ||
| 137 | + clzsi2 \ | ||
| 138 | + cmpdi2 \ | ||
| 139 | + ctzdi2 \ | ||
| 140 | + ctzsi2 \ | ||
| 141 | + divdc3 \ | ||
| 142 | + divdi3 \ | ||
| 143 | + divsc3 \ | ||
| 144 | + divmodsi4 \ | ||
| 145 | + udivmodsi4 \ | ||
| 146 | + do_global_dtors \ | ||
| 147 | + ffsdi2 \ | ||
| 148 | + fixdfdi \ | ||
| 149 | + fixsfdi \ | ||
| 150 | + fixunsdfdi \ | ||
| 151 | + fixunsdfsi \ | ||
| 152 | + fixunssfdi \ | ||
| 153 | + fixunssfsi \ | ||
| 154 | + floatdidf \ | ||
| 155 | + floatdisf \ | ||
| 156 | + floatundidf \ | ||
| 157 | + floatundisf \ | ||
| 158 | + gcc_bcmp \ | ||
| 159 | + lshrdi3 \ | ||
| 160 | + moddi3 \ | ||
| 161 | + muldc3 \ | ||
| 162 | + muldi3 \ | ||
| 163 | + mulsc3 \ | ||
| 164 | + mulvdi3 \ | ||
| 165 | + mulvsi3 \ | ||
| 166 | + negdi2 \ | ||
| 167 | + negvdi2 \ | ||
| 168 | + negvsi2 \ | ||
| 169 | + paritydi2 \ | ||
| 170 | + paritysi2 \ | ||
| 171 | + popcountdi2 \ | ||
| 172 | + popcountsi2 \ | ||
| 173 | + powidf2 \ | ||
| 174 | + powisf2 \ | ||
| 175 | + subvdi3 \ | ||
| 176 | + subvsi3 \ | ||
| 177 | + ucmpdi2 \ | ||
| 178 | + udiv_w_sdiv \ | ||
| 179 | + udivdi3 \ | ||
| 180 | + udivmoddi4 \ | ||
| 181 | + umoddi3 \ | ||
| 182 | + adddf3 \ | ||
| 183 | + addsf3 \ | ||
| 184 | + cmpdf2 \ | ||
| 185 | + cmpsf2 \ | ||
| 186 | + div0 \ | ||
| 187 | + divdf3 \ | ||
| 188 | + divsf3 \ | ||
| 189 | + divsi3 \ | ||
| 190 | + extendsfdf2 \ | ||
| 191 | + ffssi2 \ | ||
| 192 | + fixdfsi \ | ||
| 193 | + fixsfsi \ | ||
| 194 | + floatsidf \ | ||
| 195 | + floatsisf \ | ||
| 196 | + floatunsidf \ | ||
| 197 | + floatunsisf \ | ||
| 198 | + comparedf2 \ | ||
| 199 | + comparesf2 \ | ||
| 200 | + modsi3 \ | ||
| 201 | + muldf3 \ | ||
| 202 | + mulsf3 \ | ||
| 203 | + negdf2 \ | ||
| 204 | + negsf2 \ | ||
| 205 | + subdf3 \ | ||
| 206 | + subsf3 \ | ||
| 207 | + truncdfsf2 \ | ||
| 208 | + udivsi3 \ | ||
| 209 | + umodsi3 \ | ||
| 210 | + unorddf2 \ | ||
| 211 | + unordsf2 | ||
| 212 | + | ||
| 213 | +ARM_FUNCTIONS := \ | ||
| 214 | + aeabi_cdcmpeq \ | ||
| 215 | + aeabi_cdrcmple \ | ||
| 216 | + aeabi_cfcmpeq \ | ||
| 217 | + aeabi_cfrcmple \ | ||
| 218 | + aeabi_dcmpeq \ | ||
| 219 | + aeabi_dcmpge \ | ||
| 220 | + aeabi_dcmpgt \ | ||
| 221 | + aeabi_dcmple \ | ||
| 222 | + aeabi_dcmplt \ | ||
| 223 | + aeabi_drsub \ | ||
| 224 | + aeabi_fcmpeq \ | ||
| 225 | + aeabi_fcmpge \ | ||
| 226 | + aeabi_fcmpgt \ | ||
| 227 | + aeabi_fcmple \ | ||
| 228 | + aeabi_fcmplt \ | ||
| 229 | + aeabi_frsub \ | ||
| 230 | + aeabi_idivmod \ | ||
| 231 | + aeabi_uidivmod \ | ||
| 232 | + | ||
| 233 | +# ARM Assembly implementation which requires Thumb2 (i.e. won't work on v6M). | ||
| 234 | +THUMB2_FUNCTIONS := \ | ||
| 235 | + switch16 \ | ||
| 236 | + switch32 \ | ||
| 237 | + switch8 \ | ||
| 238 | + switchu8 \ | ||
| 239 | + sync_fetch_and_add_4 \ | ||
| 240 | + sync_fetch_and_sub_4 \ | ||
| 241 | + sync_fetch_and_and_4 \ | ||
| 242 | + sync_fetch_and_or_4 \ | ||
| 243 | + sync_fetch_and_xor_4 \ | ||
| 244 | + sync_fetch_and_nand_4 \ | ||
| 245 | + sync_fetch_and_max_4 \ | ||
| 246 | + sync_fetch_and_umax_4 \ | ||
| 247 | + sync_fetch_and_min_4 \ | ||
| 248 | + sync_fetch_and_umin_4 \ | ||
| 249 | + sync_fetch_and_add_8 \ | ||
| 250 | + sync_fetch_and_sub_8 \ | ||
| 251 | + sync_fetch_and_and_8 \ | ||
| 252 | + sync_fetch_and_or_8 \ | ||
| 253 | + sync_fetch_and_xor_8 \ | ||
| 254 | + sync_fetch_and_nand_8 \ | ||
| 255 | + sync_fetch_and_max_8 \ | ||
| 256 | + sync_fetch_and_umax_8 \ | ||
| 257 | + sync_fetch_and_min_8 \ | ||
| 258 | + sync_fetch_and_umin_8 | ||
| 259 | + | ||
| 260 | +I386_FUNCTIONS := \ | ||
| 261 | + i686.get_pc_thunk.eax \ | ||
| 262 | + i686.get_pc_thunk.ebp \ | ||
| 263 | + i686.get_pc_thunk.ebx \ | ||
| 264 | + i686.get_pc_thunk.ecx \ | ||
| 265 | + i686.get_pc_thunk.edi \ | ||
| 266 | + i686.get_pc_thunk.edx \ | ||
| 267 | + i686.get_pc_thunk.esi | ||
| 268 | + | ||
| 269 | +# FIXME: Currently, compiler-rt is missing implementations for a number of the | ||
| 270 | +# functions. Filter them out for now. | ||
| 271 | +MISSING_FUNCTIONS := \ | ||
| 272 | + cmpdf2 cmpsf2 div0 \ | ||
| 273 | + ffssi2 \ | ||
| 274 | + udiv_w_sdiv unorddf2 unordsf2 bswapdi2 \ | ||
| 275 | + bswapsi2 \ | ||
| 276 | + gcc_bcmp \ | ||
| 277 | + do_global_dtors \ | ||
| 278 | + i686.get_pc_thunk.eax i686.get_pc_thunk.ebp i686.get_pc_thunk.ebx \ | ||
| 279 | + i686.get_pc_thunk.ecx i686.get_pc_thunk.edi i686.get_pc_thunk.edx \ | ||
| 280 | + i686.get_pc_thunk.esi \ | ||
| 281 | + aeabi_cdcmpeq aeabi_cdrcmple aeabi_cfcmpeq aeabi_cfrcmple aeabi_dcmpeq \ | ||
| 282 | + aeabi_dcmpge aeabi_dcmpgt aeabi_dcmple aeabi_dcmplt aeabi_drsub \ | ||
| 283 | + aeabi_fcmpeq \ aeabi_fcmpge aeabi_fcmpgt aeabi_fcmple aeabi_fcmplt \ | ||
| 284 | + aeabi_frsub aeabi_idivmod aeabi_uidivmod | ||
| 285 | + | ||
| 286 | +FUNCTIONS_ARMV6M := $(COMMON_FUNCTIONS) $(ARM_FUNCTIONS) | ||
| 287 | +FUNCTIONS_ARM_ALL := $(COMMON_FUNCTIONS) $(ARM_FUNCTIONS) $(THUMB2_FUNCTIONS) | ||
| 288 | +FUNCTIONS_I386 := $(COMMON_FUNCTIONS) $(I386_FUNCTIONS) | ||
| 289 | +FUNCTIONS_X86_64 := $(COMMON_FUNCTIONS) | ||
| 290 | + | ||
| 291 | +FUNCTIONS_ARMV6M := \ | ||
| 292 | + $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_ARMV6M)) | ||
| 293 | +FUNCTIONS_ARM_ALL := \ | ||
| 294 | + $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_ARM_ALL)) | ||
| 295 | +FUNCTIONS_I386 := \ | ||
| 296 | + $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_I386)) | ||
| 297 | +FUNCTIONS_X86_64 := \ | ||
| 298 | + $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_X86_64)) | ||
| 299 | + | ||
| 300 | +FUNCTIONS.soft_static.armv6m := $(FUNCTIONS_ARMV6M) | ||
| 301 | +FUNCTIONS.soft_pic.armv6m := $(FUNCTIONS_ARMV6M) | ||
| 302 | + | ||
| 303 | +FUNCTIONS.soft_static.armv7m := $(FUNCTIONS_ARM_ALL) | ||
| 304 | +FUNCTIONS.soft_pic.armv7m := $(FUNCTIONS_ARM_ALL) | ||
| 305 | + | ||
| 306 | +FUNCTIONS.soft_static.armv7em := $(FUNCTIONS_ARM_ALL) | ||
| 307 | +FUNCTIONS.hard_static.armv7em := $(FUNCTIONS_ARM_ALL) | ||
| 308 | +FUNCTIONS.soft_pic.armv7em := $(FUNCTIONS_ARM_ALL) | ||
| 309 | +FUNCTIONS.hard_pic.armv7em := $(FUNCTIONS_ARM_ALL) | ||
| 310 | + | ||
| 311 | +FUNCTIONS.soft_static.armv7 := $(FUNCTIONS_ARM_ALL) | ||
| 312 | +FUNCTIONS.hard_static.armv7 := $(FUNCTIONS_ARM_ALL) | ||
| 313 | +FUNCTIONS.soft_pic.armv7 := $(FUNCTIONS_ARM_ALL) | ||
| 314 | +FUNCTIONS.hard_pic.armv7 := $(FUNCTIONS_ARM_ALL) | ||
| 315 | + | ||
| 316 | +FUNCTIONS.hard_static.i386 := $(FUNCTIONS_I386) | ||
| 317 | +FUNCTIONS.hard_pic.i386 := $(FUNCTIONS_I386) | ||
| 318 | + | ||
| 319 | +FUNCTIONS.hard_static.x86_64 := $(FUNCTIONS_X86_64) | ||
| 320 | +FUNCTIONS.hard_pic.x86_64 := $(FUNCTIONS_X86_64) | ||
| 321 | diff --git a/make/platform/clang_linux_embedded_test_input.c b/make/platform/clang_linux_embedded_test_input.c | ||
| 322 | new file mode 100644 | ||
| 323 | index 000000000..e69de29bb | ||
| 324 | -- | ||
| 325 | 2.18.0 | ||
| 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 deleted file mode 100644 index a3d2a66..0000000 --- a/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | From b1b791a330d6399c85fd304f4af12fd01c5b58b2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 19 May 2016 23:11:45 -0700 | ||
| 4 | Subject: [PATCH 2/5] 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 | |||
| 14 | https://us.codeaurora.org/patches/quic/llvm/50683/compiler-rt-cross-compilation.patch | ||
| 15 | |||
| 16 | Signed-off-by: Greg Fitzgerald <gregf@codeaurora.org> | ||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | --- | ||
| 19 | CMakeLists.txt | 11 ++++++++++- | ||
| 20 | 1 file changed, 10 insertions(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 23 | index 86ca2b3ef..07d894c8a 100644 | ||
| 24 | --- a/CMakeLists.txt | ||
| 25 | +++ b/CMakeLists.txt | ||
| 26 | @@ -63,7 +63,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN | ||
| 27 | "Build for a bare-metal target.") | ||
| 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 | if (TARGET intrinsics_gen) | ||
| 42 | # Loading the llvm config causes this target to be imported so place it | ||
| 43 | # under the appropriate folder in an IDE. | ||
| 44 | -- | ||
| 45 | 2.18.0 | ||
| 46 | |||
diff --git a/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch b/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch deleted file mode 100644 index 83f2d82..0000000 --- a/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | From c90304ffca9c886443e5736ae312e32415651dfe Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 18 Jul 2016 08:05:02 +0000 | ||
| 4 | Subject: [PATCH 3/5] Disable tsan on OE/glibc | ||
| 5 | |||
| 6 | It does not build see | ||
| 7 | http://lists.llvm.org/pipermail/llvm-dev/2016-July/102235.html | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | cmake/config-ix.cmake | 2 +- | ||
| 12 | test/sanitizer_common/CMakeLists.txt | 1 - | ||
| 13 | 2 files changed, 1 insertion(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake | ||
| 16 | index f3935ffd6..2c651b756 100644 | ||
| 17 | --- a/cmake/config-ix.cmake | ||
| 18 | +++ b/cmake/config-ix.cmake | ||
| 19 | @@ -564,7 +564,7 @@ else() | ||
| 20 | endif() | ||
| 21 | |||
| 22 | if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND | ||
| 23 | - OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android|NetBSD") | ||
| 24 | + OS_NAME MATCHES "Darwin|FreeBSD|Android|NetBSD") | ||
| 25 | set(COMPILER_RT_HAS_TSAN TRUE) | ||
| 26 | else() | ||
| 27 | set(COMPILER_RT_HAS_TSAN FALSE) | ||
| 28 | diff --git a/test/sanitizer_common/CMakeLists.txt b/test/sanitizer_common/CMakeLists.txt | ||
| 29 | index 4e2c80390..990315f11 100644 | ||
| 30 | --- a/test/sanitizer_common/CMakeLists.txt | ||
| 31 | +++ b/test/sanitizer_common/CMakeLists.txt | ||
| 32 | @@ -8,7 +8,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|SunOS") | ||
| 33 | list(APPEND SUPPORTED_TOOLS asan) | ||
| 34 | endif() | ||
| 35 | if(CMAKE_SYSTEM_NAME MATCHES "NetBSD" OR (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)) | ||
| 36 | - list(APPEND SUPPORTED_TOOLS tsan) | ||
| 37 | list(APPEND SUPPORTED_TOOLS msan) | ||
| 38 | list(APPEND SUPPORTED_TOOLS ubsan) | ||
| 39 | endif() | ||
| 40 | -- | ||
| 41 | 2.18.0 | ||
| 42 | |||
diff --git a/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch b/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch deleted file mode 100644 index 5868c6e..0000000 --- a/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | From 4c3f384a73a545183b0210f20ab84e7a5075b209 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 11 Feb 2017 17:54:33 +0000 | ||
| 4 | Subject: [PATCH 4/5] cmake/mips: Do not specify --target with OE | ||
| 5 | |||
| 6 | OE already specifies cross compiler correctly, adding this additional | ||
| 7 | --target confuses the clang driver and it resorts to invoke host assembler | ||
| 8 | when using -no-integrated-as | ||
| 9 | |||
| 10 | Fixes errors e.g. | ||
| 11 | | Assembler messages: | ||
| 12 | | | ||
| 13 | | Fatal error: invalid -march= option: `mips32r2' | ||
| 14 | | | ||
| 15 | | clang-4.0: error: assembler command failed with exit code 1 | ||
| 16 | |||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | --- | ||
| 19 | cmake/base-config-ix.cmake | 8 ++++---- | ||
| 20 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake | ||
| 23 | index 91fe2494b..789b80628 100644 | ||
| 24 | --- a/cmake/base-config-ix.cmake | ||
| 25 | +++ b/cmake/base-config-ix.cmake | ||
| 26 | @@ -191,11 +191,11 @@ macro(test_targets) | ||
| 27 | # clang's default CPU's. In the 64-bit case, we must also specify the ABI | ||
| 28 | # since the default ABI differs between gcc and clang. | ||
| 29 | # FIXME: Ideally, we would build the N32 library too. | ||
| 30 | - test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu") | ||
| 31 | - test_target_arch(mips64el "" "-mips64r2" "--target=mips64el-linux-gnu" "-mabi=64") | ||
| 32 | + test_target_arch(mipsel "" "-mips32r2") | ||
| 33 | + test_target_arch(mips64el "" "-mips64r2" "-mabi=64") | ||
| 34 | elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips") | ||
| 35 | - test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu") | ||
| 36 | - test_target_arch(mips64 "" "-mips64r2" "--target=mips64-linux-gnu" "-mabi=64") | ||
| 37 | + test_target_arch(mips "" "-mips32r2") | ||
| 38 | + test_target_arch(mips64 "" "-mips64r2" "-mabi=64") | ||
| 39 | elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm") | ||
| 40 | if(WIN32) | ||
| 41 | test_target_arch(arm "" "" "") | ||
| 42 | -- | ||
| 43 | 2.18.0 | ||
| 44 | |||
