Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942214 - sys-devel/crossdev Optional support of clang/llvm
Summary: sys-devel/crossdev Optional support of clang/llvm
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Crossdev team
URL: https://gitweb.gentoo.org/proj/crossd...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-26 08:51 UTC by dE
Modified: 2025-03-27 09:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dE 2024-10-26 08:51:15 UTC
crossdev either supports a profile which is built completely using clang or gcc -- it does not support a hybrid approach of building the optional gcc or clang compiler. This is needed because of many packages insist on clang/llvm like firefox, chromium, spidermonkey, dev-libs/libclc, dev-util/spirv-llvm-translator etc...

Therefore there must be switches to build an optional gcc/llvm/clang compiler which will not be the system compiler, but will be available for use for use for the likes of above packages; otherwise building these packages with crossdev fails with error <archspec>-clang does not exist.

Reproducible: Always
Comment 1 dE 2025-03-27 09:19:05 UTC
I've been using -- 
for i in `find /usr/lib/llvm/ -mount -name 'x86_64-<build host CHOST>-linux-gnu-*'`; do ln -s `echo -n $i | grep -Po '[^/]+$'` `echo -n $i | grep -Po /.*/``echo -n $i | grep -Po '[^/]+$' | sed s/-<build host CHOST>-/-<TARGET chost>-/`; done

On the build host and it works great. I don't remember any failing any clang/llvm ebuild because of compiler issues.
Comment 2 James Le Cuirot gentoo-dev 2025-03-27 09:47:10 UTC
I mentioned in your other bug that I had been implementing proper profile support. As part of that, I tried to deal with Clang/LLVM even though it's not something I'm especially interested in. As you say, the existing experimental support is inflexible and geared towards a very specific use case. Trying to fix this has proven extremely difficult. It involves several more packages, which is a pain because because crossdev's plethora of command line options have already spiralled out of control. I'd like to kill a lot of them off, but at the same time, Sam and I have been wondering whether it's time for crossdev to evolve into something very different that's more tightly integrated with the package manager. I doubt I'll find the time though.