fix: use DWARF 4 standard when building debug
GCC 11 and Clang 14 now use the DWARF 5 standard by default however
ArmDS currently only supports up to version 4. Therefore, for debug
builds, ensure the DWARF 4 standard is used.
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: Id7a9e222ff94dbf1cc523b27188f76f88c21c4e6
diff --git a/Makefile b/Makefile
index d22e32e..f71c9a6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2018-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -174,8 +174,8 @@
COMMON_LDFLAGS :=
ifeq (${DEBUG},1)
-COMMON_CFLAGS += -g
-COMMON_ASFLAGS += -g -Wa,--gdwarf-2
+COMMON_CFLAGS += -g -gdwarf-4
+COMMON_ASFLAGS += -g -Wa,--gdwarf-4
endif
# Set the compiler's target architecture profile based on ARM_ARCH_MINOR option