rust-lang / rust-lang/rustc_codegen_gcc
`y` sets `LIBRARY_PATH` which confuses gcc when compiling for a different target
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 105
- Avg merge
- 8h 20m
- Merged PRs (30d)
- 14
Description
Linkers (both rust-lld and ld) attempt to link against the built GCC's crtbegin.o, which may not match the host architecture. Locally I've solved this by commenting out the LIBRARY_PATH environment variable then specifying RUSTFLAGS="-Lgcc-install/lib" to link against libgccjit.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open build_system/src/build.rs around line 194 and inspect how y sets LIBRARY_PATH. Reproduce a different-target compilation and verify that the linker no longer selects an incompatible built GCC crtbegin.o while libgccjit remains linkable through the documented RUSTFLAGS approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100