When you obtain the following error during a link:

file.o: linking files compiled for 16-bit integers (-mshort) \
          and others for 32-bit integers
      

it means that you compiled or assembled one part of your project with 32-bit integers and another part with 16-bit integers. Since the ABI is different the linker complains. Such ABI incompatibility was not detected by release 1.x. This error detection will prevent you from strange execution errors like passing a 32-bit integer on the stack while expecting a 16-bit integer. The function will only see the high part only thus resulting in strange behavior. This error is now detected for your safety.

In general this is caused by the fact that you assembled some file with m6811-elf-as and you didn't pass the important -mshort flag to it. It is recommended to assemble with m6811-elf-gcc and pass the same flags as for a C or C++ compilation.

User Contributed Notes
triffid_hunter_at_NOSPAM.funkmunch.net
12-Feb-2006 11:02
#19
also useful is -mshort-double for as, -fshort-double for gcc. This flag prevents "file.o: linking files compiled for 32-bit doubles and others for 64-bit doubles"

I think I would faint if I saw the code gcc generates to do 64 bit operations on my 8 bit (with 16 bit extensions) 'hc11...