Bogus "errors" and warnings while compiling code for MIPS1
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by tracing how rustc_codegen_gcc configures libgccjit for the mipsel-sony-psx target and its static relocation model; the issue does not name source files or tests. Reproduce with the provided no_std program, comparing debug and release builds against LLVM. Done means the spurious PIC errors and memcpy overflow warnings are resolved while the compiled result remains correct.
索引モデルが issue の本文から書いたものです。
説明
I've been writing Rust code for the PlayStation (mipsel-sony-psx), a MIPS1-based target with a static relocation model.
While compiling this code using LLVM, it works fine. But with rustc_codegen_gcc, I get errors related to PIC which does not affect the compiled result.
libgccjit.so: error: position-independent code requires '-mabicalls'
libgccjit.so: error: position-independent code requires '-mabicalls'
libgccjit.so: error: position-independent code requires '-mabicalls'
Compiling dummy v0.1.0 (/project)
libgccjit.so: error: position-independent code requires '-mabicalls'
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.23s
If I compile with --release, it spits out overflow warnings related to some memcpy operations on top of the errors, that shouldn't be there since my code doesn't use any:
Compiling compiler_builtins v0.1.160 (/home/builder/.rustup/toolchains/nightly-2026-10-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/compiler-builtins/compiler-builtins)
Compiling core v0.0.0 (/home/builder/.rustup/toolchains/nightly-2026-10-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
libgccjit.so: error: position-independent code requires '-mabicalls'
libgccjit.so: error: position-independent code requires '-mabicalls'
Compiling alloc v0.0.0 (/home/builder/.rustup/toolchains/nightly-2026-10-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
libgccjit.so: error: position-independent code requires '-mabicalls'
libgccjit.so: warning: : 'memcpy' specified bound 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overflow=]
libgccjit.so: warning: : 'memcpy' specified bound 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overflow=]
libgccjit.so: warning: : 'memcpy' specified bound 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overflow=]
Compiling dummy v0.1.0 (/project)
libgccjit.so: error: position-independent code requires '-mabicalls'
Finished `release` profile [optimized] target(s) in 34.04s
It's important to note, that despite these warnings and errors, nothing ends up being wrong with the compiled result, which isn't that bad, but still makes me suspicious.
This is how the program looks like:
#![no_std]
#![no_main]
use core::panic::PanicInfo;
use core::hint::black_box;
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
loop {}
}
#[unsafe(no_mangle)]
fn _start() {
black_box(18);
}
- 主要言語
- Rust
- スター
- 1.2k
- フォーク
- 105
- 平均マージ
- 5時間 50分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-lang/rustc_codegen_gcc のほかの issue
-
tests
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rust-lang/rustc_codegen_gcc#993 ·
メンテナーはふだん 1 日以内に返信
-
Cannot compile sysroot if having a build.build-dir cargo config対応中かも @GuillaumeGomez が 6 日前に担当しました。 オープン
rust-lang/rustc_codegen_gcc#1011 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
tests
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
rust-lang/rustc_codegen_gcc#992 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
rust-lang/rustc_codegen_gcc#970 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
rust-lang/rustc_codegen_gcc#943 ·
メンテナーはふだん 1 日以内に返信
rust-lang/rustc_codegen_gcc の issue をすべて見る
似ている issue
-
documentation enhancement SIEM
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ADORSYS-GIS/wazuh-agent-status#265 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
manuscript-lang/manuscript#1629 ·
メンテナーはふだん 1 日以内に返信
-
autofixer: follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
tursodatabase/turso#10885 ·
メンテナーはふだん 1 日以内に返信
-
🐞 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
nannou-org/gantz#475 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100