firefox/firefox-91.0-rustc-1.54.patch

49 lines
1.8 KiB
Diff
Raw Normal View History

Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2021-08-14
Initial Package Version: unknown, sometimes needed for 91.0.
Upstream Status: Inapplicable
Origin: found at archlinux32.
Description: This is an old patch from Arch, they build with
clang and lto and have apparently needed this in the past.
On two of my systems (one from May 21 and one of my BLFS-10.0
systems) firefox-91.0esr FTBFS with a message that a python
check on libgkrust.a identified one networking function,
getsockname, in the rust static library. The reason why this
is now giving a problem, but only on some systems, is not
understood, but this seems to stop it.
Doug found this at
https://git.archlinux32.org/packages/tree/extra/firefox/rust-static-disable-network-test-on-static-libraries.patch
--- a/config/makefiles/rust.mk 2020-10-13 20:23:09.920635480 +0200
+++ b/config/makefiles/rust.mk 2020-10-13 20:24:02.273994137 +0200
@@ -324,17 +324,17 @@
# the chance of proxy bypasses originating from rust code.
# The check only works when rust code is built with -Clto but without MOZ_LTO_RUST_CROSS.
# Sanitizers and sancov also fail because compiler-rt hooks network functions.
-ifndef MOZ_PROFILE_GENERATE
-ifeq ($(OS_ARCH), Linux)
-ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
-ifndef MOZ_LTO_RUST_CROSS
-ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
- $(call py_action,check_binary,--target --networking $@)
-endif
-endif
-endif
-endif
-endif
+#ifndef MOZ_PROFILE_GENERATE
+#ifeq ($(OS_ARCH), Linux)
+#ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
+#ifndef MOZ_LTO_RUST
+#ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
+# $(call py_action,check_binary,--target --networking $@)
+#endif
+#endif
+#endif
+#endif
+#endif
force-cargo-library-check:
$(call CARGO_CHECK) --lib $(cargo_target_flag) $(rust_features_flag)