Missing elf.h on Windows
Problem: When building a recent Linux kernel on Cygwin, compilation fails because of a missing elf.h file:
$ make ARCH=i386 CROSS_COMPILE=i686-linux- >> CHK include/linux/version.h >> SPLIT include/linux/autoconf.h -> include/config/* >> HOSTCC scripts/basic/fixdep >> HOSTCC scripts/basic/split-include >> HOSTCC scripts/basic/docproc >> HOSTCC scripts/mod/mk_elfconfig >> scripts/mod/mk_elfconfig.c:4:17: elf.h: \ No such file or directory
Cause: Versions of Cygwin earlier than 1.5.19 do not include the elf.h file necessary for building recent Linux kernels.
Solution: Add the attached elf.h file to /usr/include. You will need to remove the .txt extension from the file name.