-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Default relax_elf_relocations to true #106511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
|
These commits modify compiler targets. |
10cba1c
to
9a9ba97
Compare
This comment has been minimized.
This comment has been minimized.
are due to the current I try to https://sourceware.org/pipermail/binutils/2023-January/125507.html despite closed https://sourceware.org/bugzilla/show_bug.cgi?id=24784 . |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 9a9ba97d5d67de51d8acc68d546d97f74bc04b92 with merge e0dceaae06dc2a3d7083c69129e9d7826eb21aae... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e0dceaae06dc2a3d7083c69129e9d7826eb21aae): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
Minor code size improvements, no notable effects otherwise. It sounds like we can't enable this for i386 right now, so possibly enable it only for x86_64 targets? What kind of linker requirement does that impose (i.e. which is the earliest version of ld.bfd, ld.golf, ld.lld that reliably supports this and how old are they?) |
I want to avoid the configuration complexity mess. This should just be the default for both x86-32 and x86-64. I believe the i386 issue will be resolved if we restore the |
r? @nikic |
Do you know whether there is a binutils bug for this? I found https://sourceware.org/bugzilla/show_bug.cgi?id=9938, but that's really old. From https://sourceware.org/pipermail/binutils/2023-January/125506.html it seems like maintainers are arguing that |
I don't know. https://sourceware.org/bugzilla/show_bug.cgi?id=24784 applies to x86-32 as well. My stance is pretty clear: (a) default to |
But that issue is about the |
Switching to waiting on author as I think it was reviewed. Feel free to request a review with @rustbot author |
The current old 2.25 seems to cause trouble to rust-lang#106511. Install texinfo to dist-x86_64-freebsd/Dockerfile like other containers to fix ``` MAKEINFO doc/bfd.info /binutils/binutils-2.40/missing: 81: /binutils/binutils-2.40/missing: makeinfo: not found WARNING: 'makeinfo' is missing on your system. ```
ci: Update FreeBSD and illumos binutils to 2.40 The current old 2.25 seems to cause trouble to rust-lang#106511. Install texinfo to dist-x86_64-freebsd/Dockerfile like other containers to fix ``` MAKEINFO doc/bfd.info /binutils/binutils-2.40/missing: 81: /binutils/binutils-2.40/missing: makeinfo: not found WARNING: 'makeinfo' is missing on your system. ``` --- https://www.freshports.org/devel/binutils uses 2.40 for FreeBSD 12.x as well. `@nikic`
Rebased after upgrading binutils for FreeBSD and Illumos |
This option tells LLVM to emit relaxable relocation types R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX/R_386_GOT32X in applicable cases. True matches Clang's CMake default since 2020-08 [1] and latest LLVM default[2]. This also works around a GNU ld<2.41 issue[3] when using general-dynamic/local-dynamic TLS models in `-Z plt=no` mode with latest LLVM. [1]: llvm/llvm-project@c41a18c [2]: llvm/llvm-project@2aedfdd [3]: https://sourceware.org/bugzilla/show_bug.cgi?id=24784
@bors r+ rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4410868): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 635.214s -> 635.876s (0.10%) |
This commit has been confirmed to introduce a regression with the mold linker. See https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/SIGILL.20in.20build-script-build.20with.20nightly-2023-08-25/near/387506479. |
This reverts commit 4410868, reversing changes made to 249595b. This causes linker failures with the binutils version used by cross (rust-lang#115239), as well as miscompilations when using the mold linker.
…piler-errors Revert relax_elf_relocations default change This reverts commit 4410868 (rust-lang#106511). The change caused linker failures with the binutils version used by cross (rust-lang#115239), as well as miscompilations when using the mold linker (https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/SIGILL.20in.20build-script-build.20with.20nightly-2023-08-25/near/387506479).
…ler-errors Revert relax_elf_relocations default change This reverts commit 4410868 (rust-lang#106511). The change caused linker failures with the binutils version used by cross (rust-lang#115239), as well as miscompilations when using the mold linker (https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/SIGILL.20in.20build-script-build.20with.20nightly-2023-08-25/near/387506479).
This option tells LLVM to emit relaxable relocation types R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX/R_386_GOT32X in applicable cases. True matches Clang's CMake default since 2020-08 1 and latest LLVM default2.
This also works around a GNU ld<2.41 issue2 when using general-dynamic/local-dynamic TLS models in
-Z plt=no
mode with latest LLVM.