Please, help me to understand following:
I have aarch64-unknown-linux-gnu crossdev env configured in according to https://wiki.gentoo.org/wiki/Crossdev. It uses GCC toolchain. Everything works fine here.
Additionally I have LLVM/clang on my system with LLVM_TARGETS="AArch64". So, my clang is capable of crosscompiling for aarch64. right?
As per documentation it is clear that I can't fully setup LLVM crossdev for "-gnu" with
Code: Select all
crossdev --llvm -t aarch64-unknown-linux-gnuIs it possible *on top* of my existing aarch64-unknown-linux-gnu env add support of clang cross compiling?
For example, if I try to crosscompile firefox with USE="clang" I have
Code: Select all
0:00.95 checking for the target C compiler... not found
0:00.95 DEBUG: _cc: Looking for aarch64-unknown-linux-gnu-clang-21
0:00.95 ERROR: Cannot find the target C compiler
If I try to manually install clang-crossdev-wrappers (manually unmasking it), it provides respective symlinks but now I have
Code: Select all
0:00.96 DEBUG: Executing: `/usr/lib/llvm/21/bin/aarch64-unknown-linux-gnu-clang-21 --sysroot /usr/aarch64-unknown-linux-gnu /var/tmp/portage/www-client/firefox-147.0.1/temp/conftest_rog1cao.c -E`
0:00.96 DEBUG: The command returned non-zero exit status 1.
0:00.96 DEBUG: Its error output was:
0:00.96 DEBUG: | clang-21: error: configuration file '/etc/clang/cross/aarch64-unknown-linux-gnu.cfg' cannot be opened: No such file or directory
0:00.96 ERROR: Command `/usr/lib/llvm/21/bin/aarch64-unknown-linux-gnu-clang-21 --sysroot /usr/aarch64-unknown-linux-gnu /var/tmp/portage/www-client/firefox-147.0.1/temp/conftest_rog1cao.c -E` failed with exit status 1.
Am I doing something nasty here? Is it possible to make clang crosscompile for aarch64 with glibc somewhow?
Thanks

