RTEMS Linker  0.0.1
RTEMS Tools Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Building The RTEMS Linker

This package is written in C++ therefore you need a current working C++ compiler for your host. The GCC or clang compilers can be used and clang was used during the development. The build system is Waf.

  1. Clone the git repository:
    $ git clone http://git.rtems.org/chrisj/rtl-host.git rtl-host.git
  2. Configure with the default C++ compiler, default options, and an install prefix of $HOME/development/rtems/4.11:
    $ waf configure --prefix=$HOME/development/rtems/4.11
    With Waf you build in the source directory and the Waf script (wscript) will create a host specific directory. On MacOS the output is in build-darwin. If you clean the build tree by deleting this directly you will need to run the configure stage again.
    Note
    The nominal RTEMS prefix is /opt/rtems-4.11 where 4.11 is the version of RTEMS you are building the tools for. If you are using RTEMS 4.10 or a different version please use that version number. I always work under my home directory and under the development/rtems tree and then use the version number.
  3. Build the tools:
    $ waf
  4. Install the tools to the configured prefix:
    $ waf install

You will now have the tools contained in this package build and installed.

At this stage of the project's development there are no tests. I am wondering if this could be a suitable GSoC project.

To build with clang use the documented Waf method:

$ CC=clang waf configure --prefix=$HOME/development/rtems/4.11

You can add some extra options to Waf's configure to change the configuration. The options are:

--rtems-version=RTEMS_VERSION
Set the RTEMS version
--c-opts=C_OPTS Set build options, default: -O2.
--show-commands Print the commands as strings.
  • –rtems-version Set the RTEMS version number. Not used.
  • –c-opts Set the C and C++ compiler flags the tools are built with. For example to disable all optimization flags to allow better debugging do:
    $ waf configure --prefix=$HOME/development/rtems/4.11 --c-opts=
  • –show-commands Prints the command string used to the invoke the compiler or linker. Waf normally prints a summary type line.