1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 12:45:20 +03:00
aports/testing/firefox/fix-rust-target.patch
Ivan Delalande ac320fc40b testing/firefox: upgrade to 69.0.1, enable build on aarch64
Not too familiar with rust, Void's version of fix-third_party.patch
might be cleaner or more portable:
3a3d0ef781/srcpkgs/firefox/patches/initialize_sched_param.patch

Also this change updates the checksum of rt_linux.rs used by cargo for
validation, whereas they disable checksumming entirely:
3a3d0ef781/srcpkgs/firefox/template (L42)
2019-10-03 10:42:07 +02:00

26 lines
957 B
Diff

--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -280,9 +280,13 @@
die("Don't know how to translate {} for rustc".format(
host_or_target.alias))
+ fixed_alias = rustc_target.alias.replace("-gnu", "-musl")
+ if host_or_target.cpu != 'aarch64':
+ fixed_alias = fixed_alias.replace("-unknown-", "-alpine-")
+
# 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)
@@ -319,7 +323,7 @@
os.remove(out_path)
# This target is usable.
- return rustc_target.alias
+ return fixed_alias
return rust_target