Skip to content

Commit d83806c

Browse files
alyssaismasahir0y
authored andcommitted
purgatory: fix disabling debug info
Since 32ef9e5, -Wa,-gdwarf-2 is no longer used in KBUILD_AFLAGS. Instead, it includes -g, the appropriate -gdwarf-* flag, and also the -Wa versions of both of those if building with Clang and GNU as. As a result, debug info was being generated for the purgatory objects, even though the intention was that it not be. Fixes: 32ef9e5 ("Makefile.debug: re-enable debug info for .S files") Signed-off-by: Alyssa Ross <[email protected]> Cc: [email protected] Acked-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 7e364e5 commit d83806c

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

arch/riscv/purgatory/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,7 @@ CFLAGS_string.o += $(PURGATORY_CFLAGS)
8484
CFLAGS_REMOVE_ctype.o += $(PURGATORY_CFLAGS_REMOVE)
8585
CFLAGS_ctype.o += $(PURGATORY_CFLAGS)
8686

87-
AFLAGS_REMOVE_entry.o += -Wa,-gdwarf-2
88-
AFLAGS_REMOVE_memcpy.o += -Wa,-gdwarf-2
89-
AFLAGS_REMOVE_memset.o += -Wa,-gdwarf-2
90-
AFLAGS_REMOVE_strcmp.o += -Wa,-gdwarf-2
91-
AFLAGS_REMOVE_strlen.o += -Wa,-gdwarf-2
92-
AFLAGS_REMOVE_strncmp.o += -Wa,-gdwarf-2
87+
asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x))
9388

9489
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
9590
$(call if_changed,ld)

arch/x86/purgatory/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ CFLAGS_sha256.o += $(PURGATORY_CFLAGS)
6969
CFLAGS_REMOVE_string.o += $(PURGATORY_CFLAGS_REMOVE)
7070
CFLAGS_string.o += $(PURGATORY_CFLAGS)
7171

72-
AFLAGS_REMOVE_setup-x86_$(BITS).o += -Wa,-gdwarf-2
73-
AFLAGS_REMOVE_entry64.o += -Wa,-gdwarf-2
72+
asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x))
7473

7574
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
7675
$(call if_changed,ld)

0 commit comments

Comments
 (0)