diff options
-rw-r--r-- | README.md | 36 |
1 files changed, 16 insertions, 20 deletions
@@ -16,41 +16,39 @@ git clone git://github.com/kraj/meta-clang.git | |||
16 | $ . ./oe-init-build-env | 16 | $ . ./oe-init-build-env |
17 | ``` | 17 | ``` |
18 | 18 | ||
19 | Edit conf/bblayers.conf to add meta-clang to layer mix e.g. | 19 | Add meta-clang overlay |
20 | |||
21 | ```python | ||
22 | BBLAYERS ?= " \ | ||
23 | /home/kraj/openembedded-core/meta-clang \ | ||
24 | /home/kraj/openembedded-core/meta \ | ||
25 | " | ||
26 | ``` | 20 | ``` |
21 | bitbake-layers add-layer ../meta-clang | ||
22 | ``` | ||
23 | |||
24 | Check `conf/bblayers.conf` to see that meta-clang is added to layer mix e.g. | ||
27 | 25 | ||
28 | # Default Compiler Switch | 26 | # Default Compiler Switch |
29 | 27 | ||
30 | Note that by default gcc will remain the system compiler, however if you wish | 28 | Note that by default gcc will remain the system compiler, however if you wish |
31 | clang to be the default compiler then set | 29 | clang to be the default compiler then set |
32 | 30 | ||
33 | ```python | 31 | ```shell |
34 | TOOLCHAIN ?= "clang" | 32 | TOOLCHAIN ?= "clang" |
35 | ``` | 33 | ``` |
36 | 34 | ||
37 | in local.conf, this would now switch to using clang as default compiler systemwide | 35 | in `local.conf`, this would now switch default cross-compiler to be clang |
38 | you can select clang per package too by writing bbappends for them containing | 36 | you can select clang per recipe too by writing bbappends for them containing |
39 | 37 | ||
40 | ```python | 38 | ```shell |
41 | TOOLCHAIN = "clang" | 39 | TOOLCHAIN = "clang" |
42 | ``` | 40 | ``` |
43 | 41 | ||
44 | # Default C++ Standard Library Switch | 42 | # Default C++ Standard Library Switch |
45 | 43 | ||
46 | Note that by default clang libc++ is default C++ standard library, however if you wish | 44 | Note that by default clang libc++ is default C++ standard library, however if you wish |
47 | GNU libstdc++ to be the default one then set | 45 | to keep GNU libstdc++ to be the default then set |
48 | 46 | ||
49 | ```python | 47 | ```shell |
50 | LIBCPLUSPLUS = "" | 48 | LIBCPLUSPLUS = "" |
51 | ``` | 49 | ``` |
52 | 50 | ||
53 | in local.conf. | 51 | in `local.conf`. |
54 | You can select libstdc++ per package too by writing bbappends for them containing | 52 | You can select libstdc++ per package too by writing bbappends for them containing |
55 | 53 | ||
56 | ```python | 54 | ```python |
@@ -63,7 +61,7 @@ By default, clang build from meta-clang uses clang runtime ( compiler-rt + libc+ | |||
63 | However, it is possible to switch to using gcc runtime as default, In order to do that | 61 | However, it is possible to switch to using gcc runtime as default, In order to do that |
64 | following settings are needed in site configurations e.g. in local.conf | 62 | following settings are needed in site configurations e.g. in local.conf |
65 | 63 | ||
66 | ```python | 64 | ```shell |
67 | TOOLCHAIN ?= "clang" | 65 | TOOLCHAIN ?= "clang" |
68 | TARGET_CXXFLAGS_remove_toolchain-clang = " --stdlib=libc++" | 66 | TARGET_CXXFLAGS_remove_toolchain-clang = " --stdlib=libc++" |
69 | TUNE_CCARGS_remove_toolchain-clang = " --rtlib=compiler-rt --unwindlib=libunwind --stdlib=libc++" | 67 | TUNE_CCARGS_remove_toolchain-clang = " --rtlib=compiler-rt --unwindlib=libunwind --stdlib=libc++" |
@@ -101,7 +99,7 @@ CXX_remove_pn-<recipe>_toolchain-clang = " -stdlib=libc++ " | |||
101 | 99 | ||
102 | # Dependencies | 100 | # Dependencies |
103 | 101 | ||
104 | ``` | 102 | ```shell |
105 | URI: git://github.com/openembedded/openembedded-core.git | 103 | URI: git://github.com/openembedded/openembedded-core.git |
106 | branch: master | 104 | branch: master |
107 | revision: HEAD | 105 | revision: HEAD |
@@ -113,9 +111,7 @@ revision: HEAD | |||
113 | 111 | ||
114 | # Contributing | 112 | # Contributing |
115 | 113 | ||
116 | Send github pull requests | 114 | You are encouraged to follow Github Pull request workflow |
117 | 115 | to share changes and following commit message guidelines are recommended [OE patch guidelines](https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines) | |
118 | You are encouraged to fork the mirror on [github](https://github.com/kraj/meta-clang/) | ||
119 | to share changes Following commit message guidelines are recommended [OE patch guidelines](https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines) | ||
120 | 116 | ||
121 | Layer Maintainer: [Khem Raj](<mailto:raj.khem@gmail.com>) | 117 | Layer Maintainer: [Khem Raj](<mailto:raj.khem@gmail.com>) |