Use -gdwarf-3 by default, -gdwarf-4 if dwarf4=1 option is passed to make.
This commit is contained in:
@@ -33,6 +33,10 @@
|
|||||||
#
|
#
|
||||||
# Unit test target: unittests
|
# Unit test target: unittests
|
||||||
#
|
#
|
||||||
|
# Options
|
||||||
|
#
|
||||||
|
# dwarf4=1 - use DWARF v4 format for debug information
|
||||||
|
#
|
||||||
|
|
||||||
export TARGET_MODES = debug debug_release release
|
export TARGET_MODES = debug debug_release release
|
||||||
export TARGET_PC_SYSTEMS = linux
|
export TARGET_PC_SYSTEMS = linux
|
||||||
@@ -48,6 +52,8 @@ export FLASH_TARGETS = $(foreach __TARGET,$(foreach __MODE,$(TARGET_MODES),$(for
|
|||||||
export OUT_DIR = ./out
|
export OUT_DIR = ./out
|
||||||
export UNITTESTS_SRC_DIR = ./tests/unit
|
export UNITTESTS_SRC_DIR = ./tests/unit
|
||||||
|
|
||||||
|
export dwarf4
|
||||||
|
|
||||||
all: clean $(JERRY_TARGETS) $(TESTS_TARGET) $(CHECK_TARGETS)
|
all: clean $(JERRY_TARGETS) $(TESTS_TARGET) $(CHECK_TARGETS)
|
||||||
|
|
||||||
$(JERRY_TARGETS) $(TESTS_TARGET) $(FLASH_TARGETS) $(CHECK_TARGETS):
|
$(JERRY_TARGETS) $(TESTS_TARGET) $(FLASH_TARGETS) $(CHECK_TARGETS):
|
||||||
|
|||||||
@@ -41,6 +41,13 @@ endif
|
|||||||
# Options setup
|
# Options setup
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# DWARF version
|
||||||
|
ifeq ($(dwarf4),1)
|
||||||
|
OPTION_DWARF4 := enable
|
||||||
|
else
|
||||||
|
OPTION_DWARF4 := disable
|
||||||
|
endif
|
||||||
|
|
||||||
# JERRY_NDEBUG, debug symbols
|
# JERRY_NDEBUG, debug symbols
|
||||||
ifeq ($(TARGET_MODE),release)
|
ifeq ($(TARGET_MODE),release)
|
||||||
OPTION_NDEBUG = enable
|
OPTION_NDEBUG = enable
|
||||||
@@ -94,6 +101,12 @@ LDFLAGS_NO_OPTIMIZE ?=
|
|||||||
# Debug symbols
|
# Debug symbols
|
||||||
CFLAGS_DEBUG_SYMS ?= -g3
|
CFLAGS_DEBUG_SYMS ?= -g3
|
||||||
|
|
||||||
|
ifeq ($(OPTION_DWARF4),enable)
|
||||||
|
CFLAGS_DEBUG_SYMS += -gdwarf-4
|
||||||
|
else
|
||||||
|
CFLAGS_DEBUG_SYMS += -gdwarf-3
|
||||||
|
endif
|
||||||
|
|
||||||
# Cortex-M4 MCU
|
# Cortex-M4 MCU
|
||||||
CFLAGS_CORTEXM4 ?= -mlittle-endian -mcpu=cortex-m4 -march=armv7e-m -mthumb \
|
CFLAGS_CORTEXM4 ?= -mlittle-endian -mcpu=cortex-m4 -march=armv7e-m -mthumb \
|
||||||
-mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
-mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||||
|
|||||||
Reference in New Issue
Block a user