From c3ca1380ddaf21f32b7967d28ebd97d8ef8b4ae2 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Fri, 4 May 2007 19:12:07 +0000 Subject: [PATCH] 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. --- app/Compiler.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Compiler.java b/app/Compiler.java index be5aef576..24aec8c5a 100644 --- a/app/Compiler.java +++ b/app/Compiler.java @@ -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);