external-toolchain.txt 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. Using an external toolchain
  2. ===========================
  3. [[external-toolchain]]
  4. Using an already existing toolchain is useful for different
  5. reasons:
  6. * you already have a toolchain that is known to work for your specific
  7. CPU
  8. * you want to speed up the Buildroot build process by skipping the
  9. long toolchain build part
  10. * the toolchain generation feature of Buildroot is not sufficiently
  11. flexible for you (for example if you need to generate a system with
  12. 'glibc' instead of 'uClibc')
  13. Buildroot supports using existing toolchains through a mechanism
  14. called 'external toolchain'. The external toolchain mechanism is
  15. enabled in the +Toolchain+ menu, by selecting +External toolchain+ in
  16. +Toolchain type+.
  17. Then, you have three solutions to use an external toolchain:
  18. * Use a predefined external toolchain profile, and let Buildroot
  19. download, extract and install the toolchain. Buildroot already knows
  20. about a few CodeSourcery toolchains for ARM, PowerPC, MIPS and
  21. SuperH. Just select the toolchain profile in +Toolchain+ through the
  22. available ones. This is definitely the easiest solution.
  23. * Use a predefined external toolchain profile, but instead of having
  24. Buildroot download and extract the toolchain, you can tell Buildroot
  25. where your toolchain is already installed on your system. Just
  26. select the toolchain profile in +Toolchain+ through the available
  27. ones, unselect +Download toolchain automatically+, and fill the
  28. +Toolchain path+ text entry with the path to your cross-compiling
  29. toolchain.
  30. * Use a completely custom external toolchain. This is particularly
  31. useful for toolchains generated using crosstool-NG. To do this,
  32. select the +Custom toolchain+ solution in the +Toolchain+ list. You
  33. need to fill the +Toolchain path+, +Toolchain prefix+ and +External
  34. toolchain C library+ options. Then, you have to tell Buildroot what
  35. your external toolchain supports. If your external toolchain uses
  36. the 'glibc' library, you only have to tell whether your toolchain
  37. supports C++ or not. If your external toolchain uses the 'uclibc'
  38. library, then you have to tell Buildroot if it supports largefile,
  39. IPv6, RPC, wide-char, locale, program invocation, threads and
  40. C++. At the beginning of the execution, Buildroot will tell you if
  41. the selected options do not match the toolchain configuration.
  42. Our external toolchain support has been tested with toolchains from
  43. CodeSourcery, toolchains generated by
  44. http://crosstool-ng.org[crosstool-NG], and toolchains generated by
  45. Buildroot itself. In general, all toolchains that support the
  46. 'sysroot' feature should work. If not, do not hesitate to contact the
  47. developers.
  48. We do not support toolchains from the
  49. http://www.denx.de/wiki/DULG/ELDK[ELDK] of Denx, for two reasons:
  50. * The ELDK does not contain a pure toolchain (i.e just the compiler,
  51. binutils, the C and C++ libraries), but a toolchain that comes with
  52. a very large set of pre-compiled libraries and programs. Therefore,
  53. Buildroot cannot import the 'sysroot' of the toolchain, as it would
  54. contain hundreds of megabytes of pre-compiled libraries that are
  55. normally built by Buildroot.
  56. * The ELDK toolchains have a completely non-standard custom mechanism
  57. to handle multiple library variants. Instead of using the standard
  58. GCC 'multilib' mechanism, the ARM ELDK uses different symbolic links
  59. to the compiler to differentiate between library variants (for ARM
  60. soft-float and ARM VFP), and the PowerPC ELDK compiler uses a
  61. +CROSS_COMPILE+ environment variable. This non-standard behaviour
  62. makes it difficult to support ELDK in Buildroot.
  63. We also do not support using the distribution toolchain (i.e the
  64. gcc/binutils/C library installed by your distribution) as the
  65. toolchain to build software for the target. This is because your
  66. distribution toolchain is not a "pure" toolchain (i.e only with the
  67. C/C++ library), so we cannot import it properly into the Buildroot
  68. build environment. So even if you are building a system for a x86 or
  69. x86_64 target, you have to generate a cross-compilation toolchain with
  70. Buildroot or crosstool-NG.