CPPFLAGS += -DNDEBUG
endif
+# IDF uses some GNU extension from libc
+CPPFLAGS += -D_GNU_SOURCE
+
# Enable generation of debugging symbols
# (we generate even in Release mode, as this has no impact on final binary size.)
DEBUG_FLAGS ?= -ggdb
list(APPEND c_compile_options "-std=gnu99")
list(APPEND cxx_compile_options "-std=gnu++11" "-fno-rtti")
+ # IDF uses some GNU extension from libc
+ list(APPEND compile_definitions "_GNU_SOURCE")
+
if(CONFIG_CXX_EXCEPTIONS)
list(APPEND cxx_compile_options "-fexceptions")
else()