OAR

RTEMS 4.5.0 On-Line Library


Installing GCC AND NEWLIB

PREV UP next Bookshelf Getting Started with RTEMS for C/C++ Users

7.2.4: Installing GCC AND NEWLIB

  1. Unarchive and patch gcc-2.95.2.tar.gz and newlib-1.8.2.tar.gz following the instructions in Unarchiving the Tools. Apply the appropriate RTEMS specific patches as detailed in Applying RTEMS Patches.

    NOTE: See Bug in Patch Utility.

  2. Remove the following directories (we cannot use Fortran or Objective-C as Cygwin32 cross-compilers):
    /source/gcc-2.95.2/libf2c
    /source/gcc-2.95.2/gcc/objc
    /source/gcc-2.95.2/gcc/f
    

    NOTE: See Bug in Patch Utility.

  3. Link the following directories from Newlib to the main GCC directory, /source/gcc-2.95.2/ :
  4. Change to the /build/gcc directory to configure the compiler:
    /source/gcc-2.95.2/configure \
        --verbose --target=m68k-rtems \
        --prefix=/gcc-m68k --with-gnu-as --with-gnu-ld \
        --with-newlib
    

    Replace m68k-rtems with the target configuration of your choice. See Using the bit Script for a list of the targets available.

  5. Compile the toolset as follows:
    make cross
    

    You must do a make cross (not a simple make) to insure that the different packages are built in the correct order. Making the compiler can take several hours even on fairly fast machines, beware.

  6. Install with the following command:
    make -k install
    
  7. Just as with binutils package, a problem with the gnu info package not building correctly requires that you use -k to keep going.

With any luck, at this point you having a working cross-compiler. So as Geoffroy said:

That's it! Celebrate!


PREV UP next Bookshelf Getting Started with RTEMS for C/C++ Users

Copyright © 1988-2000 OAR Corporation