When I tried to compile my own Android ROM, I got the following error:

CHK     include/linux/version.h
target Executable: skia_gm (/media/ssd/buildout//target/product/i9100/obj/EXECUTABLES/skia_gm_intermediates/LINKED/skia_gm)
target Executable: skia_test (/media/ssd/buildout//target/product/i9100/obj/EXECUTABLES/skia_test_intermediates/LINKED/skia_test)
target Executable: test-opengl-configdump (/media/ssd/buildout//target/product/i9100/obj/EXECUTABLES/test-opengl-configdump_intermediates/LINKED/test-opengl-configdump)
CC      scripts/mod/empty.o
/bin/sh: 1: /home/ted/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: not found
make[4]: *** [scripts/mod/empty.o] Error 127
make[3]: *** [scripts/mod] Error 2
make[2]: *** [scripts] Error 2
make[2]: *** Waiting for unfinished jobs....

The problem was that the arm toolchain wasn’t installed. After installing the toolchain compiling succeeded.

Installing the toolchain can be done with the following command:
git clone https://android.googlesource.com/platform/prebuilt

After that, run the following command to add the toolchain to the PATH variable:
export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH

Compiling should now succeed without the previous error.

I’ve found this information on http://source.android.com/source/building-kernels.html, a very helpful information source for Android development.