mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
Makefile - use -gddb2, not -gddb3 due to issues with GDB crashing. (#12971)
Makefile - use gddb2, not gddb3 due to issues with GDB crashing. The cause seems to be the macro debugging information which when generated by the compiler, apparently incorrectly, causes GDB to use excessive amounts of CPU and crash. Error: "gdb/utils.c:717\ : internal-error: virtual memory exhausted: can't allocate 4064 bytes.\nA problem internal to GDB ha\ s been detected,\nfurther debugging may prove unreliable." Reference: * https://sourceware.org/bugzilla/show_bug.cgi?id=28219#c15 * https://github.com/microsoft/vscode-cpptools/issues/9219#issuecomment-1118034083 Note this crashing behavior is observed with `GCC > 9.3.1`, `9.3.1` itself is OK.
This commit is contained in:
parent
293e14e8bd
commit
2edc5fb7d5
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -145,10 +145,10 @@ ifeq ($(DEBUG),GDB)
|
||||||
OPTIMISE_DEFAULT := -Og
|
OPTIMISE_DEFAULT := -Og
|
||||||
|
|
||||||
LTO_FLAGS := $(OPTIMISE_DEFAULT)
|
LTO_FLAGS := $(OPTIMISE_DEFAULT)
|
||||||
DEBUG_FLAGS = -ggdb3 -gdwarf-5 -DDEBUG
|
DEBUG_FLAGS = -ggdb2 -gdwarf-5 -DDEBUG
|
||||||
else
|
else
|
||||||
ifeq ($(DEBUG),INFO)
|
ifeq ($(DEBUG),INFO)
|
||||||
DEBUG_FLAGS = -ggdb3
|
DEBUG_FLAGS = -ggdb2
|
||||||
endif
|
endif
|
||||||
OPTIMISATION_BASE := -flto -fuse-linker-plugin -ffast-math -fmerge-all-constants
|
OPTIMISATION_BASE := -flto -fuse-linker-plugin -ffast-math -fmerge-all-constants
|
||||||
OPTIMISE_DEFAULT := -O2
|
OPTIMISE_DEFAULT := -O2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue