-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Build GCC on CI with GCC, not Clang #138451
Conversation
This PR changes how GCC is built. Consider updating src/bootstrap/download-ci-gcc-stamp. |
@bors try |
Build GCC on CI with GCC, not Clang It seems that GCC built with Clang misbehaves. Prerequisite for rust-lang#138395. r? `@ghost`
☀️ Try build successful - checks-actions |
Some changes occurred in src/tools/opt-dist cc @Kobzol |
@bors try |
Build GCC on CI with GCC, not Clang It seems that GCC built with Clang misbehaves. Prerequisite for rust-lang#138395. r? `@ghost`
☀️ Try build successful - checks-actions |
This PR modifies If appropriate, please update |
So that follow-up CI commands can proceed normally. It will also avoid overwriting `config.toml` when running opt-dist tests locally.
74bb463
to
38fc116
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from @antoyo's comment, looks good to me. Thanks!
Added a commit that checks if we don't compile GCC with Clang, and removed the flags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good to me, thanks! r=me once CI pass
@bors r=GuillaumeGomez |
Is there a bug report for that? |
We think that the specific instance that we hit was https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117952, or something similar. But more generally, I expect that building GCC with Clang would require various workarounds and have quirks, we already had to modify compiler flags to even get it to compile. So just using GCC as the host compiler should be a more robust choice in the future. |
…meGomez Build GCC on CI with GCC, not Clang It seems that GCC built with Clang misbehaves. I have tested that cg_gcc tests [pass](https://github.com/rust-lang/rust/actions/runs/13842365913/job/38732750617?pr=138451) on CI with a downloaded GCC that was built in this way. Prerequisite for rust-lang#138395. r? `@ghost`
Rollup of 6 pull requests Successful merges: - rust-lang#134720 (Display valid crate types in error message for --crate-type flag) - rust-lang#137424 (uefi: helpers: Add DevicePathNode abstractions) - rust-lang#137736 (Don't attempt to export compiler-builtins symbols from rust dylibs) - rust-lang#138451 (Build GCC on CI with GCC, not Clang) - rust-lang#138454 (Improve post-merge workflow) - rust-lang#138477 (Deny impls for `BikeshedGuaranteedNoDrop`) r? `@ghost` `@rustbot` modify labels: rollup
…meGomez Build GCC on CI with GCC, not Clang It seems that GCC built with Clang misbehaves. I have tested that cg_gcc tests [pass](https://github.com/rust-lang/rust/actions/runs/13842365913/job/38732750617?pr=138451) on CI with a downloaded GCC that was built in this way. Prerequisite for rust-lang#138395. r? ``@ghost``
Rollup of 8 pull requests Successful merges: - rust-lang#138056 (rustc_target: Add target features for LoongArch v1.1) - rust-lang#138349 (Emit function declarations for functions with `#[linkage="extern_weak"]`) - rust-lang#138451 (Build GCC on CI with GCC, not Clang) - rust-lang#138454 (Improve post-merge workflow) - rust-lang#138460 (Pass struct field HirId when check_expr_struct_fields) - rust-lang#138482 (Fix HIR printing of parameters) - rust-lang#138507 (Mirror NetBSD sources) - rust-lang#138511 (Make `Parser::parse_expr_cond` public) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - rust-lang#138056 (rustc_target: Add target features for LoongArch v1.1) - rust-lang#138451 (Build GCC on CI with GCC, not Clang) - rust-lang#138454 (Improve post-merge workflow) - rust-lang#138460 (Pass struct field HirId when check_expr_struct_fields) - rust-lang#138474 (Refactor is_snake_case.) - rust-lang#138482 (Fix HIR printing of parameters) - rust-lang#138507 (Mirror NetBSD sources) - rust-lang#138511 (Make `Parser::parse_expr_cond` public) - rust-lang#138518 (Fix typo in hir lowering lint diag) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138451 - Kobzol:gcc-ci-build-gcc, r=GuillaumeGomez Build GCC on CI with GCC, not Clang It seems that GCC built with Clang misbehaves. I have tested that cg_gcc tests [pass](https://github.com/rust-lang/rust/actions/runs/13842365913/job/38732750617?pr=138451) on CI with a downloaded GCC that was built in this way. Prerequisite for rust-lang#138395. r? ```@ghost```
Thanks, so this is just working around a GCC bug. Just wanted to make sure it's not Clang miscompiling GCC. |
It seems that GCC built with Clang misbehaves. I have tested that cg_gcc tests pass on CI with a downloaded GCC that was built in this way.
Prerequisite for #138395.
r? @ghost