summaryrefslogtreecommitdiff
path: root/build-rust-ppc64le.patch
diff options
context:
space:
mode:
Diffstat (limited to 'build-rust-ppc64le.patch')
-rw-r--r--build-rust-ppc64le.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/build-rust-ppc64le.patch b/build-rust-ppc64le.patch
new file mode 100644
index 0000000..cf7f698
--- /dev/null
+++ b/build-rust-ppc64le.patch
@@ -0,0 +1,30 @@
+diff -up firefox-54.0/build/mozconfig.rust firefox-54.0/build/mozconfig
+diff -up firefox-54.0/build/moz.configure/rust.configure.rust firefox-54.0/build/moz.configure/rust.configure
+--- firefox-54.0/build/moz.configure/rust.configure.rust 2017-06-09 22:29:36.273878229 +0200
++++ firefox-54.0/build/moz.configure/rust.configure 2017-06-09 23:00:49.330699698 +0200
+@@ -151,6 +150,9 @@ def rust_triple_alias(host_or_target):
+ ('sparc64', 'Linux'): 'sparc64-unknown-linux-gnu',
+ ('x86', 'Linux'): 'i686-unknown-linux-gnu',
+ ('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu',
++ ('ppc64le', 'Linux'): 'powerpc64le-unknown-linux-gnu',
++ ('ppc64', 'Linux'): 'powerpc64-unknown-linux-gnu',
++ ('s390x', 'Linux'): 's390x-unknown-linux-gnu',
+ # OS X
+ ('x86', 'OSX'): 'i686-apple-darwin',
+ ('x86_64', 'OSX'): 'x86_64-apple-darwin',
+@@ -170,8 +172,10 @@ def rust_triple_alias(host_or_target):
+ ('x86_64', 'WINNT'): 'x86_64-pc-windows-msvc',
+ }.get((host_or_target.cpu, os_or_kernel), None)
+
++ if (rustc_target == 'powerpc64-unknown-linux-gnu' and host_or_target.endianness == 'little'):
++ rustc_target = 'powerpc64le-unknown-linux-gnu'
+ if rustc_target is None:
+- die("Don't know how to translate {} for rustc".format(host_or_target.alias))
++ die("Don't know how to translate {} for rustc, cpu: {}, os: {}".format(target.alias, target.cpu, os_or_kernel))
+
+ # Check to see whether our rustc has a reasonably functional stdlib
+ # for our chosen target.
+diff -up firefox-54.0/third_party/rust/aho-corasick/ctags.rust firefox-54.0/third_party/rust/aho-corasick/ctags
+diff -up firefox-54.0/third_party/rust/memchr/ctags.rust firefox-54.0/third_party/rust/memchr/ctags
+diff -up firefox-54.0/third_party/rust/utf8-ranges/ctags.rust firefox-54.0/third_party/rust/utf8-ranges/ctags
+diff -up firefox-54.0/third_party/rust/walkdir/ctags.rust firefox-54.0/third_party/rust/walkdir/ctags
bgstack15