1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-27 21:54:30 +01:00

Adding a -lm to the end of the linker command line to fix a bug with sin(), atof(), etc. (Also removing some command line arguments that were ignored because they didn't come at the end of the command line.) Doesn't seem to make the basic LED blink sketch any bigger.

This commit is contained in:
David A. Mellis 2007-05-04 19:12:07 +00:00
parent 75fcecf417
commit c3ca1380dd

View File

@ -286,12 +286,10 @@ public class Compiler implements MessageConsumer {
*/
//PApplet.printarr(command);
baseCommandLinker[1] = "-Os -Wl,-u,vfprintf -lprintf_flt -lm,-Map=" +
((!Base.isMacOS()) ? buildPath : userdir + buildPath)
+ File.separator + sketch.name + ".map,--cref";
baseCommandLinker[1] = "-Os";
baseCommandLinker[4] = ((!Base.isMacOS()) ? buildPath
: buildPath) + File.separator + sketch.name + ".elf";
String commandLinker[] = new String[baseCommandLinker.length + sketchCount + 2];
String commandLinker[] = new String[baseCommandLinker.length + sketchCount + 3];
System.arraycopy(baseCommandLinker, 0, commandLinker, 0, baseCommandLinker.length);
int idx = 0;
for(int i = 0; i < sketchCount; i++, idx++) {
@ -299,7 +297,8 @@ public class Compiler implements MessageConsumer {
}
commandLinker[baseCommandLinker.length + idx++] = runtimeLibraryName;
commandLinker[baseCommandLinker.length + idx] = "-L" + buildPath;
commandLinker[baseCommandLinker.length + idx++] = "-L" + buildPath;
commandLinker[baseCommandLinker.length + idx] = "-lm";
/*String command[] = new String[baseCommand.length + preprocCount];
System.arraycopy(baseCommand, 0, command, 0, baseCommand.length);