summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/llvm-project-source.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/llvm-project-source.inc')
-rw-r--r--recipes-devtools/clang/llvm-project-source.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/recipes-devtools/clang/llvm-project-source.inc b/recipes-devtools/clang/llvm-project-source.inc
index f6c552d..c954f4e 100644
--- a/recipes-devtools/clang/llvm-project-source.inc
+++ b/recipes-devtools/clang/llvm-project-source.inc
@@ -18,3 +18,20 @@ STAMPCLEAN = "${STAMPS_DIR}/work-shared/llvm-project-source-${PV}-*"
18INHIBIT_DEFAULT_DEPS = "1" 18INHIBIT_DEFAULT_DEPS = "1"
19DEPENDS = "" 19DEPENDS = ""
20PACKAGES = "" 20PACKAGES = ""
21
22# additional TARGET_VENDOR values we want to support
23CLANG_EXTRA_OE_VENDORS ?= "${TARGET_VENDOR}"
24
25add_more_target_vendors() {
26 local cases="" triples=""
27 for dash_vendor in ${CLANG_EXTRA_OE_VENDORS}; do
28 vendor=`echo $dash_vendor | sed 's/^-//g'`
29 cases="$cases.Case(\"$vendor\", Triple::OpenEmbedded)"
30 triples="$triples\"x86_64-$vendor-linux\","
31 done
32 bbnote "Adding support following TARGET_VENDOR values: ${CLANG_EXTRA_OE_VENDORS} in ${S}/llvm/lib/Support/Triple.cpp and ${S}/clang/lib/Driver/ToolChains/Gnu.cpp"
33 sed "s#//CLANG_EXTRA_OE_VENDORS_CASES#$cases#g" -i ${S}/llvm/lib/Support/Triple.cpp
34 sed "s#//CLANG_EXTRA_OE_VENDORS_TRIPLES#$triples#g" -i ${S}/clang/lib/Driver/ToolChains/Gnu.cpp
35}
36
37do_patch[postfuncs] += "add_more_target_vendors"