2

Has anyone successfully added gfortran to a Codesourcery lite for ARM build? If not how do you properly work around this with f2c to compile fortran code with codesourcery?

corbin
  • 1,446
  • 2
  • 27
  • 40

1 Answers1

0

The CodeSourcery tools come with a file that shows the commands used to build them. It's not exactly a build script -- you can really only use it for reference -- but you should be able to rebuild the compiler with Fortran support if you try hard enough.

Obviously, CodeSourcery won't have tested Fortran much, so if it is broken somehow, you're on your own.

If you're targeting ARMv7-A, you might find the Linaro compilers more effective: http://releases.linaro.org/12.02/components/toolchain/binaries/

Linaro also have specific Android tools, of course.

ams
  • 24,923
  • 4
  • 54
  • 75
  • i see the android specific tools. that is interesting. looks like it supports fortran by default. looks like it supports armv7-a by default too. do you know if you can tell it to target armv5? – corbin Mar 08 '12 at 00:55
  • just grabbed it, looks like i have to rebuild to support fortran. the prebuilt binary does not. – corbin Mar 08 '12 at 01:12
  • The prebuilt binary does not support ARMv5. You can get the compiler to generate code for v5, but the prebuilt libraries will be v7a, so a linked program won't work. – ams Mar 08 '12 at 13:29