Skip to content

Commit 8df0f0c

Browse files
authored
Merge pull request #9 from antoyo/improve-cg_gcc-page
Improve formatting and fix typo of the rustc_codegen_gcc page
2 parents 5e20dd0 + 4fcc8c8 commit 8df0f0c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/rustc_codegen_gcc.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ rustup override set nightly-2023-10-21 # Adjust to the version used by the GCC c
2525
Now, you need to set some variables to build Rust for Linux with the GCC codegen (do not forget to adjust your path to `rustc_codegen_gcc`):
2626

2727
```sh
28-
make -j20 KRUSTFLAGS="-Zcodegen-backend=/path/to/rustc_codegen_gcc/target/debug/librustc_codegen_gcc.so --sysroot /path/to/rustc_codegen_gcc/build_sysroot/sysroot" HOSTRUSTFLAGS="-Zcodegen-backend=/path/to/rustc_codegen_gcc/target/debug/librustc_codegen_gcc.so --sysroot /path/to/rustc_codegen_gcc/build_sysroot/sysroot -Clto=no"
28+
make -j20 KRUSTFLAGS="-Zcodegen-backend=/path/to/rustc_codegen_gcc/target/debug/librustc_codegen_gcc.so \
29+
--sysroot /path/to/rustc_codegen_gcc/build_sysroot/sysroot" \
30+
HOSTRUSTFLAGS="-Zcodegen-backend=/path/to/rustc_codegen_gcc/target/debug/librustc_codegen_gcc.so \
31+
--sysroot /path/to/rustc_codegen_gcc/build_sysroot/sysroot -Clto=no"
2932
```
3033

31-
Since we use a differently nightly version, you might need to adjust the code of the `alloc` crate built by Rust for Linux.
34+
Since we use a different nightly version, you might need to adjust the code of the `alloc` crate built by Rust for Linux.
3235
You'll see some errors when running the above command in this case.
3336

3437
## Troubleshooting
@@ -42,3 +45,8 @@ That should give you the correct error, which could be one of those:
4245
- In this case, make sure you set `LD_LIBRARY_PATH` and `LIBRARY_PATH`.
4346
* `Source code for the 'core' standard library could not be found`
4447
- In this case, make sure you used a recent enough version of `rustc_codegen_gcc` (c6bc7ecd65046ee502118664f42637ca318cdfb5 or more recent should be good) that copies the source of the sysroot at the correct location.
48+
49+
## Contact
50+
51+
Please contact Antoni Boucher (antoyo) on
52+
[IRC](https://web.libera.chat/#rustc_codegen_gcc).

0 commit comments

Comments
 (0)