[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-mediatek/recipes-devtools/clang/clang-cross_git.bbappend b/meta/meta-mediatek/recipes-devtools/clang/clang-cross_git.bbappend
new file mode 100644
index 0000000..4985a5c
--- /dev/null
+++ b/meta/meta-mediatek/recipes-devtools/clang/clang-cross_git.bbappend
@@ -0,0 +1,12 @@
+do_install_append() {
+
+	rm -f ${D}${bindir}/${TARGET_PREFIX}llvm-ar
+	cat > ${D}${bindir}/${TARGET_PREFIX}llvm-ar << 'EOF'
+#!/bin/sh
+basedir=$(dirname "$0")
+"${basedir}/../llvm-ar" "$@"
+exit "$?"
+EOF
+	chmod +x ${D}${bindir}/${TARGET_PREFIX}llvm-ar
+
+}
diff --git a/meta/meta-mediatek/recipes-devtools/clang/compiler-rt_git.bbappend b/meta/meta-mediatek/recipes-devtools/clang/compiler-rt_git.bbappend
new file mode 100644
index 0000000..2733168
--- /dev/null
+++ b/meta/meta-mediatek/recipes-devtools/clang/compiler-rt_git.bbappend
@@ -0,0 +1 @@
+baselib = "lib"
diff --git a/meta/meta-mediatek/recipes-devtools/clang/files/0002-use-gcc_s-instead-unwind.patch b/meta/meta-mediatek/recipes-devtools/clang/files/0002-use-gcc_s-instead-unwind.patch
new file mode 100644
index 0000000..c885d9e
--- /dev/null
+++ b/meta/meta-mediatek/recipes-devtools/clang/files/0002-use-gcc_s-instead-unwind.patch
@@ -0,0 +1,27 @@
+From 10085819b632fecf6b4cd16dbb26f65ac56fa86e Mon Sep 17 00:00:00 2001
+From: Jizhou Deng <jizhou.deng@mediatek.com>
+Date: Fri, 26 Jul 2019 11:33:54 +0800
+Subject: [PATCH] use gcc_s instead unwind
+
+---
+ clang/lib/Driver/ToolChains/CommonArgs.cpp | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
+index 5f6b24e33eb..cb4854710cb 100644
+--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
++++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
+@@ -1192,9 +1192,7 @@ void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D,
+   case ToolChain::RLT_CompilerRT:
+     CmdArgs.push_back(TC.getCompilerRTArgString(Args, "builtins"));
+     CmdArgs.push_back("--as-needed");
+-    CmdArgs.push_back("-l:libunwind.a");
+-    CmdArgs.push_back("-lpthread");
+-    CmdArgs.push_back("-ldl");
++    CmdArgs.push_back("-lgcc_s");
+     CmdArgs.push_back("--no-as-needed");
+ 
+     break;
+-- 
+2.18.0
+
diff --git a/meta/meta-mediatek/recipes-devtools/clang/libcxx_%.bbappend b/meta/meta-mediatek/recipes-devtools/clang/libcxx_%.bbappend
new file mode 100644
index 0000000..2733168
--- /dev/null
+++ b/meta/meta-mediatek/recipes-devtools/clang/libcxx_%.bbappend
@@ -0,0 +1 @@
+baselib = "lib"
diff --git a/meta/meta-mediatek/recipes-devtools/clang/libcxx_git.bbappend b/meta/meta-mediatek/recipes-devtools/clang/libcxx_git.bbappend
new file mode 100644
index 0000000..2975a45
--- /dev/null
+++ b/meta/meta-mediatek/recipes-devtools/clang/libcxx_git.bbappend
@@ -0,0 +1,5 @@
+TARGET_CXXFLAGS_remove_toolchain-clang = "--stdlib=libc++ "
+TUNE_CCARGS_append_toolchain-clang = " -Wl,-lgcc_s "
+PACKAGECONFIG_arm = ""
+PACKAGECONFIG_aarch64 = ""
+ 
diff --git a/meta/meta-mediatek/recipes-devtools/clang/llvm-project-source.bbappend b/meta/meta-mediatek/recipes-devtools/clang/llvm-project-source.bbappend
new file mode 100644
index 0000000..5bf7379
--- /dev/null
+++ b/meta/meta-mediatek/recipes-devtools/clang/llvm-project-source.bbappend
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/files"
+
+SRC_URI_append = " \
+                  file://0002-use-gcc_s-instead-unwind.patch \
+"
+