What is a compiler toolchain
Cross compilers play an important role, especially in the embedded environment. The target systems are usually too small to support a native development environment. The main reasons for this are economic: Every component that is not required for operation causes unnecessary costs. Those who produce high quantities literally have to count on every tenth of a cent and skimp on material wherever possible.
Individual software packages such as gcc or binutils can be induced with simple means to generate code for a different computer architecture. The pivotal point is the configuration script configureto whom you have to explain what you want before translating. The options are used for this --build, --host and --target.
The former divides configure with what kind of system the translation takes place on; however, the script is often able to figure that out for itself. With --host =
However, that is not the end of it. A complete development environment includes a compiler, assembler and linker (the latter are included in the package binutils included) also debugging tools, the runtime library libc and possibly other libraries along with the associated header files. In Linux, the header files of the kernel for the target machine are also required for compilation. If you want to test the developed software, you also need the translated kernel.
Dependencies between the individual packages make setting up a complete toolchain a tedious task. On the one hand, it is important to adhere to the correct order when translating - some packages even have to be repeated several times with different ones configure- Translate options. On the other hand, the user has to take into account the characteristics of the target platform and possibly install additional patches.
More or less complete recipes for individual platforms can be found on the Internet, for example in the relevant developer forums. However, if you want to get there quickly, you should consider using a pre-made baking mix: crosstool-NG by Yann Morin. Apart from the required source code packages, it contains all the important ingredients for a number of different systems, including proven configurations for Linux on Alpha, ARM, Itanium, Mips, PowerPC, x86 and x86_64 platforms as well as bare metal Systems with ARM or Mips processors. As a runtime library, glibc, µClibc or the comparatively young one eglibc (Embedded Glibc) can be used. A detailed list of the tested toolchains can be found on the project homepage (see box "Online sources"). Further target platforms and operating systems are to follow. Linux, Mac OS X and Windows / Cygwin are suitable as development systems (host).
Whoever wants can crosstool-NG Install like any other software package. However, it can also be used without installation, if you do it before translating ./configure with the option --local and later the program in the same directory with the command ./ct-ng starts.
Toolchains à la carte
Similar to the Linux kernel, the user can use a new configuration ct-ng menuconfig create menu-driven or with ct-ng oldconfig Take over from an existing configuration file. Alternatively, he can use ct-ng
For test purposes, the compilation process can be stopped or continued at certain points by setting the environment variables STOP and RESTART puts. Their values must correspond to the name of one of the translation phases. With ct-ng STOP = binutils about holds ct-ng after translating the binutils at, ct-ng RESTART = binutils skips all previous steps. The list of "breakpoints" depends on the selected configuration and can be opened with ct-ng list-steps ask.
- Is Tidal Music Quality Snake Oil
- Compare professional athletes with actors
- What does neemoel do for the skin
- What's your calming ritual
- How can I change my sleep schedule?
- Is it possible to come to someone's mind
- Which foods can make you healthier?
- What do Martians look like
- What are the different ideas for stands
- Is Kubernetes a container
- What is the drug Bethanechol used for?
- What is chaos phenomenologically
- Is there such a thing as Quora for politics?
- What are the best textbooks on neuropsychology
- How does mental health affect your personality?
- What does gooseberry mean
- Why is my Barclaycard rejected?
- Do you love who you are with
- Helps swimming with mindfulness meditation
- How can we easily learn pointers
- What is blockchain trading
- What is the full story of Motorola
- How do you deal with annoying people
- How does Yipit want to make money