5

Is it possible to compile native GCC for ARM (host == target == ARM) using Code Sourcery G++? If it is not possible, could I use crosstool-NG to build the cross-compile and then using this one for compiling the native ARM GCC?

Thank you,


Edit: as to why: I'm creating my own distro for beagleboard...

snakile
  • 52,936
  • 62
  • 169
  • 241
Carlo
  • 51
  • 2
  • I've got to ask, why would you want to run GCC on ARM? – BCS Oct 27 '10 at 01:42
  • You may have better luck on chiphacker.com (uC SO). I do think it will be terribly slow though. The compilation on an ARM host would be unbearably slow IMO. – leppie Oct 27 '10 at 08:05

3 Answers3

2

CodeSourcery provides prebuilt toolchains only for Linux/x86 and Windows (see "Host System Requirements" here). If you want a native ARM-hosted toolchain, you should be able to build one using a cross-compiler. If you want a prebuilt one, you can try some of the existing ARM distros such as Debian-arm, or Aboriginal Linux (it's made to be run in QEMU but you can probably extract the compiler from it and run natively).

Igor Skochinsky
  • 24,629
  • 2
  • 72
  • 109
1

Tiny C Compiler runs decently natively on the kindle 3. Find it on the mobileread forums compiled for native use.

Code sourcery toolchain works for simple comilation via "arm-none-linux-gnueabi-gcc foo.c" IIRC with no effort. creating native arms. Crosstools-ng as well but neither natively AIUI.

I looked into http://buildroot.uclibc.org/downloads/manual/manual.html#_about_buildroot for a more comprehensive solution.

There are some options in there for what you require IIRC using x-compile to make the compiler but Crosstools is the more robust chain I had trouble with codesourcery doing true static build. HTH

Community
  • 1
  • 1
twobob
  • 354
  • 8
  • 22
-1

better off to use openembedded

plan9assembler
  • 2,862
  • 1
  • 24
  • 13
  • 1
    Yeah, but I prefer to start from scratch. If I want to understand something I think it's better to avoid automated tools (IMHO) – Carlo Oct 30 '10 at 12:27