Skip to content

Commit

Permalink
Configure debug info to DWARF v4.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Sep 8, 2023
1 parent efd034a commit 9da1d9d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions utils/cmake/toolchains/ARM_GCC/compiler-flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,29 @@ set(CMAKE_DEPFILE_FLAGS_CXX "-MMD -MT <OBJECT> -MF <DEPFILE>")
set(CMAKE_C_OUTPUT_EXTENSION ".o")
set(CMAKE_DEPFILE_FLAGS_C "-MMD -MT <OBJECT> -MF <DEPFILE>")

set(CMAKE_C_FLAGS_DEBUG_INIT "-g -gdwarf-3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -gdwarf-4")
set(CMAKE_C_FLAGS_DEBUG_INIT "-g -gdwarf-4")
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE_INIT "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-Os -g -gdwarf-3 -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-Os -g -gdwarf-4 -DNDEBUG")
set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")


set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g -gdwarf-3")
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO "-g -gdwarf-4")
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g -gdwarf-4")
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-Os -DNDEBUG")
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-Os -g -gdwarf-3 -DNDEBUG")
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-Os -g -gdwarf-4 -DNDEBUG")
set(CMAKE_INCLUDE_SYSTEM_FLAG_ASM "-isystem ")

set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> -cr <LINK_FLAGS> <TARGET> <OBJECTS>")

set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> -Wl,-Map,<TARGET>.map -Wl,--start-group <OBJECTS> <LINK_LIBRARIES> -lnosys -lstdc++ -lsupc++ -lm -lc -lgcc -lstdc++ -lsupc++ -lm -lc -lgcc -Wl,--end-group --specs=nano.specs -o <TARGET>")

set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -gdwarf-3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -gdwarf-4")
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -gdwarf-4")
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-Os -g -gdwarf-3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-Os -g -gdwarf-4 -DNDEBUG")
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")

if (CMAKE_C_COMPILER_VERSION VERSION_GREATER "7.1.0" OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL "7.1.0")
Expand Down

0 comments on commit 9da1d9d

Please sign in to comment.