The ebuild for v4l2loopback overrides CC, LD, and related environment variables to point at gcc (and related tools). This leads to compile time errors if the kernel used a different compiler (obvious example is clang, but a non-systemwide gcc may have the same issue).
Steps to Reproduce:
1. Build the kernel with CC=clang + LD=ld.lld
2. Invoke CC=clang LD=ld.lld emerge media-video/v4l2loopback
3. Observe error
The relevant section of the build log is:
warning: the compiler differs from the one used to build the kernel
The kernel was built by: clang version 13.0.1
You are using: x86_64-pc-linux-gnu-gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115
CC [M] /var/tmp/portage/media-video/v4l2loopback-0.12.5-r1/work/v4l2loopback-0.12.5/v4l2loopback.o
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-Qunused-arguments’
Package merges cleanly
The reason it can give the warning is because the built kernel sources record what compiler was used (and what options it was given). Instead of guessing, the ebuild should pull this information. It already does for the options to pass to the compiler, but not for the compiler executable itself.