diff options
| author | Joshua M. Clulow <jmc@oxide.computer> | 2020-07-08 23:28:16 +0000 |
|---|---|---|
| committer | Joshua M. Clulow <jmc@oxide.computer> | 2020-07-08 23:36:05 +0000 |
| commit | 7fb421bd77e37505045bef424b962a0bd9af6c4e (patch) | |
| tree | f55b504063ad13bc087d5e53bbc9ebc413afd886 /src | |
| parent | 1d919c9377f4602d991ca1c7ba852e7555943740 (diff) | |
| download | rust-7fb421bd77e37505045bef424b962a0bd9af6c4e.tar.gz rust-7fb421bd77e37505045bef424b962a0bd9af6c4e.zip | |
linker: illumos ld does not support --eh-frame-hdr
As of rust-lang/rust#73564, the --eh-frame-hdr flag is unconditionally passed to linkers on many platforms. The illumos link editor does not currently support this flag. The linker machinery in the Rust toolchain currently seems to use the (potentially cross-compiled) target to choose linker flags, rather than looking at what might be running on the build system. Disabling the flag for all illumos/Solaris targets seems like the best we can do for now without more serious surgery.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_codegen_ssa/back/linker.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs index 54f55c806d0..3ee428bd25d 100644 --- a/src/librustc_codegen_ssa/back/linker.rs +++ b/src/librustc_codegen_ssa/back/linker.rs @@ -621,9 +621,9 @@ impl<'a> Linker for GccLinker<'a> { // Some versions of `gcc` add it implicitly, some (e.g. `musl-gcc`) don't, // so we just always add it. fn add_eh_frame_header(&mut self) { - // The condition here is "uses ELF" basically. if !self.sess.target.target.options.is_like_osx && !self.sess.target.target.options.is_like_windows + && !self.sess.target.target.options.is_like_solaris && self.sess.target.target.target_os != "uefi" { self.linker_arg("--eh-frame-hdr"); |
