]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Enforce DWARF4 output
authorTom Rini <trini@konsulko.com>
Tue, 22 Nov 2022 17:31:54 +0000 (12:31 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 6 Dec 2022 20:30:30 +0000 (15:30 -0500)
At this point in time, using DWARF-5 format isn't easy to do by default
with all toolchains that we support.  And relying on the implicit
default can lead to mixing 4 and 5 and then the debug info not being
useful to tools.  For now, enforce using DWARF-4 only.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Makefile

index d48f52f2943b81273ea3c5546fdb1c97815ef090..11efc4180414c0236ee2ef66705ac56cd02f029e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -761,10 +761,10 @@ KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
 # change __FILE__ to the relative path from the srctree
 KBUILD_CFLAGS  += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
 
-KBUILD_CFLAGS  += -g
+KBUILD_CFLAGS  += -gdwarf-4
 # $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
 # option to the assembler.
-KBUILD_AFLAGS  += -g
+KBUILD_AFLAGS  += -gdwarf-4
 
 # Report stack usage if supported
 # ARC tools based on GCC 7.1 has an issue with stack usage