Thanks João, the patchset looks solid, I have one comment if you can
address that we are good to go

On Mon, Jun 22, 2026 at 6:21 AM João Marcos Costa <
[email protected]> wrote:

> Hello,
>
> I faced some strange build issues when switching from one distro to another
> (i.e. DISTRO="poky" to DISTRO="foobar"), even after adding "foobar"
> ("foobar:foobar" actually) to CLANG_EXTRA_OE_DISTRO. I started
> investigating
> what was wrong, and I believe the order of pathes in this series reflects
> pretty
> well what specific issue I stumbled upon and what was the next one, on and
> on.
>
> The error message was:
>
> /src/build/tmp/work/riscv64imafdc-foobar-linux/libcxx/22.1.3/recipe-sysroot-native/usr/bin/riscv64-foobar-linux/riscv64-foobar-linux-ld:
> cannot find crtbeginS.o: No such file or directory
> /src/build/tmp/work/riscv64imafdc-foobar-linux/libcxx/22.1.3/recipe-sysroot-native/usr/bin/riscv64-foobar-linux/riscv64-foobar-linux-ld:
> cannot find -lstdc++: No such file or directory
> /src/build/tmp/work/riscv64imafdc-foobar-linux/libcxx/22.1.3/recipe-sysroot-native/usr/bin/riscv64-foobar-linux/riscv64-foobar-linux-ld:
> cannot find -lgcc: No such file or directory
> riscv64-foobar-linux-clang++: error: linker command failed with exit code
> 1 (use -v to see invocation)
>
> As far as I understand, this is precisely what do_preconfigure (+ some
> patches)
> is supposed to handle, so at first it looked like a regression, but it
> seems the
> error only reproduces when switching distros.
>
> For some context, I was building something with
> PREFERRED_TOOLCHAIN_TARGET="clang", using wrynose branch. If I use the
> custom
> distro from the beginning (so no switching), everything works fine (as
> expected).
>
> Best regards,
>
> João Marcos Costa (4):
>   llvm-project-source.inc: fix string replacements in do_preconfigure
>   llvm-project-source.inc: fix end of line in triple variable
>   clang/llvm: add missing instance of Distro class in Linux.cpp
>   llvm-project-source.inc: add vardeps to do_preconfigure
>
>  ...istro-instance-to-getMultiarchTriple.patch | 35 +++++++++++++++++++
>  meta/recipes-devtools/clang/common.inc        |  1 +
>  .../clang/llvm-project-source.inc             |  7 ++--
>  3 files changed, 40 insertions(+), 3 deletions(-)
>  create mode 100644
> meta/recipes-devtools/clang/clang/0001-llvm-clang-Add-Distro-instance-to-getMultiarchTriple.patch
>
> --
> 2.47.0
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#239326): 
https://lists.openembedded.org/g/openembedded-core/message/239326
Mute This Topic: https://lists.openembedded.org/mt/119923388/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to