Note how unsigned long is 32-bit on your platform and unsigned long long is 64-bit on your platform.
Please note that the option -nostdlib is equal to passing both -nostartfiles -nodefaultlibs. You will want to pass both flags in a kernel because you want neither the start files (crt0.o, crti.o, crtn.o) nor the C library, and then manually add -lgcc to the end of the link command.
sortie wrote:Note how unsigned long is 32-bit on your platform and unsigned long long is 64-bit on your platform.
Please note that the option -nostdlib is equal to passing both -nostartfiles -nodefaultlibs. You will want to pass both flags in a kernel because you want neither the start files (crt0.o, crti.o, crtn.o) nor the C library, and then manually add -lgcc to the end of the link command.
As far as i know on a cross compiler those flags are not needed. My kernel is working fine without it.