This libgo patch changes the go tool to default to invoking gccgo with
-O2.  That seems like the right default for people who choose to use
this toolchain.  It can be overridden with the go tool's -gccgoflags
option.  Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
Committed to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 269298)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-66ac9466852d11e968f8fd2ad6ffc7386cee49e1
+d5e4595784fb744f5fa0e0f90e77de9b5448b793
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/cmd/go/internal/work/gccgo.go
===================================================================
--- libgo/go/cmd/go/internal/work/gccgo.go      (revision 269196)
+++ libgo/go/cmd/go/internal/work/gccgo.go      (working copy)
@@ -76,7 +76,7 @@ func (tools gccgoToolchain) gc(b *Builde
                gcargs = append(gcargs, 
"-fgo-relative-import-path="+p.Internal.LocalPrefix)
        }
 
-       args := str.StringList(tools.compiler(), "-c", gcargs, "-o", ofile, 
forcedGccgoflags)
+       args := str.StringList(tools.compiler(), "-c", "-O2", gcargs, "-o", 
ofile, forcedGccgoflags)
        if importcfg != nil {
                if b.gccSupportsFlag(args[:1], "-fgo-importcfg=/dev/null") {
                        if err := b.writeFile(objdir+"importcfg", importcfg); 
err != nil {

Reply via email to