sudar/Arduino-Makefile

Arduino.mk insists on building way too many unnecessary libraries

kenrestivo opened this issue · 7 comments

I have this simple makefile

ARDUINO_DIR   = /usr/share/arduino
ARDMK_DIR     = /home/localkens/embed/src/Arduino-Makefile
AVR_TOOLS_DIR = /usr

BOARD_TAG    = diecimila
ARDUINO_PORT = /dev/ttyUSB4

ARDUINO_LIBS= SoftwareSerial

ARDUINO_USER_LIBS = ModbusMaster

USER_LIB_PATH=../../../

include /home/localkens/embed/src/Arduino-Makefile/arduino-mk/Arduino.mk

And make seems to insist on building all kinds of insane stuff, like HID and USB, and IPAddress???!, when I did not tell it to do that.

/usr/bin/avr-gcc -c -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=100 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/SoftwareSerial -I../../..//ModbusMaster -g -Os -w -Wall -DUSB_VID= -DUSB_PID= -ffunction-sections -fdata-sections -std=gnu99 ../../..//ModbusMaster/ModbusMaster.cpp -o build-diecimila/libs/ModbusMaster/ModbusMaster.o
/usr/bin/avr-ar rcs build-diecimila/libcore.a  build-diecimila/WInterrupts.o  build-diecimila/wiring_analog.o  build-diecimila/wiring.o  build-diecimila/wiring_digital.o  build-diecimila/wiring_pulse.o  build-diecimila/wiring_shift.o  build-diecimila/CDC.o  build-diecimila/HardwareSerial.o  build-diecimila/HID.o  build-diecimila/IPAddress.o  build-diecimila/main.o  build-diecimila/new.o  build-diecimila/Print.o  build-diecimila/Stream.o  build-diecimila/Tone.o  build-diecimila/USBCore.o  build-diecimila/WMath.o  build-diecimila/WString.o  build-diecimila/libs/SoftwareSerial/SoftwareSerial.o build-diecimila/libs/ModbusMaster/ModbusMaster.o 
/usr/bin/avr-gcc -mmcu=atmega168 -Wl,--gc-sections -Os -o build-diecimila/Basic.elf build-diecimila/Basic.o build-diecimila/libcore.a  -lc -lm
/usr/bin/avr-objcopy -O ihex -R .eeprom build-diecimila/Basic.elf build-diecimila/Basic.hex

Why does it think that a diecimilla is a Leonardo? It isn't. I've been looking around in the makefile to try to find out where this mistake is coming from, and can't seem to find it anywhere.

Hmm, I see. It's just grabbing everything in ARDUINO_CORE_PATH, and not making any decisions as to which core files make any sense for the target device.

It's doing the same thing to me, building all of the core libraries.

yup, i just noticed this too - Stream, WMath, Tone, HardwareSerial, USBCore etc.even for Blink.

they're not getting put into the hex though (800k of libs, 4k hex!) so its just a waste of compile time rather than arduino memory.

I just enabled verbose logs in Arduino IDE to see how Arduino handles it. It seems even Arduino IDE tries to compile everything, but link only the necessary stuff as @sej7278 found out.

I am thinking of marking it as wontfix. What do you guys think?

Here is the (rather long) output from Arduino IDE

/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/avr-libc/malloc.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/malloc.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/avr-libc/realloc.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/realloc.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WInterrupts.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/WInterrupts.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring.c:264:3: warning: #warning Timer 2 not finished (may not be present on this CPU)
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring.c:273:3: warning: #warning Timer 2 not finished (may not be present on this CPU)
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_analog.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_analog.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_digital.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_digital.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_pulse.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_pulse.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_shift.c -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_shift.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/CDC.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/HardwareSerial.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp:98: warning: comparison between signed and unsigned integer expressions
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In function 'void __vector_25()':
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp:153: warning: unused variable 'c'
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In member function 'void HardwareSerial::begin(long unsigned int, byte)':
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp:368: warning: unused variable 'current_config'
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In member function 'virtual size_t HardwareSerial::write(uint8_t)':
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp:467: warning: comparison between signed and unsigned integer expressions
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HID.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/HID.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HID.cpp: In member function 'virtual size_t Keyboard_::write(uint8_t)':
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HID.cpp:514: warning: unused variable 'r'
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/IPAddress.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/IPAddress.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/main.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/new.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Print.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp:44: warning: '__progmem__' attribute ignored
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Stream.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Tone.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Tone.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Tone.cpp:210:12: warning: #warning this may not be correct
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Tone.cpp:110: warning: only initialized variables can be placed into program memory area
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/USBCore.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/USBCore.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/USBCore.cpp: In function 'int USB_Send(u8, const void*, int)':
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/USBCore.cpp:278: warning: unused variable 'zero'
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WMath.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/WMath.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/leonardo /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.cpp -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/WString.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/malloc.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/realloc.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/WInterrupts.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_analog.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_digital.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_pulse.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/wiring_shift.c.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/CDC.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/HardwareSerial.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/HID.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/IPAddress.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/main.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/new.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Print.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Stream.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Tone.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/USBCore.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/WMath.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/WString.cpp.o 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections -mmcu=atmega32u4 -o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp.elf /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp.o /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/core.a -L/var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp -lm 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp.elf /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp.eep 
/Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp.elf /var/folders/lx/ntnbtv095_q925qpqxpdxm_w001kr9/T/build7283049052007978430.tmp/Blink.cpp.hex 
Binary sketch size: 4,826 bytes (of a 28,672 byte maximum)

I noticed that, forgot to update the issue, sorry. It is irritating but not a huge problem; as the linker filters all that stuff out. Your call if you want to keep it open or not.

I am marking this issue as enhancement and not closing it.

The fix for this issue will be "nice to have", and that's why I am not marking it as wontfix.

Would be happy to merge, if someone can implement it. But I am not sure, if it can be implemented.

yeah thats fine as the IDE does it that way too, also upon a 2nd pass of make it doesn't rebuild everything