The conftest.sh (in nvidia's usr/src/nv dir) is trying to determine valid kernel includes path by #including few header files from <linux/...>, but fails with userpriv feature, because it is running as user without read access to those headers (they are installed as root:root with 640 permission) - therefore the test compilation fails, as does the entire make process. Note that when running the exact make command manually in the correct dir inside PORTAGE_TMPDIR as root works just fine.
Created attachment 235089 [details] nvidia-drivers build log
This applies to all recent ebuilds, even those which worked with pre-2.6.33 kernels (I can't recall the exact ebuild version).
I don't believe any out of tree (kernel tree that is) kernel module ebuild works with userpriv. Have to double check though.
Actually that was dumb of me.... I use userpriv! Of course it works. However, I don't have a single kernel that doesn't have its sources without 644. That's how Portage installs them. I would double check how you install your kernels.
Actually, it seems to be the .config file that is being created with 640 permissions, probably due to my root's 027 umask. Thinking about it, this is probably out of scope for a package maintainer - it would have to be made world-readable in kernel Makefile, right after finishing "make (whatever)config".