app-emulation/virtualbox-modules-6.1.28 fails to build for a kernel built with clang + thinlto. Relevant log lines: F: open_wr S: deny P: .thinlto-cache/Thin-61a81f.tmp.o A: /usr/src/linux-5.14.6-zen/.thinlto-cache/Thin-61a81f.tmp.o R: /usr/src/linux-5.14.6-zen/.thinlto-cache/Thin-61a81f.tmp.o C: ld.lld -m elf_x86_64 -plugin-opt=-stack-alignment=8 --thinlto-cache-dir=.thinlto-cache -mllvm -import-instr-limit=5 -plugin-opt=-warn-stack-size=2048 -r -o / tmp/portage/app-emulation/virtualbox-modules-6.1.28/work/vboxdrv/vboxdrv.lto.o --whole-archive /tmp/portage/app-emulation/virtualbox-modules-6.1.28/work/vboxdrv /vboxdrv.o The fix required to make it work (although experimental and untested) is very similar to the one committed by Ionen Wolkens: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cca413557e341beaa8f9289915e175e6d51d752
Tested this locally and had no runtime issues so far, I can make a pull request if wanted.
gentle ping
I can confirm the PR linked works for a clang build and has no issues re any VM management. Could this be merged @polynomial-c? Thanks
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89a9a25472de8699172e54b67d6c8dd3b8ddeca5 commit 89a9a25472de8699172e54b67d6c8dd3b8ddeca5 Author: Michael Egger <egger.m@protonmail.com> AuthorDate: 2021-11-27 11:20:18 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2022-01-17 10:47:08 +0000 app-emulation/virtualbox-modules: add basic clang+thinlto kernel support To use this there's no need to do anything beside having a kernel built with clang+(thin)lto (normally through LLVM=1 LLVM_IAS=1). Closes: https://bugs.gentoo.org/820536 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Michael Egger <egger.m@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/23095 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> .../virtualbox-modules-6.1.30-r1.ebuild | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+)