1 | .. SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. Copyright (C) 2012, 2016 Chris Johns <chrisj@rtems.org> |
---|
4 | |
---|
5 | Why Build from Source? |
---|
6 | ====================== |
---|
7 | |
---|
8 | The RTEMS Source Builder is not a replacement for the binary install systems |
---|
9 | you have with commercial operating systems or open source operating system |
---|
10 | distributions. Those products and distributions are critically important and |
---|
11 | are the base that allows the RSB to work. The RTEMS Source Builder sits |
---|
12 | somewhere between you manually entering the commands to build a tool set and a |
---|
13 | tool such as ``yum`` or ``apt-get`` to install binary packages made |
---|
14 | specifically for your host operating system. Building manually or installing a |
---|
15 | binary package from a remote repository are valid and real alternatives. The |
---|
16 | RSB provides the specific service of repeatably being able to build tool sets |
---|
17 | from source code. The process leaves you with the source code used to build |
---|
18 | the tools and the ability to rebuilt it. |
---|
19 | |
---|
20 | If you are developing a system or product that has a long shelf life or is used |
---|
21 | in a critical piece of infrastructure that has a long life cycle being able to |
---|
22 | build from source is important. It insulates the project from the fast ever |
---|
23 | changing world of the host development machines. If your tool set is binary and |
---|
24 | you have lost the ability to build it you have lost a degree of control and |
---|
25 | flexibility open source gives you. Fast moving host environments are |
---|
26 | fantastic. We have powerful multi-core computers with huge amounts of memory |
---|
27 | and state of the art operating systems to run on them however the product or |
---|
28 | project you are part of may need to be maintained well past the life time of |
---|
29 | these host. Being able to build from source an important and critical part of |
---|
30 | this process because you can move to a newer host and create an equivalent tool |
---|
31 | set. |
---|
32 | |
---|
33 | Building from source provides you with control over the configuration of the |
---|
34 | package you are building. If all or the most important dependent parts are |
---|
35 | built from source you limit the exposure to host variations. For example the |
---|
36 | GNU C compiler (gcc) currently uses a number of 3rd party libraries internally |
---|
37 | (gmp, mpfr, etc). If your validated compiler generating code for your target |
---|
38 | processor is dynamically linked against the host's version of these libraries |
---|
39 | any change in the host's configuration may effect you. The changes the host's |
---|
40 | package management system makes may be perfectly reasonable in relation to the |
---|
41 | distribution being managed however this may not extend to you and your |
---|
42 | tools. Building your tools from source and controlling the specific version of |
---|
43 | these dependent parts means you are not exposing yourself to unexpected and |
---|
44 | often difficult to resolve problems. On the other side you need to make sure |
---|
45 | your tools build and work with newer versions of the host operating |
---|
46 | system. Given the stability of standards based libraries like ``libc`` and ever |
---|
47 | improving support for standard header file locations this task is becoming |
---|
48 | easier. |
---|
49 | |
---|
50 | The RTEMS Source Builder is designed to be audited and incorporated into a |
---|
51 | project's verification and validation process. If your project is developing |
---|
52 | critical applications that needs to be traced from source to executable code in |
---|
53 | the target, you need to also consider the tools and how to track them. |
---|
54 | |
---|
55 | If your IT department maintains all your computers and you do not have suitable |
---|
56 | rights to install binary packages, building from source lets you create your |
---|
57 | own tool set that you install under your home directory. Avoiding installing |
---|
58 | any extra packages as a super user is always helpful in maintaining a secure |
---|
59 | computing environment. |
---|