aboutsummaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorGravatar Max Filippov <jcmvbkbc@gmail.com>2019-01-25 15:34:52 -0800
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-02-04 21:53:20 +0100
commit306f507f9d8655356598de7546b74a3c32cc1935 (patch)
tree3428516a344094633d6d28023192123c8a15c225 /toolchain
parent9fb17ea7ff6373f250d5ff5e6c9afe8a456901af (diff)
downloadbuildroot-306f507f9d8655356598de7546b74a3c32cc1935.tar.gz
buildroot-306f507f9d8655356598de7546b74a3c32cc1935.tar.bz2
toolchain: add variadic MI thunk support flag
GCC uses thunk functions to adjust the 'this' pointer when calling C++ member functions in classes derived with multiple inheritance. Generation of thunk functions requires support from the compiler back end. In the absence of that support target-independent code in the C++ front end is used to generate thunk functions, but it does not support vararg functions. Support for this feature is currently missing in or1k and xtensa toolchains. Add hidden option BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK that indicates presence of this feature in the toolchain. Add dependency to packages that require this feature to be built. Fixes: http://autobuild.buildroot.net/results/c9e660c764edbd7cf0ae54ab0f0f412464721446/ http://autobuild.buildroot.net/results/9a3bf4b411c418ea78d59e35d23ba865dd453890/ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Config.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 275f9f9cdd..bcbc3cf984 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -100,6 +100,19 @@ config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on !BR2_sparc_v8
depends on !BR2_m68k_cf5208
+# GCC uses thunk functions to adjust the 'this' pointer when calling
+# C++ member functions in classes derived with multiple inheritance.
+# Generation of thunk functions requires support from the compiler
+# back end. In the absence of that support target-independent code
+# in the C++ front end is used to generate thunk functions, but it
+# does not support vararg functions.
+# or1k will support it in the gcc mainline starting with gcc-9.
+config BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
+ bool
+ default y
+ depends on !BR2_or1k
+ depends on !BR2_xtensa
+
# Prior to gcc 7.x, exception_ptr, nested_exception and future from
# libstdc++ would only be provided on architectures that support
# always lock-free atomic ints. See