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