Skip to content
This repository has been archived by the owner. It is now read-only.

Add mips64 and mips64le support #656

Open
tboerger opened this issue Feb 1, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@tboerger
Copy link

commented Feb 1, 2017

As the title say, please add specific files for these architectures. I would do that but I have no idea where we can get the matching maxMapSize and maxAllocSize.

@tboerger

This comment has been minimized.

Copy link
Author

commented Feb 1, 2017

diff --git a/vendor/github.com/boltdb/bolt/bolt_mips64.go b/vendor/github.com/boltdb/bolt/bolt_mips64.go
new file mode 100644
index 0000000..c1dfbac
--- /dev/null
+++ b/vendor/github.com/boltdb/bolt/bolt_mips64.go
@@ -0,0 +1,8 @@
+// +build mips64
+package bolt
+
+// maxMapSize represents the largest mmap size supported by Bolt.
+const maxMapSize = 0xFFFFFFFFFFFF // 256TB
+
+// maxAllocSize is the size used when creating array pointers.
+const maxAllocSize = 0x7FFFFFFF
diff --git a/vendor/github.com/boltdb/bolt/bolt_mips64le.go b/vendor/github.com/boltdb/bolt/bolt_mips64le.go
new file mode 100644
index 0000000..45be694
--- /dev/null
+++ b/vendor/github.com/boltdb/bolt/bolt_mips64le.go
@@ -0,0 +1,8 @@
+// +build mips64le
+package bolt
+
+// maxMapSize represents the largest mmap size supported by Bolt.
+const maxMapSize = 0xFFFFFFFFFFFF // 256TB
+
+// maxAllocSize is the size used when creating array pointers.
+const maxAllocSize = 0x7FFFFFFF

this helped to get it compiling, but idk if these are sane values.

lunny added a commit to go-gitea/gitea that referenced this issue Feb 2, 2017

Fix master builds on mips* again (#815)
* Use local folder for xgo

* Always do crosscompile and testing to fail early

* Added mips* values for boltdb

In order to get master building again I have applied these 2 additional
files to boltdb. This should get dropped when
boltdb/bolt#656 gets solved.
@bsegault

This comment has been minimized.

Copy link

commented Feb 17, 2017

I also have the same issue for misp32 and misple. I fixed the compilation in a similar way as @tboerger did, but I came accross issue #646 (with undefined madvise function) on run.
Sadly, I don't have a clue about what to change to make this work :-/

EDIT, I just noticed that #663 should answer the first part of my issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.