mirror of
https://github.com/Optiboot/optiboot.git
synced 2025-07-04 16:42:25 +03:00
It turns out that the "-nostdlib" switch that we've been using
has been unncessary for quite a long time. It turns out that if we don't call and stdlib functions, then no stdlib bloat gets added (duh.) Thanks to matthijskooijman for finally noticing this. It fixes bugs related to using the EEPROM functions (from stdlib) in spite of library name changes between compiler versions. (Now compiles with gcc 3.4.x though gcc 5.2.x, AFAICT.) https://github.com/Optiboot/optiboot/issues/233 https://github.com/Optiboot/optiboot/issues/177
This commit is contained in:
@ -126,19 +126,12 @@ OPTIMIZE = -Os -fno-split-wide-types -mrelax
|
||||
|
||||
DEFS =
|
||||
|
||||
#
|
||||
# platforms support EEPROM and large bootloaders need the eeprom functions that
|
||||
# are defined in libc, even though we explicity remove it with -nostdlib because
|
||||
# of the space-savings.
|
||||
LIBS = -lc
|
||||
|
||||
CC = $(GCCROOT)avr-gcc
|
||||
|
||||
# Override is only needed by avr-lib build system.
|
||||
|
||||
override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
|
||||
override LDFLAGS = $(LDSECTIONS) -Wl,--relax -nostartfiles -nostdlib
|
||||
#-Wl,--gc-sections
|
||||
override LDFLAGS = $(LDSECTIONS) -Wl,--relax -nostartfiles
|
||||
|
||||
OBJCOPY = $(GCCROOT)avr-objcopy
|
||||
OBJDUMP = $(call fixpath,$(GCCROOT)avr-objdump)
|
||||
|
Reference in New Issue
Block a user