summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorEsben Haabendal <esben.haabendal@huawei.com>2022-06-29 16:22:56 +0200
committerKhem Raj <raj.khem@gmail.com>2022-07-05 09:28:05 -0400
commit9cea73660aa56b461f96487ddcbfba5e7b64fafb (patch)
tree42e3bb50982c5050261081991b85aceff501f81a /recipes-devtools
parent2404761083de5644dccd064dc4d08b0a331a185f (diff)
downloadmeta-clang-9cea73660aa56b461f96487ddcbfba5e7b64fafb.tar.gz
clang: Fix native and nativesdk builds for hf targets
Setting the ${HF} variable based on ${TUNE_CCARGS_MFLOAT} does only make sense for target builds, as it defines arguments for target. Without this fix, building with hf machine configuration will cause problems, as native and nativesdk triplets will be include "hf", something like "x86_64hf-linux", which is wrong and not recognized by LLVM build/configuration system. Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/clang/clang_git.bb3
-rw-r--r--recipes-devtools/clang/compiler-rt-sanitizers_git.bb3
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb3
3 files changed, 6 insertions, 3 deletions
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index 2ba0159..1ff8f81 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -105,7 +105,8 @@ LLVM_TARGETS_TO_BUILD ?= "AMDGPU;AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86"
105LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ?= "" 105LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ?= ""
106LLVM_EXPERIMENTAL_TARGETS_TO_BUILD:append = ";${@get_clang_experimental_target_arch(bb, d)}" 106LLVM_EXPERIMENTAL_TARGETS_TO_BUILD:append = ";${@get_clang_experimental_target_arch(bb, d)}"
107 107
108HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" 108HF = ""
109HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}"
109HF[vardepvalue] = "${HF}" 110HF[vardepvalue] = "${HF}"
110 111
111LLVM_PROJECTS ?= "clang;clang-tools-extra;lld${LLDB}" 112LLVM_PROJECTS ?= "clang;clang-tools-extra;lld${LLDB}"
diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb
index 18ec31d..21c5e16 100644
--- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb
+++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb
@@ -23,7 +23,8 @@ PACKAGECONFIG ??= ""
23PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" 23PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF"
24PACKAGECONFIG[static-libcxx] = "-DSANITIZER_USE_STATIC_CXX_ABI=ON -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON,," 24PACKAGECONFIG[static-libcxx] = "-DSANITIZER_USE_STATIC_CXX_ABI=ON -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON,,"
25 25
26HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" 26HF = ""
27HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}"
27HF[vardepvalue] = "${HF}" 28HF[vardepvalue] = "${HF}"
28 29
29OECMAKE_TARGET_COMPILE = "compiler-rt" 30OECMAKE_TARGET_COMPILE = "compiler-rt"
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 9be463a..b921f1d 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -49,7 +49,8 @@ PACKAGECONFIG ??= ""
49PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" 49PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF"
50PACKAGECONFIG[profile] ="-DCOMPILER_RT_BUILD_PROFILE=ON,-DCOMPILER_RT_BUILD_PROFILE=OFF" 50PACKAGECONFIG[profile] ="-DCOMPILER_RT_BUILD_PROFILE=ON,-DCOMPILER_RT_BUILD_PROFILE=OFF"
51 51
52HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" 52HF = ""
53HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}"
53HF[vardepvalue] = "${HF}" 54HF[vardepvalue] = "${HF}"
54 55
55OECMAKE_TARGET_COMPILE = "compiler-rt" 56OECMAKE_TARGET_COMPILE = "compiler-rt"