Can Linux kernel be compiled with
gcc configured for Linux executables (not bare metal)? I have noticed that Buildroot builds cross-compiler
arm-linux-gnueabi to compile everything and became curious.
Or am I wrong and it builds bare-metal cross-compiler too?
Yes, a Linux compiler can be considered as a "super-set" of a bare-metal compiler: it can compile both Linux userspace applications, and bare-metal applications (the Linux kernel, bootloaders, etc.).