diff options
author | Ayke van Laethem <[email protected]> | 2024-06-24 20:22:16 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-07-22 16:21:26 +0200 |
commit | 725518f007663d6742f1e92ebc2d6d88418ccf61 (patch) | |
tree | 01489f64270419ddb28520cd040b24babddab475 /builder | |
parent | 04d1261f8a48b18a4404c52f858c35c0668316cd (diff) | |
download | tinygo-725518f007663d6742f1e92ebc2d6d88418ccf61.tar.gz tinygo-725518f007663d6742f1e92ebc2d6d88418ccf61.zip |
all: add linux/mipsle support
This adds linux/mipsle (little endian Mips) support to TinyGo.
It also adds experimental linux/mips (big-endian) support. It doesn't
quite work yet, some parts of the standard library (like the reflect
package) currently seem to assume a little-endian system.
Diffstat (limited to 'builder')
-rw-r--r-- | builder/builder_test.go | 2 | ||||
-rw-r--r-- | builder/library.go | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/builder/builder_test.go b/builder/builder_test.go index c7b863873..3fc166c5c 100644 --- a/builder/builder_test.go +++ b/builder/builder_test.go @@ -57,6 +57,8 @@ func TestClangAttributes(t *testing.T) { {GOOS: "linux", GOARCH: "arm", GOARM: "6"}, {GOOS: "linux", GOARCH: "arm", GOARM: "7"}, {GOOS: "linux", GOARCH: "arm64"}, + {GOOS: "linux", GOARCH: "mips"}, + {GOOS: "linux", GOARCH: "mipsle"}, {GOOS: "darwin", GOARCH: "amd64"}, {GOOS: "darwin", GOARCH: "arm64"}, {GOOS: "windows", GOARCH: "amd64"}, diff --git a/builder/library.go b/builder/library.go index e0ac31a74..83fa3db94 100644 --- a/builder/library.go +++ b/builder/library.go @@ -182,6 +182,9 @@ func (l *Library) load(config *compileopts.Config, tmpdir string) (job *compileJ if strings.HasPrefix(target, "riscv64-") { args = append(args, "-march=rv64gc") } + if strings.HasPrefix(target, "mips") { + args = append(args, "-fno-pic") + } var once sync.Once |