Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Fat LTO ignores user GCC flags

Đang mở
#1,020 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Start with the cited code in src/back/write.rs around line 146 and trace how Fat LTO creates its gccjit context and passes compiler arguments. Check where llvm_args are handled and compare that path with compilation without LTO. Done means the user's GCC flags are preserved for Fat LTO and the reported MIPS $gp-relative relocations no longer break linking.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

In my MIPS program, I have GCC flags specifically to disable $gp-relative accesses, which works fine without LTO enabled. But if I enable LTO, it starts compiling with $gp-relative accesses/relocations, which breaks the entire build at the linking stage.

After some investigation, I figured out that this piece of code may be the culprit. It seems like it creates a new gccjit context and only sets a few arguments (disregarding whatever I set in llvm_args) before it starts compiling.

https://github.com/rust-lang/rustc_codegen_gcc/blob/master/src/back/write.rs#L146

Ngôn ngữ chính
Rust
Star
1.2k
Fork
106
Merge trung bình
11 giờ 14 phút
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rust-lang/rustc_codegen_gcc

Tất cả issue của rust-lang/rustc_codegen_gcc

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.