I am building an x86_64-elf kernel on OS X. My build system is autotools. I successfully compiled gcc to cross-compile for x86_64-elf on OS X. When I run the configure script generated from autotools I have an issue:
configure: error: C compiler cannot create executables
See `config.log' for more details
So I look at config.log and see:
cannot find crt0.o: No such file or directory
collect2: error: ld returned 1 exit status
This makes perfect sense. The cross-compiler won't generate an executable because there is no associated runtime. But I don't need or want my compiler to generate an executable, I'm going to link it appropriately for my bootloader. How do I tell autotools to not check this?
CCvariable in yourconfigure.acscript? It might not work however, as other tests may create executable files that the script tries to run. - Some programmer dude./configure --host=x86_64-unknown-linux. If the build type is different from the host type, certain tests may be skipped. - jørgensen