Config.in 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. config BR2_PACKAGE_LIBUNWIND_MUSL_CONTEXT_REQUIRED
  2. bool
  3. default y
  4. depends on !BR2_ARM_CPU_HAS_ARM
  5. depends on !BR2_aarch64
  6. depends on !BR2_aarch64_be
  7. depends on !BR2_mips
  8. depends on !BR2_mipsel
  9. depends on !BR2_mips64
  10. depends on !BR2_mips64el
  11. depends on !BR2_riscv
  12. depends on !BR2_x86_64
  13. depends on BR2_TOOLCHAIN_USES_MUSL
  14. # libunwind is only available for a certain subset of the
  15. # architectures (as visible in the list of architectures supported
  16. # with the glibc C library below).
  17. #
  18. # In addition to this, on some architectures libunwind requires the
  19. # *context() function from the C library, which are only available on
  20. # certain architectures in uClibc, and not available at all on
  21. # musl. But on some other architectures, libunwind works without using
  22. # the *context() functions, which allows it to be built with musl.
  23. config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
  24. bool
  25. default y if BR2_TOOLCHAIN_USES_GLIBC && \
  26. (BR2_ARM_CPU_HAS_ARM || BR2_aarch64 || BR2_mips || BR2_mipsel || \
  27. BR2_mips64 || BR2_mips64el || BR2_powerpc || BR2_sh || \
  28. BR2_i386 || BR2_x86_64)
  29. default y if BR2_TOOLCHAIN_USES_UCLIBC && \
  30. (BR2_ARM_CPU_HAS_ARM || BR2_mips || BR2_mipsel || \
  31. BR2_mips64 || BR2_mips64el || BR2_x86_64)
  32. default y if BR2_TOOLCHAIN_USES_MUSL && \
  33. (!BR2_PACKAGE_LIBUNWIND_MUSL_CONTEXT_REQUIRED || \
  34. BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS)
  35. config BR2_PACKAGE_LIBUNWIND
  36. bool "libunwind"
  37. depends on BR2_TOOLCHAIN_HAS_THREADS
  38. depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
  39. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11 atomics
  40. # forcefully links against libgcc_s, only available in dynamic
  41. # linking configurations
  42. depends on !BR2_STATIC_LIBS
  43. select BR2_PACKAGE_LIBUCONTEXT if BR2_TOOLCHAIN_USES_MUSL && \
  44. BR2_PACKAGE_LIBUNWIND_MUSL_CONTEXT_REQUIRED
  45. help
  46. C API to determine the call-chain of a program.
  47. http://www.nongnu.org/libunwind/index.html
  48. comment "libunwind needs a toolchain w/ threads, dynamic library, gcc >= 4.9"
  49. depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
  50. depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
  51. !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9