From c6ef8454a1c39a618276405581b4bd4bb176b729 Mon Sep 17 00:00:00 2001 From: Andre Guedes Date: Fri, 2 Oct 2015 09:19:15 -0300 Subject: [PATCH] x86: Use -O0 instead of -Og for debug build This patch replaces the gcc option '-Og' by '-O0' which is used when building debugging binaries. The motivation for this change comes from the fact that we have found at least one optimization done by '-Og' that interfered with one of our debugging sessions. --- cpu/x86/Makefile.x86_common | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpu/x86/Makefile.x86_common b/cpu/x86/Makefile.x86_common index d920327cf..054cfcd68 100644 --- a/cpu/x86/Makefile.x86_common +++ b/cpu/x86/Makefile.x86_common @@ -18,9 +18,10 @@ ifeq ($(BUILD_RELEASE),1) # binary seems to be broken, check if removing this option fixes the issue. LDFLAGS += -Wl,--strip-all,--gc-sections else + CFLAGS += -O0 ifeq ($(findstring clang,$(CC)),clang) - CFLAGS += -O0 -g + CFLAGS += -g else - CFLAGS += -Og -ggdb3 + CFLAGS += -ggdb3 endif endif