I compiled gcc-4.6.1 with these options: `./configure --target=i586-elf --prefix=/usr/local/cross --disable-nls --enable-languages=c --without-headers`, and it seems to know what the target should be:
Code: Select all
configure:2316: checking target system type
configure:2329: result: i586-pc-elf
I compile and link my kernel by adding /usr/local/cross/bin to my path, and then using i586-elf-gcc and i586-elf-ld like I would use gcc/ld normally: `i586-elf-gcc -m32 -o out.o -c in.c -Wall -nostdlib -nostartfiles -nodefaultlibs` and `i586-elf-ld -T link.ld -melf_i386 -o kernel.bin out.o`
Is this how a cross-compiler should be working, or did I do something wrong?
Oh, and the host system I'm using is Arch Linux. Any help is much appreciated