itsanjan / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Makefile creates unnecessarily large programs #553

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using http://www.arduino.cc/en/uploads/Hacking/Makefile instead of the 
IDE, the resulting programs are significantly larger.

Examination of the .elf file suggests that this is because unused code isn't 
being eliminated, and that the -ffunction-sections and -fdata-sections 
arguments used by the IDE should be used for compiling, and -Wl,--gc-sections 
for linking. 

The IDE also compiles with -fno-exceptions which should probably be used as 
well.

Original issue reported on code.google.com by vadim.tr...@gmail.com on 4 Jun 2011 at 10:09

GoogleCodeExporter commented 9 years ago
That Makefile is unsupported, so no plans to fix this.

Original comment by dmel...@gmail.com on 5 Jun 2011 at 1:03

GoogleCodeExporter commented 9 years ago
Ok, will you accept a patch for it, then?

It's the first hit for "Arduino makefile" in google, seems sort of silly to 
have every programmer figure out how to make it work properly.

Original comment by vadim.tr...@gmail.com on 5 Jun 2011 at 6:30

GoogleCodeExporter commented 9 years ago
I just deleted that file, so I'm hoping Google will update their search results 
and point people to Makefiles that are actually being maintained (by other 
people).

Original comment by dmel...@gmail.com on 5 Jun 2011 at 7:56