Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 1 addition & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,74 +185,17 @@ CXXFLAGS:append:pn-<recipe>:toolchain-clang = " -stdlib=libstdc++ "
LDFLAGS:append:pn-<recipe>:toolchain-clang = " -stdlib=libstdc++ "
```

# compiler-rt failing in do_configure with custom TARGET_VENDOR

If your DISTRO sets its own value of TARGET_VENDOR, then it needs to be added in
CLANG_EXTRA_OE_VENDORS, it should be done automatically, but if compiler-rt fails
like bellow, then check the end of work-shared/llvm-project-source-12.0.0-r0/temp/log.do_patch
it should have a line like:
NOTE: Adding support following TARGET_VENDOR values: foo in
/OE/build/oe-core/tmp-glibc/work-shared/llvm-project-source-12.0.0-r0/git/llvm/lib/Support/Triple.cpp and
/OE/build/oe-core/tmp-glibc/work-shared/llvm-project-source-12.0.0-r0/git/clang/lib/Driver/ToolChains/Gnu.cpp
and check these files if //CLANG_EXTRA_OE_VENDORS* strings were replaced correctly.
Read add_distro_vendor function in recipes-devtools/clang/llvm-project-source.inc for more details.

http://errors.yoctoproject.org/Errors/Details/574365/
```shell
-- Found assembler: TOPDIR/tmp-glibc/work/core2-64-foo-linux/compiler-rt/12.0.0-r0/recipe-sysroot-native/usr/bin/x86_64-foo-linux/x86_64-foo-linux-clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: TOPDIR/tmp-glibc/work/core2-64-foo-linux/compiler-rt/12.0.0-r0/recipe-sysroot-native/usr/bin/x86_64-foo-linux/x86_64-foo-linux-clang
-- Check for working C compiler: TOPDIR/tmp-glibc/work/core2-64-foo-linux/compiler-rt/12.0.0-r0/recipe-sysroot-native/usr/bin/x86_64-foo-linux/x86_64-foo-linux-clang - broken
CMake Error at TOPDIR/tmp-glibc/work/core2-64-foo-linux/compiler-rt/12.0.0-r0/recipe-sysroot-native/usr/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler

"TOPDIR/tmp-glibc/work/core2-64-foo-linux/compiler-rt/12.0.0-r0/recipe-sysroot-native/usr/bin/x86_64-foo-linux/x86_64-foo-linux-clang"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: TOPDIR/tmp-glibc/work/core2-64-foo-linux/compiler-rt/12.0.0-r0/build/CMakeFiles/CMakeTmp

Run Build Command(s):ninja cmTC_928f4 && [1/2] Building C object CMakeFiles/cmTC_928f4.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_928f4
```

# Dependencies

```shell
URI: https://github.com/openembedded/openembedded-core.git
branch: master
revision: HEAD

URI: ghttps://github.com/openembedded/bitbake.git
URI: https://github.com/openembedded/bitbake.git
branch: master
revision: HEAD
```
# Using Devtool and Upstream Development

All LLVM based recipes use single llvm source directory, As a LLVM
developer, you might want to work on your own repository to build
related recipes, devtool can we useful in establishing such a workflow
there is a script provided `scripts/devtool-clang.sh` which can assist
in setting up all the recipes to use custom LLVM repository, in order
to setup repository make sure that it has all the needed patches applied
or else it will fail to build. Such a tree is already prepared and kept
in sync at

https://github.com/kraj/llvm-project

There are branches under `oe` namespace which carry the needed OE patches

```
cd $TOPDIR/workspace/sources
git clone https://github.com/kraj/llvm-project -b oe/main llvm-project
```

Once project is setup and meta-clang is added, run `devtool-clang.sh`
script which will do the needed for setting up external sources for the
yocto recipes, now yocto will use custom LLVM tree for its needs.

# Contributing

Expand Down
2 changes: 0 additions & 2 deletions conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,5 @@ INHERIT += "clang-legacy"
# Do not include clang in SDK unless user wants to
CLANGSDK ??= "0"

LLVMVERSION = "20.1.2"

require conf/nonclangable.conf
require conf/nonscanable.conf
48 changes: 0 additions & 48 deletions scripts/devtool-clang.sh

This file was deleted.