Skip to content

Conversation

antoyo
Copy link
Contributor

@antoyo antoyo commented Sep 28, 2025

Fix #130583

r? @bjorn3

@rustbot
Copy link
Collaborator

rustbot commented Sep 28, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 28, 2025
@antoyo
Copy link
Contributor Author

antoyo commented Sep 28, 2025

I am unable to test that this actually works since a get a segfault in GCC that I have a hard time reproducing when not running cargo, so I'm not sure how to debug.
My attempts at running the commands manually seem to work, so there's something weird going on here.

I suggest anyway that we start with this: maybe I'll be able to get further on the cg_gcc side.

@antoyo antoyo force-pushed the fix/gcc-linker-plugin branch from 4535bde to 5aa7fb7 Compare September 28, 2025 16:16
Copy link
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with the suggestions applied

View changes since this review

@antoyo antoyo force-pushed the fix/gcc-linker-plugin branch from 5aa7fb7 to 7fcbc5e Compare September 28, 2025 17:57
@bjorn3
Copy link
Member

bjorn3 commented Sep 28, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 28, 2025

📌 Commit 7fcbc5e has been approved by bjorn3

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 28, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 29, 2025
…orn3

Add a leading dash to linker plugin arguments in the gcc codegen

Fix rust-lang#130583

r? `@bjorn3`
bors added a commit that referenced this pull request Sep 29, 2025
Rollup of 6 pull requests

Successful merges:

 - #133477 (Detect tuple structs that are unconstructable due to re-export)
 - #140916 (Fix unuseful span in type error in some format_args!() invocations)
 - #146979 (constify Default on Nanoseconds)
 - #147090 (Skip stack overflow handler for panic=immediate-abort)
 - #147092 (Do not compute optimized MIR if code does not type-check.)
 - #147127 (Add a leading dash to linker plugin arguments in the gcc codegen)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 29, 2025
Rollup of 7 pull requests

Successful merges:

 - #133477 (Detect tuple structs that are unconstructable due to re-export)
 - #146929 (compiletest: Remove old-output-capture and become a stage0 bootstrap tool)
 - #146979 (constify Default on Nanoseconds)
 - #147092 (Do not compute optimized MIR if code does not type-check.)
 - #147112 (all 48 keywords in just 300 characters)
 - #147122 (Fix some crash-test directives)
 - #147127 (Add a leading dash to linker plugin arguments in the gcc codegen)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit af8af6c into rust-lang:master Sep 29, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Sep 29, 2025
Rollup merge of #147127 - antoyo:fix/gcc-linker-plugin, r=bjorn3

Add a leading dash to linker plugin arguments in the gcc codegen

Fix #130583

r? ``@bjorn3``
@rustbot rustbot added this to the 1.92.0 milestone Sep 29, 2025
tautschnig added a commit to tautschnig/kani that referenced this pull request Sep 30, 2025
Relevant upstream PRs:
- rust-lang/rust#147127 (Add a leading dash to
  linker plugin arguments in the gcc codegen)

Resolves: model-checking#4387
tautschnig added a commit to tautschnig/kani that referenced this pull request Sep 30, 2025
Relevant upstream PRs:
- rust-lang/rust#147127 (Add a leading dash to
  linker plugin arguments in the gcc codegen)

Resolves: model-checking#4387
github-merge-queue bot pushed a commit to model-checking/kani that referenced this pull request Sep 30, 2025
Relevant upstream PRs:
- rust-lang/rust#147127 (Add a leading dash to
linker plugin arguments in the gcc codegen)

Resolves: #4387

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-plugin-opt linker flags require a leading dash when using GCC as a linker
4 participants