Use -gdwarf-3 by default, -gdwarf-4 if dwarf4=1 option is passed to make.

This commit is contained in:
Ruben Ayrapetyan
2014-07-25 13:51:35 +04:00
parent 1d42426fa4
commit 361e5a6f38
2 changed files with 19 additions and 0 deletions
+13
View File
@@ -41,6 +41,13 @@ endif
# Options setup
#
# DWARF version
ifeq ($(dwarf4),1)
OPTION_DWARF4 := enable
else
OPTION_DWARF4 := disable
endif
# JERRY_NDEBUG, debug symbols
ifeq ($(TARGET_MODE),release)
OPTION_NDEBUG = enable
@@ -94,6 +101,12 @@ LDFLAGS_NO_OPTIMIZE ?=
# Debug symbols
CFLAGS_DEBUG_SYMS ?= -g3
ifeq ($(OPTION_DWARF4),enable)
CFLAGS_DEBUG_SYMS += -gdwarf-4
else
CFLAGS_DEBUG_SYMS += -gdwarf-3
endif
# Cortex-M4 MCU
CFLAGS_CORTEXM4 ?= -mlittle-endian -mcpu=cortex-m4 -march=armv7e-m -mthumb \
-mfpu=fpv4-sp-d16 -mfloat-abi=hard