Loading ...
Sorry, an error occurred while loading the content.

5149new effort, was Re: [gnuarm] Re: Project Status

Expand Messages
  • Dave McGuire
    Mar 9, 2012
    • 0 Attachment
      On 03/09/2012 02:17 PM, marcoiks wrote:
      > I think it's a worthwhile effort! Is there anything we can do to
      > learn how to build the toolchain? I'd love to help but I too am new
      > at this.
      >
      > Does anyone have any good information on how to compile, build and
      > package the toolchain?
      ...
      > How about using the website to try to "Recruit" someone with more
      > knowledge that's willing to teach me or someone else in the group?
      >
      > I dont know maybe advertise that "we" (the group) needs help?

      I finally got tired of all the GCC cross-compiler distributions that
      were floating around because I didn't like any of them for one reason or
      another. I ended up embarking on the very time-consuming project of
      writing my own build system, and I'm using that internally here.

      One problem I had with the packaged GCC cross compilers was the lack
      of support for other architectures. I develop for several different
      (GCC-supported) architectures, and I got to the point where I had three
      or four completely different GCC toolchains installed on my development
      machines. They were made up of different releases of the software (GCC,
      binutils, newlib, etc) installed in different places, and everything was
      basically a huge mess. I hated it.

      So now I have a single build script that compiles everything in one
      shot, in the proper sequence, and installs it in one place. This was
      much more difficult to achieve than I'd initially thought it'd be, but I
      finally got it to where it needs to be. The supported targets are:

      arm-elf
      avr
      i386-elf
      m68k-elf
      ppc-elf
      sparc-elf

      All of the above use newlib, except AVR which uses avrlibc. It
      currently uses GCC v4.4.6, binutils v2.19.1, newlib v1.19.0, avrlibc
      v1.7.1, and gdb v7.1. C and C++ compilers are built. I really want
      FORTRAN as well (just because!), but there's a difficult bug in GCC's
      FORTRAN support which prevents it from being built in a
      cross-compilation environment.

      It's written to run under Linux, but has also been tested (but those
      tests are out of date) on MacOS X and Solaris.

      You basically run the script with command line parameters to tell it
      what architecture to build for, and directory prefix of where to put the
      resulting cross compiler, and when it's done, you have a cross compiler
      for that architecture, ready to go. On my system, I use a directory
      prefix of "/usr/local/gcc-cross", so I have:

      buffet$ ls /usr/local/gcc-cross
      arm-elf/ avr/ i386-elf/ m68k-elf/ ppc-elf/ sparc-elf/
      buffet$

      I add /usr/local/gcc-cross/<architecture>/bin to my path, and then I
      automatically have arm-elf-gcc, avr-gcc, etc toolchains available.
      Nice, clean, and consistent.

      I have been using cross compilers built with this setup for the past
      year or so, for both home and work projects, for both ARM7 and AVR
      targets with great success. The other listed targets work and generate
      code, but haven't been thoroughly tested.

      I had not originally intended to release this to the public, as it
      was done for my own use, but seeing the sorry state of all the
      toolchains out there (most of which look like they were put together by
      embedded systems/hardware guys as an afterthought, not by a software guy
      on a mission...I'm lucky to be both!), and the falling into
      dismaintenance of the (otherwise decent) GNUARM distribution, perhaps
      it's time for me to consider releasing it.

      -Dave

      --
      Dave McGuire, AK4HZ
      New Kensington, PA
    • Show all 10 messages in this topic