Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is cross compiler?

Status
Not open for further replies.
Cross compiler is a compiler that builds executable files on one OS that are intended to run on a different OS.
For example: a compiler for Linux code that runs on a Windows system.
 

I know that "Eclipse" is a cross compiler.
While working with Windows OS - You can compile Linux targeted code on it.
 

I know that "Eclipse" is a cross compiler.
It's actually an IDE that can be presently used with different compilers, including cross compilers.
 

You mean that if we compile a C source code in windows, the executable file should work in Windows and Linux (let other platform).

Again no need to compile in Linux, right?

- - - Updated - - -

anybody there?
 

You mean that if we compile a C source code in windows, the executable file should work in Windows and Linux (let other platform).

Again no need to compile in Linux, right?

- - - Updated - - -

anybody there?

No. it cannot be.
 

There's not only Windows or Linux, Android, iOS there are also different processor targets like x86, ARM etc.

Many modern compilers like Microsoft Visual Studio are multiplatform + multitarget tools. That's a bit more than a classical cross compiler.
 

The Andriod SDK/Studio is a perfect example of a classic cross compiler. The Android SDK/Studio runs on a Windows platform, but compiles to a .apk that runs on an Android system. You have to run an Andriod emulator on the Windows machine to check the compiled apk as it does not run native on the Windows system.
 

A cross compiler is a compiler used for compiling codes on a host architecture which is to be used on a target of different architecture.

There are different processor architectures like intel x86, Arm, Mips, powerPc etc..

Compiled codes on a particular architecture generally does not work on another architecture, so a cross compiler which supports both host and target architecture is used to compile the code which is sent to the target.

If you are working on intel x86 pc, examples of cross compilers for arm are gcc-arm-linux, Armstrong. .etc


I hope this makes it a bit clear. .
 

assume that you are generating binary for 80x86 processor for pc using a compiler.

if you use a pc itself that compiler is self compiler.
if you use a Mac with a compiler to generate code for 80x86 , then that compiler used in Mac is cross compiler.
 

Eclipse is not a cross compiler its just an IDE.
:-D
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top