aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rust/static-pie.patch
diff options
context:
space:
mode:
authorShiz <hi@shiz.me>2017-04-27 22:06:05 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-04-28 03:02:30 +0200
commit1ccf62eb0d27f63f20055c1458f9a6ba75b6032c (patch)
treee40322336efe91be52be95bbfc69ccfc9181d11b /testing/rust/static-pie.patch
parent22c1288141f8bba1d3801cc9d756a10334fbd091 (diff)
downloadaports-1ccf62eb0d27f63f20055c1458f9a6ba75b6032c.tar.bz2
aports-1ccf62eb0d27f63f20055c1458f9a6ba75b6032c.tar.xz
testing/rust: upgrade to 1.17.0
Diffstat (limited to 'testing/rust/static-pie.patch')
-rw-r--r--testing/rust/static-pie.patch10
1 files changed, 4 insertions, 6 deletions
diff --git a/testing/rust/static-pie.patch b/testing/rust/static-pie.patch
index babfbfaf7f..4c4e4b77c1 100644
--- a/testing/rust/static-pie.patch
+++ b/testing/rust/static-pie.patch
@@ -72,21 +72,19 @@ library, just like static binaries, but more secure.
post_link_objects: Vec::new(),
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
-@@ -846,15 +846,12 @@
+@@ -914,13 +914,9 @@
if crate_type == config::CrateTypeExecutable &&
t.options.position_independent_executables {
- let empty_vec = Vec::new();
- let empty_str = String::new();
- let args = sess.opts.cg.link_args.as_ref().unwrap_or(&empty_vec);
- let more_args = &sess.opts.cg.link_arg;
- let mut args = args.iter().chain(more_args.iter()).chain(used_link_args.iter());
- let relocation_model = sess.opts.cg.relocation_model.as_ref()
- .unwrap_or(&empty_str);
+-
+ let static_pie = t.options.static_position_independent_executables;
- if (t.options.relocation_model == "pic" || *relocation_model == "pic")
+ if get_reloc_model(sess) == llvm::RelocMode::PIC
- && !args.any(|x| *x == "-static") {
-+ && (static_pie || !sess.fully_static()) {
++ && (!sess.fully_static() || static_pie) {
cmd.position_independent_executable();
}
}