OAR

RTEMS 4.0.0 On-Line Library


Installing EGCS AND NEWLIB

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

7.5: Installing EGCS AND NEWLIB

  1. Unarchive and patch and newlib-1.8.0.tar.gz following the instructions in Unarchiving the Tools. Apply the appropriate RTEMS specific patches as detailed in Apply RTEMS Patch to EGCS and Apply RTEMS Patch to newlib.

    NOTE: See Bug in Patch Utility.

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

    NOTE: See Bug in Patch Utility.

  3. Link the following directories from Newlib to the main EGCS directory, /source/egcs-1.1b/ :
  4. Change to the /build/egcs directory to configure the compiler:
    /source/egcs-1.1b/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 Running 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.
    make -k install
    

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-1998 OAR Corporation