]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile, cmd/go: enable -buildmode=shared and related flags on linux/arm
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 28 Oct 2015 23:45:34 +0000 (12:45 +1300)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 28 Oct 2015 23:46:56 +0000 (23:46 +0000)
Change-Id: I20840632771a250fb279df64d394135994482af8
Reviewed-on: https://go-review.googlesource.com/14186
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/cmd/compile/internal/gc/lex.go
src/cmd/go/build.go

index 318a538c1b702f0165edd04308124fed80a51932..334b3ea715e026e651c4e8c8d986caf8bab76a68 100644 (file)
@@ -226,7 +226,7 @@ func Main() {
        if Thearch.Thechar == '6' {
                obj.Flagcount("largemodel", "generate code that assumes a large memory model", &flag_largemodel)
        }
-       if Thearch.Thechar == '6' || Thearch.Thechar == '8' || Thearch.Thechar == '9' {
+       if Thearch.Thechar == '5' || Thearch.Thechar == '6' || Thearch.Thechar == '8' || Thearch.Thechar == '9' {
                flag.BoolVar(&flag_dynlink, "dynlink", false, "support references to Go symbols defined in other shared libraries")
        }
        obj.Flagstr("cpuprofile", "write cpu profile to `file`", &cpuprofile)
index 966603ec08354d09a609443c417d8083a374627a..30af02e40114e82ead47830e32bc0b7e108d11f6 100644 (file)
@@ -388,7 +388,7 @@ func buildModeInit() {
                        codegenArg = "-fPIC"
                } else {
                        switch platform {
-                       case "linux/386", "linux/amd64":
+                       case "linux/386", "linux/amd64", "linux/arm":
                                buildAsmflags = append(buildAsmflags, "-D=shared=1")
                        default:
                                fatalf("-buildmode=shared not supported on %s\n", platform)
@@ -407,7 +407,7 @@ func buildModeInit() {
                        codegenArg = "-fPIC"
                } else {
                        switch platform {
-                       case "linux/386", "linux/amd64":
+                       case "linux/386", "linux/amd64", "linux/arm":
                                buildAsmflags = append(buildAsmflags, "-D=shared=1")
                        default:
                                fatalf("-buildmode=shared not supported on %s\n", platform)