what is a cross compiler

recently i was been to an interview to an automotive company, they have posed me a question that what section of compiler must be changed if the target is changed.

ie,if ur compiler is meant for generating executable to a 8051 target what changes do you do to make it flexible to generate the executable even to AVR, will you change the preprocessor,or the assembler or the linker or what....how will u proceed?:wall:

From Wikipedia article on cross compilers:

ah yes, but preprocessor will not differ between platforms. it processes like #include and #ifdef ,etc. this is higher level.

It may be obvious that the assembler needs replaced. Yes, because the machine language is different. The linker too since it works on the binary formats.