C++: Fix vtable with libstdc++
__cxxabiv1 is an internal namespace used by GNU's libstdc++. When linking with C++ standard library (libstdc++), __cxxabiv1::__class_type_info is already defined inside. If user code contains virtual classes, __cxxabiv1::__class_type_info is defined twice. Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
This commit is contained in:
parent
0fe7a9864a
commit
16451850e7
|
@ -14,6 +14,7 @@
|
|||
* @brief basic virtual tables required for classes to build
|
||||
*
|
||||
*/
|
||||
#if !defined(CONFIG_LIB_CPLUSPLUS)
|
||||
|
||||
namespace __cxxabiv1 {
|
||||
class __class_type_info {
|
||||
|
@ -25,3 +26,4 @@ namespace __cxxabiv1 {
|
|||
void __class_type_info::dummy() { } // causes the vtable to get created here
|
||||
void __si_class_type_info::dummy() { } // causes the vtable to get created here
|
||||
};
|
||||
#endif // !defined(CONFIG_LIB_CPLUSPLUS)
|
||||
|
|
Loading…
Reference in a new issue