1

Could someone explain, what is the precise definition of cross compilation. I am asking this because.

  • When a program is compiled to a different platform (operating system) other than the host platform on which the code is compiled, many refer to this as cross compilation.

Eg : Compiling for Linux arm on Windows.

  • On the other hand, If you compile a program on Linux desktop ( i386 architecture ) to be run on Linux arm (ARM architecture). Does this process can be called as cross compilation ?

Thank you.

2

1 Answer 1

4

The term platform includes all the details regarding the computer on which the program is compiled or/and run. This means stuff like:

  • CPU: instruction set (x86, x86_64, ARM), endianess (big endian, littel endian)
  • compiler: language (e.g. C90, C99, C11), vendor (GCC, LLVM)
  • libraries, for example glibc and BSD libc, malloc and jemalloc
  • operating system

When the platform on which the program is compiled is different than the one on which it is run, you're dealing with cross compilation. In your specific case the CPU is different.

2
  • Thanks for the descriptive answer. This answers my question. Jun 20, 2014 at 21:07
  • 1
    @VijayRajanna, then please select it as accepted. Jun 20, 2014 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.