You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/11/24 22:48:24 UTC

incubator-mynewt-newt git commit: Give linker flags options after object files in command line.

Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/master af82e569c -> 9c86575ee


Give linker flags options after object files in command line.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/9c86575e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/9c86575e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/9c86575e

Branch: refs/heads/master
Commit: 9c86575eea5de75cb64b0e3496c40ab4136799b3
Parents: af82e56
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 24 13:45:57 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 24 13:45:57 2015 -0800

----------------------------------------------------------------------
 newt/cli/compiler.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/9c86575e/newt/cli/compiler.go
----------------------------------------------------------------------
diff --git a/newt/cli/compiler.go b/newt/cli/compiler.go
index 94cea3a..9018805 100644
--- a/newt/cli/compiler.go
+++ b/newt/cli/compiler.go
@@ -426,13 +426,15 @@ func (c *Compiler) CompileBinaryCmd(dstFile string, options map[string]bool,
 
 	objList := c.getObjFiles(UniqueStrings(objFiles))
 
-	cmd := c.ccPath + " -o " + dstFile + " " + c.ldFlags + " " + c.Cflags
+	cmd := c.ccPath + " -o " + dstFile + " " + " " + c.Cflags
 	if c.ldResolveCircularDeps {
 		cmd += " -Wl,--start-group " + objList + " -Wl,--end-group "
 	} else {
 		cmd += " " + objList
 	}
 
+	cmd += c.ldFlags
+
 	if c.LinkerScript != "" {
 		cmd += " -T " + c.LinkerScript
 	}