On 12/17/2012 09:33 PM, Ian Lance Taylor wrote:
> Conventionally two flags are used for the GCC linker: LDFLAGS and
> LIBS. We could use a single flag with the go tool, but if so it has
> to come after all the libraries. That is, change
> return b.run(".", p.ImportPath, "gccgo", "-o", out, buildGccgoflags,
> ofiles, "-Wl,-(", ldflags, "-Wl,-)")
> to
> return b.run(".", p.ImportPath, "gccgo", "-o", out, ofiles, "-Wl,-(",
> ldflags, "-Wl,-)", buildGccgoflags)
> in gccgcToolchain.ld in src/cmd/go/build.go.
>
> Do you want to try that?
>
> Ian
My application links against 3 libraries, and moving the specified flags
after the object files works fine.
So, I can confirm that this 'fix' solves my linking problem.
Does this affect any other compilation work, or should we expect this to
become standard in the go tools?
Thanks!
Timon