mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
C++: prepare RTTI support
Ref. https://github.com/espressif/esp-idf/issues/1684 Also, for full RTTI support, libstdc++.a in the toolchain should be built in both with RTTI and w/o RTTI options. Multilib with -fno-rtti flag is used for that. Note that this commit does not actually enable RTTI support. The respective Kconfig option is hidden, and will be made visible when the toolchain is updated.
This commit is contained in:
@@ -452,7 +452,6 @@ CXXFLAGS ?=
|
||||
EXTRA_CXXFLAGS ?=
|
||||
CXXFLAGS := $(strip \
|
||||
-std=gnu++11 \
|
||||
-fno-rtti \
|
||||
$(OPTIMIZATION_FLAGS) $(DEBUG_FLAGS) \
|
||||
$(COMMON_FLAGS) \
|
||||
$(COMMON_WARNING_FLAGS) \
|
||||
@@ -465,6 +464,13 @@ else
|
||||
CXXFLAGS += -fno-exceptions
|
||||
endif
|
||||
|
||||
ifdef CONFIG_COMPILER_CXX_RTTI
|
||||
CXXFLAGS += -frtti
|
||||
else
|
||||
CXXFLAGS += -fno-rtti
|
||||
LDFLAGS += -fno-rtti
|
||||
endif
|
||||
|
||||
ARFLAGS := cru
|
||||
|
||||
export CFLAGS CPPFLAGS CXXFLAGS ARFLAGS
|
||||
|
Reference in New Issue
Block a user