mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/use_libc_gnu_extensions' into 'master'
build: Add a standard way to use GNU extensions from libc See merge request idf/esp-idf!4769
This commit is contained in:
commit
3bb7dba995
@ -427,6 +427,9 @@ ifdef CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED
|
|||||||
CPPFLAGS += -DNDEBUG
|
CPPFLAGS += -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# IDF uses some GNU extension from libc
|
||||||
|
CPPFLAGS += -D_GNU_SOURCE
|
||||||
|
|
||||||
# Enable generation of debugging symbols
|
# Enable generation of debugging symbols
|
||||||
# (we generate even in Release mode, as this has no impact on final binary size.)
|
# (we generate even in Release mode, as this has no impact on final binary size.)
|
||||||
DEBUG_FLAGS ?= -ggdb
|
DEBUG_FLAGS ?= -ggdb
|
||||||
|
@ -107,6 +107,9 @@ function(idf_set_global_compile_options)
|
|||||||
list(APPEND c_compile_options "-std=gnu99")
|
list(APPEND c_compile_options "-std=gnu99")
|
||||||
list(APPEND cxx_compile_options "-std=gnu++11" "-fno-rtti")
|
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)
|
if(CONFIG_CXX_EXCEPTIONS)
|
||||||
list(APPEND cxx_compile_options "-fexceptions")
|
list(APPEND cxx_compile_options "-fexceptions")
|
||||||
else()
|
else()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user