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