--- Quote Start ---
This will only work without MMU. And -O2 means optimize, it has nothing to do with what files are included.
--- Quote End ---
I have only worked on a version without MMU so I didn't knew that this wouldn't work. But good to know for the future.
Ah damn, you are right with the optimize flag 'O2'. I knew it was for optimization but I also thought it was for proper including the right header files. But one of the flags '-o' or '-O2' is sufficient.
But the reason why I couldn't include the asm/io.h was a failure in my own Makefile. The Makefile from the cgi_generic works.