I have searched around for a way to run a program meant for ARM processors on an Intel computer, but I can only find ways to do the reverse, to compile Intel programs for ARM. Are there any open-source cross-compilers that will allow me to do so? Thanks for your help.
-
What are you trying to do, specifically? Most languages that compile for ARM will compile to x86 too. Your troubles are more likely to be with platform-specific stuff. (ie. you have an Android or iOS app and you're trying to compile for Windows, and they use very different GUI concepts.) – Mason Wheeler Jun 02 '13 at 16:29
-
1Try an emulator? – James Jun 02 '13 at 18:17
1 Answers
Gcc can cross-compile programs for Intel targets from ARM hosts, but I'm not entirely sure that's what you meant to ask, because your terminology is off. Let me lay out some general principles, which should hopefully either answer your question or give you enough information to clarify your question.
There are several different things to consider about cross compiling:
- The host system. This is the system that the compiler itself is installed on.
- The target system. This is the system that the executable will run on. To fully specify it requires knowledge of a few different things:
- The architecture. ARM, x86, amd64, ppc, etc.
- The operating system. Android, iOS, Linux, OS X, Windows, etc.
- The libraries. Standard language libraries, GUI toolkits, etc. which also must be cross-compiled.
However, you also mention running a program designed for ARM on Intel, which isn't so much cross-compiling as porting. Those are two very different things. If you want to use your Intel machine to compile a program that will run on an Intel machine, that's porting, not cross-compiling.
Depending on how tightly the program is integrated with the operating system, architecture, and libraries, and how portable those were designed to be, this can be relatively easy or a complete nightmare. A C program that only uses standard in and out is relatively easy to port to another platform. Something tightly integrated with the platform, like Internet Explorer for example, is difficult enough to port that it's easier just to start from scratch.
If you clarify whether you actually meant cross-compiling or porting, and give more information on the operating systems and libraries involved, we might be able to help you in more depth.

- 146,727
- 38
- 279
- 479
-
My bad for my misuse of terminology. I meant porting, which may have been why I had troubles finding info on the Internet. I am trying to port a program written exclusively for ARM 6, and use the program on an x86 Windows computer. The source code is not open sourced, so I cannot find what libraries are involved. It runs on Debian – erdekhayser Jun 03 '13 at 01:29
-
Thank you, after clearing up cross-compiling and porting, a quick search was able to help find a working solution. Appreciate the help. – erdekhayser Jun 03 '13 at 01:39