From ee6d777d3e93670af801a7288ee6281626f4ac2d Mon Sep 17 00:00:00 2001 From: Vasily Gorbik Date: Thu, 28 Jun 2018 19:22:21 +0200 Subject: [PATCH] s390/decompressor: support extra debug flags Since decompressor cflags and aflags are made from scratch add extra debug flags when CONFIG_DEBUG_INFO is enabled. Also adds support for CONFIG_DEBUG_INFO_DWARF4 option. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky --- arch/s390/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index d25fbc1..eee6703 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -16,12 +16,16 @@ KBUILD_AFLAGS_MODULE += -fPIC KBUILD_CFLAGS_MODULE += -fPIC KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 +aflags_dwarf := -Wa,-gdwarf-2 KBUILD_AFLAGS_DECOMPRESSOR := -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) KBUILD_CFLAGS_DECOMPRESSOR := -m64 -O2 KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding) +KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) +KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) UTS_MACHINE := s390x STACK_SIZE := 16384 CHECKFLAGS += -D__s390__ -D__s390x__ -- 2.7.4