mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +01:00
bootloaders: always build with debug symbols enabled
This makes it easier to use gdb to debug issues. This does not change the -O flags, only makes -g always on and does not strip the .elf files.
This commit is contained in:
parent
3c03db9126
commit
465034cf94
@ -237,9 +237,10 @@ CSTANDARD = -std=gnu99
|
|||||||
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
||||||
|
|
||||||
ifeq ($(DEBUG),YES)
|
ifeq ($(DEBUG),YES)
|
||||||
CFLAGS = -g$(DEBUGF)
|
CFLAGS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -g$(DEBUGF)
|
||||||
CFLAGS += -O$(OPT)
|
CFLAGS += -O$(OPT)
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
CFLAGS += -fdata-sections -ffunction-sections
|
CFLAGS += -fdata-sections -ffunction-sections
|
||||||
|
@ -267,9 +267,10 @@ CSTANDARD = -std=gnu99
|
|||||||
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
||||||
|
|
||||||
ifeq ($(DEBUG),YES)
|
ifeq ($(DEBUG),YES)
|
||||||
CFLAGS = -g$(DEBUGF) -DDEBUG
|
CFLAGS = -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -g$(DEBUGF)
|
||||||
CFLAGS += -O$(OPT)
|
CFLAGS += -O$(OPT)
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
CFLAGS += -ffunction-sections
|
CFLAGS += -ffunction-sections
|
||||||
@ -309,7 +310,7 @@ MATH_LIB = -lm
|
|||||||
# --cref: add cross reference to map file
|
# --cref: add cross reference to map file
|
||||||
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
LDFLAGS += -Wl,-static -Wl,-s
|
LDFLAGS += -Wl,-static
|
||||||
endif
|
endif
|
||||||
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
||||||
LDFLAGS += -lc
|
LDFLAGS += -lc
|
||||||
|
@ -299,9 +299,10 @@ CSTANDARD = -std=gnu99
|
|||||||
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
||||||
|
|
||||||
ifeq ($(DEBUG),YES)
|
ifeq ($(DEBUG),YES)
|
||||||
CFLAGS = -g$(DEBUGF) -DDEBUG
|
CFLAGS += -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -g$(DEBUGF)
|
||||||
CFLAGS += -O$(OPT)
|
CFLAGS += -O$(OPT)
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
CFLAGS += -ffunction-sections
|
CFLAGS += -ffunction-sections
|
||||||
@ -341,7 +342,7 @@ MATH_LIB = -lm
|
|||||||
# --cref: add cross reference to map file
|
# --cref: add cross reference to map file
|
||||||
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
LDFLAGS += -Wl,-static -Wl,-s
|
LDFLAGS += -Wl,-static
|
||||||
endif
|
endif
|
||||||
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
||||||
LDFLAGS += -lc
|
LDFLAGS += -lc
|
||||||
|
@ -302,9 +302,10 @@ CSTANDARD = -std=gnu99
|
|||||||
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
||||||
|
|
||||||
ifeq ($(DEBUG),YES)
|
ifeq ($(DEBUG),YES)
|
||||||
CFLAGS = -g$(DEBUGF) -DDEBUG
|
CFLAGS = -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -g$(DEBUGF)
|
||||||
CFLAGS += -O$(OPT)
|
CFLAGS += -O$(OPT)
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
CFLAGS += -ffunction-sections
|
CFLAGS += -ffunction-sections
|
||||||
@ -344,7 +345,7 @@ MATH_LIB = -lm
|
|||||||
# --cref: add cross reference to map file
|
# --cref: add cross reference to map file
|
||||||
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
LDFLAGS += -Wl,-static -Wl,-s
|
LDFLAGS += -Wl,-static
|
||||||
endif
|
endif
|
||||||
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
||||||
LDFLAGS += -lc
|
LDFLAGS += -lc
|
||||||
|
@ -298,9 +298,10 @@ CSTANDARD = -std=gnu99
|
|||||||
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
|
||||||
|
|
||||||
ifeq ($(DEBUG),YES)
|
ifeq ($(DEBUG),YES)
|
||||||
CFLAGS = -g$(DEBUGF) -DDEBUG
|
CFLAGS = -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -g$(DEBUGF)
|
||||||
CFLAGS += -O$(OPT)
|
CFLAGS += -O$(OPT)
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
CFLAGS += -ffunction-sections
|
CFLAGS += -ffunction-sections
|
||||||
@ -340,7 +341,7 @@ MATH_LIB = -lm
|
|||||||
# --cref: add cross reference to map file
|
# --cref: add cross reference to map file
|
||||||
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
LDFLAGS = -nostartfiles -Wl,-Map=$(OUTDIR)/$(TARGET).map,--cref,--gc-sections
|
||||||
ifeq ($(DEBUG),NO)
|
ifeq ($(DEBUG),NO)
|
||||||
LDFLAGS += -Wl,-static -Wl,-s
|
LDFLAGS += -Wl,-static
|
||||||
endif
|
endif
|
||||||
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
|
||||||
LDFLAGS += -lc
|
LDFLAGS += -lc
|
||||||
|
Loading…
Reference in New Issue
Block a user