Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcc ON arm/android

I just got a EEE pad transformer. Like any hardware I own I'd like to have a C compiler on it. I know I can cross compile, but I'd like to do development ON the device itself. I've searched google and all I can seem to find are pages on how to build an arm toolchain for x86/64 Linux. Thoughts?

like image 759
Tim Avatar asked Jun 17 '11 02:06

Tim


People also ask

Does GCC work on ARM?

If you are happy to compile from source, any recent version of GCC can be built natively on an ARM device, targeting that ARM device.

Does Android have GCC?

C4droid is a user-friendly (but powerful) C/C++ IDE + C/C++ compiler for Android. Customizable GUI, choose where to place tabs and buttons by yourself, themes are also supported.

Can you compile x86 on ARM?

As x86 is currently the industry standard for server hardware and ARM is just starting to gain popularity, nearly all binaries are only compiled for x86 and can't be used on ARM natively.

What is ARM Linux Gnueabi GCC?

For your question, arm-none-linux-gnueabi and arm-linux-gnueabi is same thing. arm-linux-gcc is actually binary for gcc which produces objects for ARM architecture to be run on Linux with default configuration (abi) provided by toolchain.


2 Answers

The process of building gcc (et al.) to run on your target should be similar to building a cross-compiler, excepting that you will:

  • need to have an ARM cross compiler that runs on your, for example, x86 machine. So the results of your googleing are still useful.
  • use the --host option to specify your ARM platform when running configure for all of the parts of your toolchain.
like image 86
Andrew Edgecombe Avatar answered Sep 30 '22 16:09

Andrew Edgecombe


Since you asked about this in June, 2011, (or maybe starting right around that same time) there's something that does EXACTLY what you want called "Terminal-IDE." This is a much better answer than the one you checked off as correct because it doesn't rely upon cross-compilation as the checked answer does.

Terminal-IDE is an Integrated Development Environment that runs ON your Android device (just as you asked about), and has both a C compiler and Java (of course).

There's a Terminal-IDE web site with a more in-depth description and links to other resources.

NOTE: Since I wrote this reply, the author of Terminal-IDE has stopped supporting it. Please don't down-vote me because of that!

like image 41
Richard T Avatar answered Sep 30 '22 16:09

Richard T