From cfaa57fe6cd63952290e956beb1e4d58e7fd60f5 Mon Sep 17 00:00:00 2001 From: Karl Fessel Date: Thu, 11 Mar 2021 15:44:10 +0100 Subject: [PATCH] board/native: no omit frame pointer if backtrace is used this makes riots test work but may have different result than O0 see man 3 backtrace #NOTES --- boards/native/Makefile.include | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index c391521c27..cad532db2f 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -22,7 +22,12 @@ export GPROF ?= gprof # basic cflags: CFLAGS += -Wall -Wextra -pedantic $(CFLAGS_DBG) $(CFLAGS_OPT) CFLAGS_DBG ?= -g3 -CFLAGS_OPT ?= -Og +ifneq (,$(filter backtrace,$(USEMODULE))) + $(warning module backtrace is used, do not omit frame pointers) + CFLAGS_OPT ?= -Og -fno-omit-frame-pointer +else + CFLAGS_OPT ?= -Og +endif # default std set to gnu11 if not overwritten by user ifeq (,$(filter -std=%, $(CFLAGS)))