Compiling sys-kernel/gentoo-kernel-6.6.41 with stable llvm, and enabling CONFIG_LTO=y CONFIG_LTO_CLANG=y CONFIG_LTO_CLANG_THIN=y results in: Stack dump: 0. Running pass 'Function Pass Manager' on module 'vmlinux.a(ip6_input.o at 1457314)'. 1. Running pass 'X86 DAG->DAG Instruction Selection' on function '@ip6_rcv_core' #0 0x00007fc0810e02ea llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x14e02ea) #1 0x00007fc0810dd4b4 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x14dd4b4) #2 0x00007fc0810e0c44 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x14e0c44) #3 0x00007fc07f64b9a0 (/usr/lib64/libc.so.6+0x419a0) #4 0x00007fc07f6a84fb pthread_kill (/usr/lib64/libc.so.6+0x9e4fb) #5 0x00007fc07f64b8f6 raise (/usr/lib64/libc.so.6+0x418f6) #6 0x00007fc07f62e8b7 abort (/usr/lib64/libc.so.6+0x248b7) #7 0x00007fc07f62f91c (/usr/lib64/libc.so.6+0x2591c) #8 0x00007fc07f6b2c27 (/usr/lib64/libc.so.6+0xa8c27) #9 0x00007fc07f6b82dc __libc_realloc (/usr/lib64/libc.so.6+0xae2dc) #10 0x00007fc08105ab77 llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x145ab77) #11 0x00007fc081899c47 llvm::SUnit::addPred(llvm::SDep const&, bool) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x1c99c47) #12 0x00007fc081bd692c llvm::ScheduleDAGSDNodes::AddSchedEdges() (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x1fd692c) #13 0x00007fc081bc93ec (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x1fc93ec) #14 0x00007fc081cb82f2 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x20b82f2) #15 0x00007fc081cb6ac1 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x20b6ac1) #16 0x00007fc081cb3531 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x20b3531) #17 0x00007fc083b07766 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x3f07766) #18 0x00007fc08162eb49 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x1a2eb49) #19 0x00007fc0812a2e68 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x16a2e68) #20 0x00007fc0812ad493 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x16ad493) #21 0x00007fc0812a3cfe llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x16a3cfe) #22 0x00007fc083040229 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x3440229) #23 0x00007fc083041947 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x3441947) #24 0x00007fc083041533 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::DenseMap<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x3441533) #25 0x00007fc083037aa7 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x3437aa7) #26 0x00007fc083036d23 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x3436d23) #27 0x00007fc080fb2898 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x13b2898) #28 0x00007fc081074508 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x1474508) #29 0x00007fc0810753c3 (/usr/lib/llvm/18/bin/../lib64/libLLVM.so.18.1+0x14753c3) #30 0x00007fc07f6a666e (/usr/lib64/libc.so.6+0x9c66e) #31 0x00007fc07f7244dc (/usr/lib64/libc.so.6+0x11a4dc) make[3]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.41/work/linux-6.6/scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 134 make[2]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.41/work/linux-6.6/Makefile:1145: vmlinux_o] Error 2 make[1]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.41/work/linux-6.6/Makefile:234: __sub-make] Error 2 make[1]: Leaving directory '/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.41/work/build' make: *** [Makefile:234: __sub-make] Error 2 * ERROR: sys-kernel/gentoo-kernel-6.6.41::gentoo failed (compile phase): * emake failed I noticed the revbumped versions has updated patch sets, like: https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-devel/llvm?id=e4f041a12d6b2862e04663e54e1cfbdeaf48aa67 so I installed llvm-18.1.8-r4 and gentoo-kernel-6.6.41 emerged just fine. I'd recommend stabilizing >llvm-18.1.8-r1.