Debug option:change -g to -g3, add macro information to elf

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2024-03-27 17:29:39 +08:00 committed by Xiang Xiao
parent 521b3bb500
commit c76e83beaa
30 changed files with 30 additions and 30 deletions

View file

@ -197,7 +197,7 @@ if(CONFIG_DEBUG_LINK_MAP)
endif()
if(CONFIG_DEBUG_SYMBOLS)
add_compile_options(-g)
add_compile_options(-g3)
endif()
add_compile_options(-Wno-attributes -Wno-unknown-pragmas

View file

@ -431,7 +431,7 @@ endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y)
LDFLAGS += --debug
endif

View file

@ -150,7 +150,7 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
CROSSDEV ?= aarch64-none-elf-

View file

@ -172,7 +172,7 @@ if(CONFIG_DEBUG_LINK_MAP)
endif()
if(CONFIG_DEBUG_SYMBOLS)
add_compile_options(-g)
add_compile_options(-g3)
endif()
if(CONFIG_ARCH_TOOLCHAIN_GNU)

View file

@ -36,7 +36,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ifeq ($(CONFIG_FRAME_POINTER),y)

View file

@ -61,7 +61,7 @@ else
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ARCHCFLAGS += -fno-common

View file

@ -61,7 +61,7 @@ else
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ARCHCFLAGS += -fno-common

View file

@ -262,7 +262,7 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ARCHCFLAGS += -fno-common

View file

@ -68,7 +68,7 @@ endif
LDFLAGS += -nostdlib
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ARCHCFLAGS += -fno-common

View file

@ -40,7 +40,7 @@ endif
LDFLAGS += -nostdlib
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ARCHCFLAGS += -fno-common

View file

@ -51,7 +51,7 @@ endif
LDFLAGS += -nostdlib
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ARCHCFLAGS += -fno-common

View file

@ -220,7 +220,7 @@ if(CONFIG_DEBUG_LINK_MAP)
endif()
if(CONFIG_DEBUG_SYMBOLS)
add_compile_options(-g)
add_compile_options(-g3)
endif()
# Generic GNU RVG toolchain

View file

@ -150,7 +150,7 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
# Generic GNU RVG toolchain

View file

@ -30,7 +30,7 @@ endif()
add_compile_options(-fno-common)
if(CONFIG_DEBUG_SYMBOLS)
add_compile_options(-g)
add_compile_options(-g3)
endif()
if(CONFIG_SIM_M32)

View file

@ -73,7 +73,7 @@ else
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ARCHCFLAGS += -fno-common

View file

@ -78,7 +78,7 @@ if(CONFIG_ARCH_COVERAGE)
endif()
if(CONFIG_DEBUG_SYMBOLS)
add_compile_options(-g)
add_compile_options(-g3)
endif()
# Architecture flags

View file

@ -19,7 +19,7 @@
############################################################################
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)

View file

@ -156,7 +156,7 @@ ifeq ($(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE),y)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
# Default toolchain

View file

@ -160,7 +160,7 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
# Default toolchain

View file

@ -36,7 +36,7 @@ ifeq ($(CONFIG_EZ80_TOOLCHAIN_CLANG),y)
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHASMOPTIMIZATION =
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
else
ARCHASMOPTIMIZATION =
ARCHOPTIMIZATION =

View file

@ -62,5 +62,5 @@ LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/binfmt/libelf/gnu-elf.ld)
# LDFLAGS += --nostartfiles -nodefaultlibs
#endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g
LDFLAGS += -g3
endif

View file

@ -41,7 +41,7 @@ endif
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)ostest$(DELIM)$(LDSCRIPT)
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -41,7 +41,7 @@ endif
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -31,7 +31,7 @@ OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -36,7 +36,7 @@ OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -36,7 +36,7 @@ OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -36,7 +36,7 @@ OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -36,7 +36,7 @@ OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -22,7 +22,7 @@ include $(TOPDIR)/.config
include $(TOPDIR)/tools/Config.mk
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ARCHOPTIMIZATION = -g3
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -41,7 +41,7 @@ ARCHDEFINES += -U__NetBSD__ -U__linux__ -U__sun__ -U__unix__
ARCHDEFINES += -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += -g
ARCHOPTIMIZATION += -g3
endif
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)