diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2021-11-22 18:35:32 +0300 |
|---|---|---|
| committer | Jani Nikula <jani.nikula@intel.com> | 2021-11-22 18:35:32 +0300 |
| commit | 448cc2fb3a7b327823a9afd374808c37b8e6194f (patch) | |
| tree | a6d8ca3fa389980b47a495df2fb10892157c7dbc /scripts/Makefile.debug | |
| parent | 527bab0473f28236e4587c7870586275c1ef5516 (diff) | |
| parent | 136057256686de39cc3a07c2e39ef6bc43003ff6 (diff) | |
| download | linux-448cc2fb3a7b327823a9afd374808c37b8e6194f.tar.xz | |
Merge drm/drm-next into drm-intel-next
Sync up with drm-next to get v5.16-rc2.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'scripts/Makefile.debug')
| -rw-r--r-- | scripts/Makefile.debug | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/Makefile.debug b/scripts/Makefile.debug new file mode 100644 index 000000000000..9f39b0130551 --- /dev/null +++ b/scripts/Makefile.debug @@ -0,0 +1,33 @@ +DEBUG_CFLAGS := + +ifdef CONFIG_DEBUG_INFO_SPLIT +DEBUG_CFLAGS += -gsplit-dwarf +else +DEBUG_CFLAGS += -g +endif + +ifndef CONFIG_AS_IS_LLVM +KBUILD_AFLAGS += -Wa,-gdwarf-2 +endif + +ifndef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4 +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5 +DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y) +endif + +ifdef CONFIG_DEBUG_INFO_REDUCED +DEBUG_CFLAGS += -fno-var-tracking +ifdef CONFIG_CC_IS_GCC +DEBUG_CFLAGS += -femit-struct-debug-baseonly +endif +endif + +ifdef CONFIG_DEBUG_INFO_COMPRESSED +DEBUG_CFLAGS += -gz=zlib +KBUILD_AFLAGS += -gz=zlib +KBUILD_LDFLAGS += --compress-debug-sections=zlib +endif + +KBUILD_CFLAGS += $(DEBUG_CFLAGS) +export DEBUG_CFLAGS |
