summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md24
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb1
-rw-r--r--recipes-devtools/clang/libcxx_git.bb1
3 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index d63060d..986f77c 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,22 @@ you can select clang per package too by writing bbappends for them containing
39TOOLCHAIN = "clang" 39TOOLCHAIN = "clang"
40``` 40```
41 41
42# Default C++ Standard Library Switch
43
44Note that by default libstdc++ will remain the default C++ standard library, however if you wish
45libc++ to be the default one then set
46
47```python
48TARGET_CXXFLAGS_append_toolchain-clang ?= " -stdlib=libc++ "
49```
50
51in local.conf.
52You can select libc++ per package too by writing bbappends for them containing
53
54```python
55TARGET_CXXFLAGS_append_toolchain-clang = " -stdlib=libc++ "
56```
57
42# Building 58# Building
43 59
44Below we build for qemuarm machine as an example 60Below we build for qemuarm machine as an example
@@ -61,7 +77,13 @@ simply add it to conf/nonclangable.inc e.g.
61TOOLCHAIN_pn-<recipe> = "gcc" 77TOOLCHAIN_pn-<recipe> = "gcc"
62``` 78```
63 79
64and OE will start using gcc to cross compile that recipe, 80and OE will start using gcc to cross compile that recipe.
81
82And if a component does not build with libc++, you can add it to conf/nonclangable.inc e.g.
83
84```shell
85TARGET_CXXFLAGS_remove_pn-<recipe>_toolchain-clang = " -stdlib=libc++ "
86```
65 87
66# Dependencies 88# Dependencies
67 89
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 834d2d6..ae21806 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -27,6 +27,7 @@ SRCREV_FORMAT = "compiler-rt"
27 27
28BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt" 28BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt"
29BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" 29BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx"
30TARGET_CXXFLAGS_remove_toolchain-clang = " -stdlib=libc++ "
30 31
31DEPENDS += "ninja-native" 32DEPENDS += "ninja-native"
32 33
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb
index 0f3b2a8..57f0654 100644
--- a/recipes-devtools/clang/libcxx_git.bb
+++ b/recipes-devtools/clang/libcxx_git.bb
@@ -14,6 +14,7 @@ PV .= "+git${SRCPV}"
14 14
15DEPENDS += "ninja-native" 15DEPENDS += "ninja-native"
16BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" 16BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx"
17TARGET_CXXFLAGS_remove_toolchain-clang = " -stdlib=libc++ "
17 18
18PROVIDES = "libunwind" 19PROVIDES = "libunwind"
19PROVIDES_remove_mipsarch = "libunwind" 20PROVIDES_remove_mipsarch = "libunwind"