mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
More separation of debug symbols and optimization selections
This commit is contained in:
@@ -66,9 +66,11 @@ ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gc
|
||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
else
|
||||
ARCHOPTIMIZATION = -Os -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += -Os -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin -muse-rodata-section
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
include ${TOPDIR}/arch/avr/src/avr32/Toolchain.defs
|
||||
|
||||
# Setup for the selected toolchain
|
||||
|
||||
@@ -79,9 +80,11 @@ ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gc
|
||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
else
|
||||
ARCHOPTIMIZATION = -Os -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += -Os -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin -muse-rodata-section
|
||||
|
||||
Reference in New Issue
Block a user