Bogus "errors" and warnings while compiling code for MIPS1
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 43/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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);
}
- Lenguaje dominante
- Rust
- Estrellas
- 1.2k
- Forks
- 106
- Merge medio
- 6 h 17 min
- PR fusionados (30 d)
- 21
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rust-lang/rustc_codegen_gcc
-
Re-enable -fno-lto testAbiertotests
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
rust-lang/rustc_codegen_gcc#993 ·
Los mantenedores suelen responder en 1 día
-
Enable librsvg tests on Aarch64Abiertotests
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
rust-lang/rustc_codegen_gcc#992 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
rust-lang/rustc_codegen_gcc#970 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Support `#[no_builtin]`Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
rust-lang/rustc_codegen_gcc#943 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
rust-lang/rustc_codegen_gcc#930 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de rust-lang/rustc_codegen_gcc
Issues similares
-
engine-rs P3 review-deferral wasm
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
maniator/verticopolis#1154 ·
Los mantenedores suelen responder en 1 día
-
FFMPEG_BIN/FFPROBE_BIN are always overridden, so a working system ffmpeg cannot be usedPosiblemente ocupada @Bilker1422 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Stremio/stremio-service#116 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
sims1253/ry#720 · 1 comentario ·
Los mantenedores suelen responder en 1 día