]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go, runtime: express armv5t architecture constraint differently
authorCarl Shapiro <cshapiro@google.com>
Tue, 8 Oct 2013 17:40:51 +0000 (10:40 -0700)
committerCarl Shapiro <cshapiro@google.com>
Tue, 8 Oct 2013 17:40:51 +0000 (10:40 -0700)
Instead of adding an -march=armv5t flag to the gcc command
line, the same effect is obtained with an ".arch armv5t"
pseudo op in the assembly file that uses armv5t instructions.

R=golang-dev, iant, dave
CC=golang-dev
https://golang.org/cl/14511044

src/cmd/go/build.go
src/pkg/runtime/cgo/gcc_arm.S

index cfbf30d918b33f0382fa4f006be0dfc471a8c018..2ce968a46dc99d464410a8bcba264b6c2ba244b7 100644 (file)
@@ -1903,7 +1903,7 @@ func (b *builder) gccArchArgs() []string {
        case "6":
                return []string{"-m64"}
        case "5":
-               return []string{"-marm", "-march=armv5t"} // not thumb
+               return []string{"-marm"} // not thumb
        }
        return nil
 }
index cfe899b1d287b529785789ef0695f8a2135a8ee0..17e98d91f62748b9eaa505e845305de2e81c6976 100644 (file)
 #define EXT(s) s
 #endif
 
+/*
+ * Because the assembler might target an earlier revision of the ISA
+ * by default, we must explicitly specify the ISA revision to ensure
+ * BLX is recognized as a valid instruction.
+ */    
+.arch armv5t
+
 /*
  * void crosscall_arm2(void (*fn)(void), void (*setmg_gcc)(void *m, void *g), void *m, void *g)
  *