diff --git a/arch/arm/src/cmake/Toolchain.cmake b/arch/arm/src/cmake/Toolchain.cmake index 34c61c58ac..e2a6a3e406 100644 --- a/arch/arm/src/cmake/Toolchain.cmake +++ b/arch/arm/src/cmake/Toolchain.cmake @@ -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 diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/src/common/Toolchain.defs index 10950fba79..b13742c0bf 100644 --- a/arch/arm/src/common/Toolchain.defs +++ b/arch/arm/src/common/Toolchain.defs @@ -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 diff --git a/arch/arm64/src/Toolchain.defs b/arch/arm64/src/Toolchain.defs index 162d4fd411..7b34dcc548 100644 --- a/arch/arm64/src/Toolchain.defs +++ b/arch/arm64/src/Toolchain.defs @@ -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- diff --git a/arch/arm64/src/cmake/Toolchain.cmake b/arch/arm64/src/cmake/Toolchain.cmake index 704d5239e5..096588f83e 100644 --- a/arch/arm64/src/cmake/Toolchain.cmake +++ b/arch/arm64/src/cmake/Toolchain.cmake @@ -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) diff --git a/arch/avr/src/avr32/Toolchain.defs b/arch/avr/src/avr32/Toolchain.defs index 97ce2fd174..77c22aa66f 100644 --- a/arch/avr/src/avr32/Toolchain.defs +++ b/arch/avr/src/avr32/Toolchain.defs @@ -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) diff --git a/arch/ceva/src/xc5/Toolchain.defs b/arch/ceva/src/xc5/Toolchain.defs index 4baa578d51..a24e30683e 100644 --- a/arch/ceva/src/xc5/Toolchain.defs +++ b/arch/ceva/src/xc5/Toolchain.defs @@ -61,7 +61,7 @@ else endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif ARCHCFLAGS += -fno-common diff --git a/arch/ceva/src/xm6/Toolchain.defs b/arch/ceva/src/xm6/Toolchain.defs index 9bc1263905..46880326c5 100644 --- a/arch/ceva/src/xm6/Toolchain.defs +++ b/arch/ceva/src/xm6/Toolchain.defs @@ -61,7 +61,7 @@ else endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif ARCHCFLAGS += -fno-common diff --git a/arch/mips/src/mips32/Toolchain.defs b/arch/mips/src/mips32/Toolchain.defs index 24cc5a9746..6739f3d6e2 100644 --- a/arch/mips/src/mips32/Toolchain.defs +++ b/arch/mips/src/mips32/Toolchain.defs @@ -262,7 +262,7 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif ARCHCFLAGS += -fno-common diff --git a/arch/misoc/src/lm32/Toolchain.defs b/arch/misoc/src/lm32/Toolchain.defs index 42772a0d27..43417b92e6 100644 --- a/arch/misoc/src/lm32/Toolchain.defs +++ b/arch/misoc/src/lm32/Toolchain.defs @@ -68,7 +68,7 @@ endif LDFLAGS += -nostdlib ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif ARCHCFLAGS += -fno-common diff --git a/arch/misoc/src/minerva/Toolchain.defs b/arch/misoc/src/minerva/Toolchain.defs index 05ae535e96..0600eb5773 100644 --- a/arch/misoc/src/minerva/Toolchain.defs +++ b/arch/misoc/src/minerva/Toolchain.defs @@ -40,7 +40,7 @@ endif LDFLAGS += -nostdlib ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif ARCHCFLAGS += -fno-common diff --git a/arch/or1k/src/mor1kx/Toolchain.defs b/arch/or1k/src/mor1kx/Toolchain.defs index eb49f87d56..0c123e93c5 100644 --- a/arch/or1k/src/mor1kx/Toolchain.defs +++ b/arch/or1k/src/mor1kx/Toolchain.defs @@ -51,7 +51,7 @@ endif LDFLAGS += -nostdlib ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif ARCHCFLAGS += -fno-common diff --git a/arch/risc-v/src/cmake/Toolchain.cmake b/arch/risc-v/src/cmake/Toolchain.cmake index d44a20096c..83800b974c 100644 --- a/arch/risc-v/src/cmake/Toolchain.cmake +++ b/arch/risc-v/src/cmake/Toolchain.cmake @@ -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 diff --git a/arch/risc-v/src/common/Toolchain.defs b/arch/risc-v/src/common/Toolchain.defs index 2262632380..6448cb3040 100644 --- a/arch/risc-v/src/common/Toolchain.defs +++ b/arch/risc-v/src/common/Toolchain.defs @@ -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 diff --git a/arch/sim/src/cmake/Toolchain.cmake b/arch/sim/src/cmake/Toolchain.cmake index 44533362e6..a63ba57358 100644 --- a/arch/sim/src/cmake/Toolchain.cmake +++ b/arch/sim/src/cmake/Toolchain.cmake @@ -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) diff --git a/arch/sparc/src/sparc_v8/Toolchain.defs b/arch/sparc/src/sparc_v8/Toolchain.defs index 42f5dbdf82..0e62a7b88c 100644 --- a/arch/sparc/src/sparc_v8/Toolchain.defs +++ b/arch/sparc/src/sparc_v8/Toolchain.defs @@ -73,7 +73,7 @@ else endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif ARCHCFLAGS += -fno-common diff --git a/arch/x86_64/src/cmake/Toolchain.cmake b/arch/x86_64/src/cmake/Toolchain.cmake index e05e4b79e8..b58b65934f 100644 --- a/arch/x86_64/src/cmake/Toolchain.cmake +++ b/arch/x86_64/src/cmake/Toolchain.cmake @@ -78,7 +78,7 @@ if(CONFIG_ARCH_COVERAGE) endif() if(CONFIG_DEBUG_SYMBOLS) - add_compile_options(-g) + add_compile_options(-g3) endif() # Architecture flags diff --git a/arch/x86_64/src/common/Toolchain.defs b/arch/x86_64/src/common/Toolchain.defs index d7a07fb0fe..96cdbbd246 100644 --- a/arch/x86_64/src/common/Toolchain.defs +++ b/arch/x86_64/src/common/Toolchain.defs @@ -19,7 +19,7 @@ ############################################################################ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g + ARCHOPTIMIZATION = -g3 endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) diff --git a/arch/xtensa/src/lx6/Toolchain.defs b/arch/xtensa/src/lx6/Toolchain.defs index 7f5d7e9f19..94de7ac6a0 100644 --- a/arch/xtensa/src/lx6/Toolchain.defs +++ b/arch/xtensa/src/lx6/Toolchain.defs @@ -156,7 +156,7 @@ ifeq ($(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif # Default toolchain diff --git a/arch/xtensa/src/lx7/Toolchain.defs b/arch/xtensa/src/lx7/Toolchain.defs index cf3347a3dc..84cb92ba92 100644 --- a/arch/xtensa/src/lx7/Toolchain.defs +++ b/arch/xtensa/src/lx7/Toolchain.defs @@ -160,7 +160,7 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION += -g + ARCHOPTIMIZATION += -g3 endif # Default toolchain diff --git a/arch/z80/src/ez80/Toolchain.defs b/arch/z80/src/ez80/Toolchain.defs index 03d55a7b26..17b6fe9dfe 100644 --- a/arch/z80/src/ez80/Toolchain.defs +++ b/arch/z80/src/ez80/Toolchain.defs @@ -36,7 +36,7 @@ ifeq ($(CONFIG_EZ80_TOOLCHAIN_CLANG),y) ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHASMOPTIMIZATION = - ARCHOPTIMIZATION = -g + ARCHOPTIMIZATION = -g3 else ARCHASMOPTIMIZATION = ARCHOPTIMIZATION = diff --git a/boards/arm/sama5/jupiter-nano/scripts/Make.defs b/boards/arm/sama5/jupiter-nano/scripts/Make.defs index bb7eaf03f0..e1898a3271 100644 --- a/boards/arm/sama5/jupiter-nano/scripts/Make.defs +++ b/boards/arm/sama5/jupiter-nano/scripts/Make.defs @@ -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 diff --git a/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs b/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs index 88daaa5eb1..223e940f15 100644 --- a/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs +++ b/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs @@ -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) diff --git a/boards/hc/m9s12/ne64badge/scripts/Make.defs b/boards/hc/m9s12/ne64badge/scripts/Make.defs index f2d349acb7..bf72be2ca6 100644 --- a/boards/hc/m9s12/ne64badge/scripts/Make.defs +++ b/boards/hc/m9s12/ne64badge/scripts/Make.defs @@ -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) diff --git a/boards/renesas/m16c/skp16c26/scripts/Make.defs b/boards/renesas/m16c/skp16c26/scripts/Make.defs index 8aeb336927..8a313b822b 100644 --- a/boards/renesas/m16c/skp16c26/scripts/Make.defs +++ b/boards/renesas/m16c/skp16c26/scripts/Make.defs @@ -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) diff --git a/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs b/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs index bc27dafd32..4083ddf597 100644 --- a/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs @@ -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) diff --git a/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs b/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs index 1ffd02acbb..e03e3df767 100644 --- a/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs @@ -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) diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs b/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs index 986858a51f..2c2eac2ea3 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs @@ -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) diff --git a/boards/renesas/rx65n/rx65n/scripts/Make.defs b/boards/renesas/rx65n/rx65n/scripts/Make.defs index a1d219fcd7..adebea8912 100644 --- a/boards/renesas/rx65n/rx65n/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n/scripts/Make.defs @@ -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) diff --git a/boards/renesas/sh1/us7032evb1/scripts/Make.defs b/boards/renesas/sh1/us7032evb1/scripts/Make.defs index 82452a46ac..63cad72377 100644 --- a/boards/renesas/sh1/us7032evb1/scripts/Make.defs +++ b/boards/renesas/sh1/us7032evb1/scripts/Make.defs @@ -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) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index c3d6f060ac..b81ef02e25 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -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)