Skip to content

Commit

Permalink
Update fix for gcc workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrockrat committed Apr 9, 2018
1 parent 06c3df8 commit 124468d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ArduinoAVR/Repetier/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ $(ARDUINO)/WString.cpp

# Name of this Makefile (used for "make depend").
MAKEFILE = Makefile
GCC_WORKAROUND=$(shell _v=$$($(CC) --version|grep GCC|sed 's!.* !!'|tr -d '.'); let v=_v; if [ $$v -ge 480 ]; then echo "0"; else echo "1"; fi )
GCC_VER=$(shell $(CC) --version|grep GCC|sed 's!.* !!'|tr -d '.' )
GCC_WORKAROUND=$(shell if [ $(GCC_VER) -ge 480 ]; then echo "0"; else echo "1"; fi 2>/dev/null)
# Debugging format.
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
Expand Down Expand Up @@ -242,6 +243,7 @@ fake_new_delete.o: fake_new_delete.c

# Link: create ELF output file from library.
applet/$(TARGET).elf: $(PDEFILE) applet/core.a fake_new_delete.o
@echo "GCC_VER=$(GCC_VER) GCC_W=$(GCC_WORKAROUND)"
$(CXX) $(ALL_CXXFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a fake_new_delete.o $(LDFLAGS)
$(ELFSIZE)

Expand Down

0 comments on commit 124468d

Please sign in to comment.