1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/testing/firefox/fix-rust-target.patch
2018-01-25 15:56:25 +00:00

24 lines
873 B
Diff

--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -181,9 +181,11 @@
die("Don't know how to translate {} for rustc".format(
host_or_target.alias))
+ fixed_alias = rustc_target.alias.replace("-unknown-", "-alpine-").replace("-gnu", "-musl")
+
# Check to see whether our rustc has a reasonably functional stdlib
# for our chosen target.
- target_arg = '--target=' + rustc_target.alias
+ target_arg = '--target=' + fixed_alias
in_fd, in_path = mkstemp(prefix='conftest', suffix='.rs')
out_fd, out_path = mkstemp(prefix='conftest', suffix='.rlib')
os.close(out_fd)
@@ -220,7 +222,7 @@
os.remove(out_path)
# This target is usable.
- return rustc_target.alias
+ return fixed_alias
return rust_target