Changing the build tools

Steven Johnson sjohnson at
Fri Mar 10 23:32:13 UTC 2006


I think you mis-understand, my problem Isn't with building the tools,
its with building RTEMS, i will elaborate.

I have already properly re-built the toolchains.  I use
--prefix=/opt/rtems-4.6-2 when running ./configure on GCC for example. 
All of the tools, Newlib, GCC, GDB and Binutils are installed correctly
in /opt/rtems-4.6-2 and they have been tested and operate correctly from
there.  There was no problem for me doing this, ive built GCC and
friends more times than i care to remember.

My problem relates to the building of RTEMS itself. The ./configure and
make process of RTEMS V4.6.5 looks for its build tools (for whatever
processor it is being built for) in /opt/rtems-4.6/bin by default,
rather than by using the tools it can find on the $PATH, which
./configure and make normally do.  However, I now have new tools in
/opt/rtems-4.6-2 that i would prefer the RTEMS build to look for and
use, rather than the ones at /opt/rtems-4.6 (which I would still like to
keep there so i can switch back and forth between different projects).

I know RTEMS can be built successfully with my new tools, because i
moved /opt/rtems-4.6 away, and made a symbolic link of rtems-4.6 to the
rtems-4.6-2 directory containing my version of the build tools.  This
enabled me to progress and build RTEMS with my new tools, however this
approach is suboptimal, and what i really want to do is something like:

./configure --find-the-build-tools-here=/opt/rtems-4.6-2
export FIND_THE_BUILD_TOOLS_HERE=/opt/rtems-4.6-2

So what I'm after is a way to over-ride the path the RTEMS ./configure
and make scripts use to actually find the build tools.  If it means I
have to patch one (or more) of the files used to manage the build
process, i can live with that, although the ideal would be an option or
variable set which i can pass on the command line.


Ralf Corsepius wrote:

>On Fri, 2006-03-10 at 23:20 +1100, Steven Johnson wrote:
>>When I build rtems 4.6.5 using the provided configure and make system,
>>it automatically finds and uses my tools installed by the standard rpm's
>>in /opt/rtems-4.6
>>I have rebuilt the tools, but I have installed them in /opt/rtems-4.6-2,
>>so both can co-exist (tools as shipped, and my custom built ones)
>How did you do this?
>One proper way is to configure these toolchains with different prefixes
>i.e. to pass different to --prefix=PREFIX when building the tools.
>In general, copying the tools from one installation prefix to another
>doesn't work (More accurately, depends on various details inside of GCC
>and binutils).
>>Is there anything I can pass to either ./configure or make to force it
>>to look for and use the tools in /opt/rtems-4.6-2 rather than the
>>default /opt/rtems-4.6.  Ive tried to work it out, but cant see how to
>>do it.
>Passing different "--prefix=PREFIX" and switching PATHS at run time is
>one approach.
>Another approach would be to use different --target=CPU-rtemsxxx when
>configuring the toolchains. E.g. I had used --target=CPU-rtems for my
>local toolchain and --target=CPU-rtems4.6 for a longer time. 
>Instead of switching $PATH, you'd then configuring rtems for these
>different targets would switch between these toolchains.
>Yet another approach would be to apply --program-prefix when configuring
>the toolchains, however RTEMS doesn't support this approach.

More information about the users mailing list