It's getting unaffordable to develop Linux
I am afraid it has always been.
32GB RAM is common on kernel devs desktops.
And yet some of them started encountering ooms when building their allyesconfig-ed kernel.
Lucky you… who are apparently not allyesconfig-ing… you should not need more than 32G… ;-)
On a side note, reading CONFIG_HAVE_OBJTOOL=y
as part of your .config file, you might take some benefits from the patches submitted as part of the discussion linked hereabove.
Does anyone have a freaking clue on why the compilation eats up so
much RAM?
You are probably the only one who could precisely tell. (after considering the size of the miscellaneous *.o files you might be able to find in each top level directory of the kernel source distribution (since compilation was achieved successfuly))
From the information you provide (the kernel.config file) I can only venture a priori :
A/ every component of your kernel will be statically linked :
(since I notice that all your selected OPTION_* are marked "=y")
There is nothing wrong with this per se since there can be many good reasons for building everything in-kernel but this will definitely significantly increase the RAM needed when linking all this together.
=> You probably should consider building kernel parts as modules wherever possible.
B/ a good amount of CONFIG_DEBUG appear set.
Once again there is nothing wrong with that per se however it is likely to increase significantly the RAM needed to link the different parts, not to say even more since it implies CONFIG_KALLSYMS_*=y
On a side note, considering the debugging feature selected, in addition to CONFIG_HZ_100=y I would assume that you are not searching for best possible latencies / performances.
=> I would then consider the opportunity to prefer CONFIG_CC_OPTIMIZE_FOR_SIZE