Makefile.debug (85f17d677f6c40069287617630f202eb20fcfe36) | Makefile.debug (2f7ab1267dc9b2d1f29695aff3211c87483480f3) |
---|---|
1DEBUG_CFLAGS := | 1DEBUG_CFLAGS := |
2DEBUG_RUSTFLAGS := 3 |
|
2debug-flags-y := -g 3 4ifdef CONFIG_DEBUG_INFO_SPLIT 5DEBUG_CFLAGS += -gsplit-dwarf 6endif 7 8debug-flags-$(CONFIG_DEBUG_INFO_DWARF4) += -gdwarf-4 9debug-flags-$(CONFIG_DEBUG_INFO_DWARF5) += -gdwarf-5 10ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_AS_IS_GNU),yy) 11# Clang does not pass -g or -gdwarf-* option down to GAS. 12# Add -Wa, prefix to explicitly specify the flags. 13KBUILD_AFLAGS += $(addprefix -Wa$(comma), $(debug-flags-y)) 14endif 15DEBUG_CFLAGS += $(debug-flags-y) 16KBUILD_AFLAGS += $(debug-flags-y) 17 18ifdef CONFIG_DEBUG_INFO_REDUCED 19DEBUG_CFLAGS += -fno-var-tracking | 4debug-flags-y := -g 5 6ifdef CONFIG_DEBUG_INFO_SPLIT 7DEBUG_CFLAGS += -gsplit-dwarf 8endif 9 10debug-flags-$(CONFIG_DEBUG_INFO_DWARF4) += -gdwarf-4 11debug-flags-$(CONFIG_DEBUG_INFO_DWARF5) += -gdwarf-5 12ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_AS_IS_GNU),yy) 13# Clang does not pass -g or -gdwarf-* option down to GAS. 14# Add -Wa, prefix to explicitly specify the flags. 15KBUILD_AFLAGS += $(addprefix -Wa$(comma), $(debug-flags-y)) 16endif 17DEBUG_CFLAGS += $(debug-flags-y) 18KBUILD_AFLAGS += $(debug-flags-y) 19 20ifdef CONFIG_DEBUG_INFO_REDUCED 21DEBUG_CFLAGS += -fno-var-tracking |
22DEBUG_RUSTFLAGS += -Cdebuginfo=1 |
|
20ifdef CONFIG_CC_IS_GCC 21DEBUG_CFLAGS += -femit-struct-debug-baseonly 22endif | 23ifdef CONFIG_CC_IS_GCC 24DEBUG_CFLAGS += -femit-struct-debug-baseonly 25endif |
26else 27DEBUG_RUSTFLAGS += -Cdebuginfo=2 |
|
23endif 24 25ifdef CONFIG_DEBUG_INFO_COMPRESSED 26DEBUG_CFLAGS += -gz=zlib 27KBUILD_AFLAGS += -gz=zlib 28KBUILD_LDFLAGS += --compress-debug-sections=zlib 29endif 30 31KBUILD_CFLAGS += $(DEBUG_CFLAGS) 32export DEBUG_CFLAGS | 28endif 29 30ifdef CONFIG_DEBUG_INFO_COMPRESSED 31DEBUG_CFLAGS += -gz=zlib 32KBUILD_AFLAGS += -gz=zlib 33KBUILD_LDFLAGS += --compress-debug-sections=zlib 34endif 35 36KBUILD_CFLAGS += $(DEBUG_CFLAGS) 37export DEBUG_CFLAGS |
38 39KBUILD_RUSTFLAGS += $(DEBUG_RUSTFLAGS) 40export DEBUG_RUSTFLAGS |
|