Sanitize linking for main firmware, too.

This commit is contained in:
Stefan `Sec` Zehl 2012-01-27 22:33:44 +01:00
parent 2c8ec43a1e
commit e8eb8402d0
2 changed files with 4 additions and 4 deletions

View File

@ -37,13 +37,13 @@ ifdef APP
OUTFILE=$(APP) OUTFILE=$(APP)
endif endif
LDFLAGS+= -Wl,--gc-sections LDFLAGS+= --gc-sections
OBJS += lpc1xxx/$(TARGET)_handlers.o lpc1xxx/LPC1xxx_startup.o OBJS += lpc1xxx/$(TARGET)_handlers.o lpc1xxx/LPC1xxx_startup.o
########################################################################## ##########################################################################
# Startup files # Startup files
########################################################################## ##########################################################################
LDLIBS = -lm LDLIBS =
LDLIBS += -Lapplications -lapp LDLIBS += -Lapplications -lapp
LDLIBS += -Lfunk -lfunk LDLIBS += -Lfunk -lfunk
LDLIBS += -Lusbcdc -lusbcdc LDLIBS += -Lusbcdc -lusbcdc
@ -111,7 +111,7 @@ $(LD_TEMP):
-@echo "INCLUDE $(LD_SCRIPT)" >> $(LD_TEMP) -@echo "INCLUDE $(LD_SCRIPT)" >> $(LD_TEMP)
$(OUTFILE).elf: $(OBJS) $(SYS_OBJS) $(SUBDIRS) $(LPCFIX) $(LD_TEMP) $(OUTFILE).elf: $(OBJS) $(SYS_OBJS) $(SUBDIRS) $(LPCFIX) $(LD_TEMP)
$(CC) $(LDFLAGS) -T $(LD_TEMP) -o $(OUTFILE).elf $(OBJS) $(LDLIBS) $(LD) $(LDFLAGS) -T $(LD_TEMP) -o $(OUTFILE).elf $(OBJS) $(LDLIBS)
-@echo "" -@echo ""
$(SIZE) $(OUTFILE).elf $(SIZE) $(OUTFILE).elf
-@echo "" -@echo ""

View File

@ -42,7 +42,7 @@ CPU_TYPE = cortex-$(CORTEX_TYPE)
# Compiler settings, parameters and flags # Compiler settings, parameters and flags
########################################################################## ##########################################################################
CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -DRAMCODE=$(RAMCODE) -fno-builtin -Wno-unused-function CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -DRAMCODE=$(RAMCODE) -fno-builtin -Wno-unused-function -ffreestanding
LDFLAGS = -nostartfiles LDFLAGS = -nostartfiles
ifeq "$(USBSERIAL)" "YES" ifeq "$(USBSERIAL)" "YES"