external-toolchain.txt 4.0 KB

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