Compiling linux-kernel under OS X?

stefanus

Registered
I'm trying to compile a linux/i386 kernel under OS X 10.4.7 on my G5.
Does anyone know if this is possible? It would be very nice if someone did, as it takes my x86 box(an old 500 mhz Acer laptop) the good part of three hours to complete, modules and all.
 
The compilers in OSX would be setup towards compiling for Mac OS X. Instead of trying to muddle with compiler settings in your Mac system, you might be better off to boot the Mac into a Linux system, and use that to compile your program. Thus, less setting up.

However, it probably wouldn't be that much faster. A lot of the time taken during compiling is for disk access, for files needed during the compile. And three hours to compile a Linux kernel is not at all unusual.
 
You will need a cross-toolchain (compiler, linker, etc), hosted on OS X and targetting Linux. I was able to find a pre-built one here but it might not suit your needs.

It is possible to build cross-toolchain from source but I don't know how painful that is on OS X.

Peace...
 
Slightly off-topic: I was compiling a kernel on my old 200 MHz machine and it took half the night. On my new Athlon64 bit it took all of 9 minutes.
 
Back
Top