diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-07-06 10:47:07 +0200 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-07 17:29:18 -0300 |
commit | 6af1d328969dfa4d67c7bfc483e2c7c344234045 (patch) | |
tree | 0037ff3a3bff71f1bca9854aeecad47567147711 | |
parent | 4a0700ff403b63d8eb3257ebdf33ca51eed294de (diff) | |
download | aports-6af1d328969dfa4d67c7bfc483e2c7c344234045.tar.bz2 aports-6af1d328969dfa4d67c7bfc483e2c7c344234045.tar.xz |
community/rust: upgrade to 1.36.0
* Update alpine-target.patch to fix the triplet on armhf and add the armv7 and ppc64le
triplets. This should have been done in 69851bdae1177246337f51a35734e93f1fd7e3d3,
but has been forgotten.
* Remove the following patches:
* llvm-with-ffi.patch -> only required when statically linking LLVM
* bootstrap-tool-respect-tool-config.patch -> plain outdated, not required anymore
-rw-r--r-- | community/rust/APKBUILD | 67 | ||||
-rw-r--r-- | community/rust/alpine-target.patch | 85 | ||||
-rw-r--r-- | community/rust/bootstrap-tool-respect-tool-config.patch | 26 | ||||
-rw-r--r-- | community/rust/llvm-with-ffi.patch | 16 | ||||
-rw-r--r-- | community/rust/minimize-rpath.patch | 4 | ||||
-rw-r--r-- | community/rust/musl-fix-static-linking.patch | 4 | ||||
-rw-r--r-- | community/rust/need-rpath.patch | 4 | ||||
-rw-r--r-- | community/rust/static-pie.patch | 12 |
8 files changed, 105 insertions, 113 deletions
diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD index a03a123171..6f29a88f91 100644 --- a/community/rust/APKBUILD +++ b/community/rust/APKBUILD @@ -4,9 +4,9 @@ # Contributor: Jeizsm <jeizsm@gmail.com> # Maintainer: Rasmus Thomsen <oss@cogitri.dev> pkgname=rust -pkgver=1.35.0 +pkgver=1.36.0 _llvmver=8 -_bootver=1.34.0 +_bootver=1.35.0 pkgrel=0 pkgdesc="The Rust Programming Language" url="https://www.rust-lang.org" @@ -21,32 +21,22 @@ depends="$pkgname-stdlib=$pkgver-r$pkgrel gcc llvm-libunwind-dev musl-dev" # * Rust is self-hosted, so you need rustc (and cargo) to build rustc... # The last revision of this abuild that does not depend on itself (uses # prebuilt rustc and cargo) is 8cb3112594f10a8cee5b5412c28a846acb63167f. -# * libffi-dev is needed just because we compile llvm with LLVM_ENABLE_FFI. makedepends=" cmake curl-dev file - libffi-dev libgit2-dev openssl-dev - libssh2-dev llvm$_llvmver-dev llvm$_llvmver-test-utils python2 tar zlib-dev coreutils + rust-bootstrap=>$_bootver + cargo-bootstrap " -case "$CARCH" in - x86_64) - makedepends="$makedepends - rust-bootstrap=>$_bootver - cargo-bootstrap - " - ;; -esac - # XXX: This is a hack to allow this abuild to depend on itself. Adding "rust" # to makedepends would not work, because abuild implicitly removes $pkgname # and $subpackages from the abuild's dependencies. @@ -68,14 +58,9 @@ subpackages=" cargo-doc:_cargo_doc:noarch " source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz - https://exp.exqa.de/alpine-rust/rust-armhf-$pkgver.tar.xz - https://exp.exqa.de/alpine-rust/rust-armv7-$pkgver.tar.xz - rust-aarch64-$pkgver.tar.xz::https://exp.exqa.de/alpine-rust/rust-aarch64-$pkgver.tar.xz.new - https://exp.exqa.de/alpine-rust/rust-ppc64le-$pkgver.tar.xz - https://exp.exqa.de/alpine-rust/rust-x86-$pkgver.tar.xz + https://exp.exqa.de/alpine-rust/rust-aarch64-$_bootver.tar.xz musl-fix-static-linking.patch musl-fix-linux_musl_base.patch - llvm-with-ffi.patch static-pie.patch need-rpath.patch minimize-rpath.patch @@ -83,7 +68,6 @@ source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz alpine-change-rpath-to-rustlib.patch alpine-target.patch install-template-shebang.patch - bootstrap-tool-respect-tool-config.patch cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch check-rustc cargo-skip-broken-tests.patch @@ -98,39 +82,26 @@ builddir="$srcdir/rustc-$pkgver-src" # rustc knows about them case "$CARCH" in armv7) - export LD_LIBRARY_PATH="$srcdir/rust-armv7/lib" - export PATH="$srcdir/rust-armv7/bin:$PATH" _build="armv7-unknown-linux-musleabihf" _target="$_build" ;; armhf) - export LD_LIBRARY_PATH="$srcdir/rust-armhf/lib" - export PATH="$srcdir/rust-armhf/bin:$PATH" _build="arm-unknown-linux-musleabihf" _target="$_build" ;; - aarch64) - export LD_LIBRARY_PATH="$srcdir/rust-aarch64/usr/lib" - export PATH="$srcdir/rust-aarch64/usr/bin:$PATH" - _build="aarch64-unknown-linux-musl" - _target="$_build" - ;; ppc64le) - export LD_LIBRARY_PATH="$srcdir/rust-ppc64le/lib" - export PATH="$srcdir/rust-ppc64le/bin:$PATH" _build="powerpc64le-unknown-linux-musl" _target="$_build" ;; - x86) - export LD_LIBRARY_PATH="$srcdir/rust-x86/lib" - export PATH="$srcdir/rust-x86/bin:$PATH" - _build="i686-unknown-linux-musl" + aarch64) + export LD_LIBRARY_PATH="$srcdir/rust-aarch64/usr/lib" + export PATH="$srcdir/rust-aarch64/usr/bin:$PATH" + _build="aarch64-unknown-linux-musl" _target="$_build" ;; *) _build="$CBUILD" _target="$CTARGET" - ;; esac _rlibdir="usr/lib/rustlib/$_target/lib" @@ -152,8 +123,8 @@ prepare() { sed -i /LD_LIBRARY_PATH/d src/bootstrap/bootstrap.py + # to dynamically link against musl _clear_vendor_checksums libc - _clear_vendor_checksums lzma-sys # Remove bundled dependencies. rm -Rf src/llvm/ @@ -329,23 +300,17 @@ _mv() { mv "$@" } -sha512sums="b23e6e221bf96e8621ea7aba2e8fc686c2ba1ae334072f13f1f0d4b0ae909632f511a9c62fdcc29c7467af931269020298f799064651b676e387dd3e6dfe6e8e rustc-1.35.0-src.tar.gz -34d25ac839b34ae859a3dc44f4fee85ab84b944c973a12982f089a778f7aa8bbea0285428646993821e3395cd75c7b25f626b02934812e14d8422c9c6005a8cd rust-armhf-1.35.0.tar.xz -50c391d141de432487058a56479fb72640319c040118680c532610454c007085caaa4b435c98be493040ee7fcf86b2451ee765e0cac8dbe7d8a6864a11b6812a rust-armv7-1.35.0.tar.xz +sha512sums="f0bd470a98d2b044c2af40d0c19838c3f7410c4acea5b2f8b5bcf0ca8294917986e7e5aed7d00ea5520e8b03d7130f993e75125576c693ba571feae0d0b961e9 rustc-1.36.0-src.tar.gz e22bccc770715aaf2a42ea2a09ef24df4f7939f2bdd529538a570db817dcd43e8f7e2ac45412970f1e2aed754d84043a950357e5045172ac64f3aca1c1e86f98 rust-aarch64-1.35.0.tar.xz -f644f96d80d0fa5b068d826d6fbb9b3814c8ddab62e634283fb7f19fe48570cf248d1be2544d2065339780129f18db4c0a71970d0f597a0d198bd3208210b9ac rust-ppc64le-1.35.0.tar.xz -ee17396c183f55b2de74d23c6811cd0682ecdfc99ce80242a7022860d5d96f6331edd97afec511985c4808bfb4bd6d2ebc23d74e1d6fa6c69cf70472bda29ef2 rust-x86-1.35.0.tar.xz -6713d0d0ccac6b17ed47e486c6d74d1f913887bf88d42527576188fa98063a33a1ea903967847d52126b996f965577f1311344d6e57063b1625221847290a0ed musl-fix-static-linking.patch +f5aa0124618acc0176dc30b2fab6d15327c1978db55ccf2074d1db88e0a1bbdaebc0bcdcfd5a8554964edb51be9830c6db64bc99f237463488a45c9804170a4e musl-fix-static-linking.patch a2871fa75fb63570031eda80390461a137fe31ba82bf253caeabf3fb6673b4c80b535917dde139a300fb6d5f8c14fe09c8f7aaf4a506ef5e837540cf00aaa977 musl-fix-linux_musl_base.patch -e40d41a6dc5d400d6672f1836cd5b9e00391f7beb52e872d87db76bc95a606ce6aaae737a0256a1e5fba77c83bb223818d214dbe87028d47be65fb43c101595c llvm-with-ffi.patch -5490ba8d78e55ce24c1a4f152604a38066079f9fec0bb41184c5ef279092b45ecc67cba00995c9a3f594b5eacee88a330c6836d755b5c895b87a64579d33febe static-pie.patch -b7931281bfc1deb25c72494b4111500fe46c2e551ca32cafdfcc9a1bff657ca0b2bfaeea52260b4604678403fc76a708c2416bfc9e5bdac04475c4a70602295b need-rpath.patch -9b5ac7dc9acc644a7415e0510a97910b3b7191e858b03d891532631d3f64427792b5b482fe6c748627209993349e9246551b7ebbd462565ac7460fd1652ee38f minimize-rpath.patch +97e81c57af93df550577f41d795185a9eb0c37528776c250076cc57f06c87e81139eb71cd6b6a4730528511821ae50c304d7deb534d6422cd08bb44193ae605d static-pie.patch +d4659b56dbf1218da98b995a0a89a8cfd069dd94b3e9aef4aee987484d96fc8b92f6d695ea4123eff26711961f2db2f7324bf5b4043f41722cd89581aac97f1c need-rpath.patch +7c190c0d47934d91605f89ec2caef597477b154f59e66e032b986cfc2e1db4e5b3fc5cdc1f0178f064b4ac314f692569533a45640b1578aadead9fa6ab999f73 minimize-rpath.patch 35e0619672843d9dd41df4a086404a59b57c12fa014e42d06102bc3856a96ed021e716f9d581ec5c89444acbaedd3edcd2b8a85576df3bb4451c0edde3afbba5 alpine-move-py-scripts-to-share.patch 4f5746acb08c18f749691a8455cc81ea2e9a361621790b006b884c9c895ab9e51a001b6638bed071a9af5c232ed8d1b43c58260839a3f6dce4eec3f495ce4348 alpine-change-rpath-to-rustlib.patch -616e3d036e310d61f5a212aa25f46b8fa5c31ad637ba774123334d685684f2c87b25b40cdb33dc08e660a9a7593fee29aa55d0f166e6a9173236cb3a6af408aa alpine-target.patch +4d4262efd3b679722070268e2d054c433d395200797bb0b45dbf73580d6fe0784b56a3462154a6ada28cd2bb1396dea15516b1e7262e6901feaa8a8ae7ebbb18 alpine-target.patch 7d59258d4462eba0207739a5c0c8baf1f19d9a396e5547bb4d59d700eb94d50ba6add2e523f3e94e29e993821018594625ea4ac86304fb58f7f8c82622a26ab0 install-template-shebang.patch -c2ccab15d48c11cc3af549a3944ca0d29cb3790345468f4f3779e5ac931554dea603e5523281fc391ba4a555ee468b516961c4cb8ecee007eadacf114f3d8758 bootstrap-tool-respect-tool-config.patch 3d6f027088e1ec189ce864bf5ed150ccad8be5d9fc0973f1b4d202eec6eab865834403335a9f0765bbfa54638aed7f5d5f2183ba9dfeab9f5bc4ef48111a8427 cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125 check-rustc afca9b5524e270b6ddad4b2c99bba9a5f156a2411b04a9ca5802b185b50420de70555bb2526dcb4d5b12b29ff30afa2fe461d1de83b5345dd8e4ccf52e875c3f cargo-skip-broken-tests.patch diff --git a/community/rust/alpine-target.patch b/community/rust/alpine-target.patch index baffdede76..6b8f9da678 100644 --- a/community/rust/alpine-target.patch +++ b/community/rust/alpine-target.patch @@ -1,4 +1,4 @@ -From: Shiz <hi@shiz.me> +From: Shiz <hi@shiz.me>, updated by Rasmus Thomsen <oss@cogitri.dev> on 6th of July 2019 Date: Thu, 20 Aug 2017 01:52:36 +0200 Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200 Subject: [PATCH] Add Alpine targets @@ -7,16 +7,18 @@ This adds `$arch-alpine-linux-musl` targets to Rust to encode our toolchain and distribution-specific quirks instead of polluting the main musl target of `$arch-unknown-linux-musl`. ---- a/src/librustc_target/spec/mod.rs.orig 2019-05-23 21:05:45.173347119 +0200 -+++ b/src/librustc_target/spec/mod.rs 2019-05-23 21:06:39.006681699 +0200 -@@ -328,6 +328,10 @@ +--- a/src/librustc_target/spec/mod.rs.orig 2019-05-23 21:05:45.173347119 +0200 ++++ b/src/librustc_target/spec/mod.rs 2019-05-23 21:06:39.006681699 +0200 +@@ -328,6 +328,12 @@ macro_rules! supported_targets { } supported_targets! { + ("i586-alpine-linux-musl", i586_alpine_linux_musl), + ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl), + ("aarch64-alpine-linux-musl", aarch64_alpine_linux_musl), -+ ("arm-alpine-linux-musleabihf", arm_alpine_linux_musleabihf), ++ ("armv6-alpine-linux-musleabihf", armv6_alpine_linux_musleabihf), ++ ("armv7-alpine-linux-musleabihf", armv7_alpine_linux_musleabihf), ++ ("powerpc64le-alpine-linux-musl", powerpc64le_alpine_linux_musl), ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), @@ -136,8 +138,8 @@ and distribution-specific quirks instead of polluting the main musl target of + }) +} --- /dev/null -+++ b/src/librustc_target/spec/arm_alpine_linux_musleabihf.rs -@@ -0,0 +1,40 @@ ++++ b/src/librustc_target/spec/armv6_alpine_linux_musleabihf.rs +@@ -0,0 +1,41 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. @@ -174,6 +176,75 @@ and distribution-specific quirks instead of polluting the main musl target of + linker_flavor: LinkerFlavor::Gcc, + options: TargetOptions { + abi_blacklist: super::arm_base::abi_blacklist(), ++ target_mcount: "\u{1}mcount".to_string(), ++ .. base ++ }, ++ }) ++} +--- /dev/null ++++ b/src/librustc_target/spec/armv7_alpine_linux_musleabihf.rs +@@ -0,0 +1,34 @@ ++use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; ++ ++// This target is for musl Linux on ARMv7 without thumb-mode or NEON. ++ ++pub fn target() -> TargetResult { ++ let mut base = super::linux_musl_base::opts(); ++ base.crt_static_default = false; ++ base.static_position_independent_executables = true; ++ base.need_rpath = true; ++ ++ Ok(Target { ++ llvm_target: "armv7-unknown-linux-muslabihf".to_string(), ++ target_endian: "little".to_string(), ++ target_pointer_width: "32".to_string(), ++ target_c_int_width: "32".to_string(), ++ data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), ++ arch: "arm".to_string(), ++ target_os: "linux".to_string(), ++ target_env: "musl".to_string(), ++ target_vendor: "alpine".to_string(), ++ linker_flavor: LinkerFlavor::Gcc, ++ ++ // Most of these settings are copied from the armv7_unknown_linux_gnueabihf ++ // target. ++ options: TargetOptions { ++ features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(), ++ cpu: "generic".to_string(), ++ max_atomic_width: Some(64), ++ abi_blacklist: super::arm_base::abi_blacklist(), ++ target_mcount: "\u{1}mcount".to_string(), ++ .. base ++ } ++ }) ++} +--- /dev/null ++++ b/src/librustc_target/spec/powerpc64le_alpine_linux_musl.rs +@@ -0,0 +1,28 @@ ++use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::linux_musl_base::opts(); ++ base.cpu = "ppc64le".to_string(); ++ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); ++ base.max_atomic_width = Some(64); ++ base.crt_static_default = false; ++ base.static_position_independent_executables = true; ++ base.need_rpath = true; ++ ++ Ok(Target { ++ llvm_target: "powerpc64le-alpine-linux-musl".to_string(), ++ target_endian: "little".to_string(), ++ target_pointer_width: "64".to_string(), ++ target_c_int_width: "32".to_string(), ++ data_layout: "e-m:e-i64:64-n32:64".to_string(), ++ arch: "powerpc64".to_string(), ++ target_os: "linux".to_string(), ++ target_env: "musl".to_string(), ++ target_vendor: "alpine".to_string(), ++ linker_flavor: LinkerFlavor::Gcc, ++ options: TargetOptions { ++ target_mcount: "_mcount".to_string(), + .. base + }, + }) diff --git a/community/rust/bootstrap-tool-respect-tool-config.patch b/community/rust/bootstrap-tool-respect-tool-config.patch deleted file mode 100644 index 958ef29e5c..0000000000 --- a/community/rust/bootstrap-tool-respect-tool-config.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Jakub Jirutka <jakub@jirutka.cz> -Date: Sun, 20 May 2018 14:58:00 +0200 -Subject: [PATCH] Fix tool builder to respect build.tools config - ---- a/src/bootstrap/tool.rs -+++ b/src/bootstrap/tool.rs -@@ -464,7 +464,8 @@ - - fn should_run(run: ShouldRun) -> ShouldRun { - let builder = run.builder; -- run.path("src/tools/cargo").default_condition(builder.config.extended) -+ run.path("src/tools/cargo").default_condition(builder.config.extended -+ && builder.config.tools.as_ref().map_or(true, |t| t.contains("cargo"))) - } - - fn make_run(run: RunConfig) { -@@ -518,7 +519,8 @@ - - fn should_run(run: ShouldRun) -> ShouldRun { - let builder = run.builder; -- run.path($path).default_condition(builder.config.extended) -+ run.path($path).default_condition(builder.config.extended -+ && builder.config.tools.as_ref().map_or(true, |t| t.contains($tool_name))) - } - - fn make_run(run: RunConfig) { diff --git a/community/rust/llvm-with-ffi.patch b/community/rust/llvm-with-ffi.patch deleted file mode 100644 index b3dd209dc9..0000000000 --- a/community/rust/llvm-with-ffi.patch +++ /dev/null @@ -1,16 +0,0 @@ -From: Jakub Jirutka <jakub@jirutka.cz> -Date: Thu, 04 Aug 2016 17:53:00 +0200 -Subject: [PATCH] Workaround for external LLVM built with LLVM_ENABLE_FFI - -Workaround for problem with LLVM_ENABLE_FFI described in -https://github.com/rust-lang/rust/issues/34486. - ---- a/src/librustc_llvm/lib.rs -+++ b/src/librustc_llvm/lib.rs -@@ -422,3 +422,6 @@ - } - } - } -+ -+#[link(name = "ffi")] -+extern {} diff --git a/community/rust/minimize-rpath.patch b/community/rust/minimize-rpath.patch index 1d89d7d5af..442e6698e7 100644 --- a/community/rust/minimize-rpath.patch +++ b/community/rust/minimize-rpath.patch @@ -7,8 +7,8 @@ relative path to the install prefix. This is unnecessary, so we add the install prefix to a list of absolute paths to omit in the relative path generation, and skip it there. ---- a/src/librustc_codegen_llvm/back/rpath.rs -+++ b/src/librustc_codegen_llvm/back/rpath.rs +--- a/src/librustc_codegen_ssa/back/rpath.rs ++++ b/src/librustc_codegen_ssa/back/rpath.rs @@ -59,13 +59,14 @@ debug!(" {:?}", libpath.display()); } diff --git a/community/rust/musl-fix-static-linking.patch b/community/rust/musl-fix-static-linking.patch index b1e6a694ac..820aa52cb3 100644 --- a/community/rust/musl-fix-static-linking.patch +++ b/community/rust/musl-fix-static-linking.patch @@ -10,8 +10,8 @@ Finally, if no linking preference is given for native libraries (`NativeLibraryKind::NativeUnknown`), they are linked statically if full static linking is requested, instead of dynamically as before. ---- a/src/librustc_codegen_llvm/back/link.rs -+++ b/src/librustc_codegen_llvm/back/link.rs +--- a/src/librustc_codegen_ssa/back/link.rs ++++ b/src/librustc_codegen_ssa/back/link.rs @@ -1218,13 +1218,13 @@ fn add_local_native_libraries(cmd: &mut dyn Linker, let search_path = archive_search_paths(sess); for lib in relevant_libs { diff --git a/community/rust/need-rpath.patch b/community/rust/need-rpath.patch index 6a997c41b6..1ec60098db 100644 --- a/community/rust/need-rpath.patch +++ b/community/rust/need-rpath.patch @@ -46,8 +46,8 @@ Hacky hacky! target_option_val!(no_default_libraries); target_option_val!(position_independent_executables); target_option_val!(static_position_independent_executables); ---- a/src/librustc_codegen_llvm/back/link.rs.orig 2019-05-23 17:57:22.587173355 +0200 -+++ b/src/librustc_codegen_llvm/back/link.rs 2019-05-23 17:58:28.833841560 +0200 +--- a/src/librustc_codegen_ssa/back/link.rs.orig 2019-05-23 17:57:22.587173355 +0200 ++++ b/src/librustc_codegen_ssa/back/link.rs 2019-05-23 17:58:28.833841560 +0200 @@ -1018,7 +1018,10 @@ // FIXME (#2397): At some point we want to rpath our guesses as to // where extern libraries might live, based on the diff --git a/community/rust/static-pie.patch b/community/rust/static-pie.patch index 4f861466c1..4d0021aba5 100644 --- a/community/rust/static-pie.patch +++ b/community/rust/static-pie.patch @@ -72,9 +72,9 @@ library, just like static binaries, but more secure. pre_link_objects_exe: Vec::new(), pre_link_objects_dll: Vec::new(), post_link_objects: Vec::new(), ---- a/src/librustc_codegen_llvm/back/link.rs -+++ b/src/librustc_codegen_llvm/back/link.rs -@@ -994,13 +994,9 @@ +--- a/src/librustc_codegen_ssa/back/link.rs ++++ b/src/librustc_codegen_ssa/back/link.rs +@@ -1058,12 +1058,7 @@ let mut position_independent_executable = false; if t.options.position_independent_executables { @@ -83,10 +83,8 @@ library, just like static binaries, but more secure. - let more_args = &sess.opts.cg.link_arg; - let mut args = args.iter().chain(more_args.iter()).chain(used_link_args.iter()); - -+ let static_pie = t.options.static_position_independent_executables; - if get_reloc_model(sess) == llvm::RelocMode::PIC -- && !sess.crt_static() && !args.any(|x| *x == "-static") { -+ && (!sess.crt_static() || static_pie) { +- if is_pic(sess) && !sess.crt_static() && !args.any(|x| *x == "-static") { ++ if is_pic(sess) && (!sess.crt_static() || t.options.static_position_independent_executables) { position_independent_executable = true; } } |