summaryrefslogtreecommitdiff
path: root/repo/devel/rust/need-rpath.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/devel/rust/need-rpath.patch
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/devel/rust/need-rpath.patch')
-rw-r--r--repo/devel/rust/need-rpath.patch62
1 files changed, 0 insertions, 62 deletions
diff --git a/repo/devel/rust/need-rpath.patch b/repo/devel/rust/need-rpath.patch
deleted file mode 100644
index 5ab8377..0000000
--- a/repo/devel/rust/need-rpath.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Shiz <hi@shiz.me>
-Date: Thu, 20 Aug 2017 01:48:22 +0200
-Subject: [PATCH] Add need_rpath target option to force RPATH generation
-
-This adds a `need_rpath` option to the target options in order to implicitly
-have the equivalent of `-C rpath` specified by default for final products
-(executables and dynamic libraries), so that RPATHs are always added.
-
-We have to skip this step in the bootstrap phase as it does its own manual
-RPATH additions, but unfortunately there's no clean way to detect this.
-As such, we have to resort to checking the `RUSTC_BOOTSTRAP` variable.
-Hacky hacky!
-
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -379,6 +379,8 @@
- pub allows_weak_linkage: bool,
- /// Whether the linker support rpaths or not. Defaults to false.
- pub has_rpath: bool,
-+ /// Whether to force rpath support on by default. Defaults to false.
-+ pub need_rpath: bool,
- /// Whether to disable linking to the default libraries, typically corresponds
- /// to `-nodefaultlibs`. Defaults to true.
- pub no_default_libraries: bool,
-@@ -519,6 +519,7 @@
- linker_is_gnu: false,
- allows_weak_linkage: true,
- has_rpath: false,
-+ need_rpath: false,
- no_default_libraries: true,
- position_independent_executables: false,
- static_position_independent_executables: false,
-@@ -776,6 +776,7 @@
- key!(linker_is_gnu, bool);
- key!(allows_weak_linkage, bool);
- key!(has_rpath, bool);
-+ key!(need_rpath, bool);
- key!(no_default_libraries, bool);
- key!(position_independent_executables, bool);
- key!(static_position_independent_executables, bool);
-@@ -980,6 +980,7 @@
- target_option_val!(linker_is_gnu);
- target_option_val!(allows_weak_linkage);
- target_option_val!(has_rpath);
-+ target_option_val!(need_rpath);
- target_option_val!(no_default_libraries);
- target_option_val!(position_independent_executables);
- target_option_val!(static_position_independent_executables);
---- a/compiler/rustc_codegen_ssa/src/back/link.rs.orig
-+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -1675,7 +1675,10 @@
- // FIXME (#2397): At some point we want to rpath our guesses as to
- // where extern libraries might live, based on the
- // add_lib_search_paths
-- if sess.opts.cg.rpath {
-+ // XXX: hacky hacky
-+ let bootstrap = env::var("RUSTC_BOOTSTRAP").is_ok();
-+ if !bootstrap && !sess.crt_static(None) &&
-+ (sess.opts.cg.rpath || sess.target.options.need_rpath) {
- let libs = codegen_results
- .crate_info
- .used_crates