From 6d1540e514a00345fcccb91e7ef8d02a25c1ab0e Mon Sep 17 00:00:00 2001 From: "Keith W. Campbell" Date: Fri, 10 Nov 2023 15:52:50 -0500 Subject: [PATCH] UMA: use DWARF version 4 on Linux Signed-off-by: Keith W. Campbell --- runtime/makelib/targets.mk.linux.inc.ftl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/makelib/targets.mk.linux.inc.ftl b/runtime/makelib/targets.mk.linux.inc.ftl index 69eae1ce27a..bbabc7e531f 100644 --- a/runtime/makelib/targets.mk.linux.inc.ftl +++ b/runtime/makelib/targets.mk.linux.inc.ftl @@ -254,6 +254,12 @@ ifdef j9vm_uma_gnuDebugSymbols <#if uma.spec.processor.x86 || uma.spec.processor.amd64> ASFLAGS += --gdwarf2 + + # Tell gcc to use DWARF version 4, not 5 (which is the default for compiler + # versions 11+). All GNU compiler versions, that might reasonably be used, + # understand these options, so this doesn't need to check the compiler version. + CFLAGS += -gdwarf-4 + CXXFLAGS += -gdwarf-4 endif <#if uma.spec.processor.x86 || uma.spec.processor.amd64 || uma.spec.processor.riscv64>