c6ef8454a1
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.
27 lines
700 B
Text
27 lines
700 B
Text
CONTIKI_CPU_DIRS += . init/common
|
|
|
|
CONTIKI_SOURCEFILES += gdt.c helpers.S idt.c cpu.c
|
|
|
|
CC = gcc
|
|
LD = gcc
|
|
AS = as
|
|
OBJCOPY = objcopy
|
|
SIZE = size
|
|
STRIP = strip
|
|
|
|
CFLAGS += -Wall -fno-asynchronous-unwind-tables
|
|
LDFLAGS += -Wl,-Map=contiki-$(TARGET).map,--build-id=none
|
|
|
|
ifeq ($(BUILD_RELEASE),1)
|
|
CFLAGS += -Os -fno-strict-aliasing -ffunction-sections -fdata-sections
|
|
# XXX: --gc-sections can be very tricky sometimes. If somehow the release
|
|
# 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 += -g
|
|
else
|
|
CFLAGS += -ggdb3
|
|
endif
|
|
endif
|