From 3cf98fb2e5c25960094436f9682445389085ef13 Mon Sep 17 00:00:00 2001 From: "Keith W. Campbell" Date: Fri, 10 Nov 2023 15:37:12 -0500 Subject: [PATCH] UMA: use -gdwarf-4 Signed-off-by: Keith W. Campbell --- omrmakefiles/rules.linux.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/omrmakefiles/rules.linux.mk b/omrmakefiles/rules.linux.mk index 929099ec232..bfd45bb43da 100644 --- a/omrmakefiles/rules.linux.mk +++ b/omrmakefiles/rules.linux.mk @@ -183,6 +183,16 @@ ifeq (1,$(OMR_DEBUG)) endif endif +ifneq (,$(findstring -gdwarf-, $(GLOBAL_CFLAGS) $(GLOBAL_CXXFLAGS))) + # Don't override if '-gdwarf-N' is already specified. +else ifeq (gcc,$(OMR_TOOLCHAIN)) + # 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 this option, so this doesn't need to check the compiler version. + GLOBAL_CFLAGS += -gdwarf-4 + GLOBAL_CXXFLAGS += -gdwarf-4 +endif + #-- Add Platform flags ifeq (x86,$(OMR_HOST_ARCH)) ifeq (1,$(OMR_ENV_DATA64))