Commit 5666e4d5 authored by Daniel Leung's avatar Daniel Leung Committed by Anas Nashif
Browse files

cmake: force GCC to emit DWARF version 4



GCC 11 defaults to output DWARF version 5 which pyelftools cannot
currently parse. So keep output at version 4 for the time being.

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 91a78866
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -167,6 +167,10 @@ set_compiler_property(PROPERTY freestanding -ffreestanding)
# Flag to enable debugging
set_compiler_property(PROPERTY debug -g)

# GCC 11 by default emits DWARF version 5 which cannot be parsed by
# pyelftools. Can be removed once pyelftools supports v5.
check_set_compiler_property(APPEND PROPERTY debug -gdwarf-4)

set_compiler_property(PROPERTY no_common -fno-common)

# GCC compiler flags for imacros. The specific header must be appended by user.