Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 820536 - app-emulation/virtualbox-modules - add basic clang+thinlto kernel support
Summary: app-emulation/virtualbox-modules - add basic clang+thinlto kernel support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-10-27 16:02 UTC by Michael Egger
Modified: 2022-01-17 10:47 UTC (History)
2 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 Michael Egger 2021-10-27 16:02:16 UTC
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
Comment 1 Michael Egger 2021-10-29 09:33:53 UTC
Tested this locally and had no runtime issues so far, I can make a pull request if wanted.
Comment 2 Michael Egger 2021-12-15 15:32:26 UTC
gentle ping
Comment 3 James Beddek 2022-01-17 10:39:37 UTC
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
Comment 4 Larry the Git Cow gentoo-dev 2022-01-17 10:47:14 UTC
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(+)