Merge commit 'b385428e3d
' into subtree-update_cg_gcc_2024-03-05
This commit is contained in:
commit
0d359efbe6
76 changed files with 7183 additions and 4278 deletions
27
compiler/rustc_codegen_gcc/doc/errors.md
Normal file
27
compiler/rustc_codegen_gcc/doc/errors.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Common errors
|
||||
|
||||
This file lists errors that were encountered and how to fix them.
|
||||
|
||||
### `failed to build archive` error
|
||||
|
||||
When you get this error:
|
||||
|
||||
```
|
||||
error: failed to build archive: failed to open object file: No such file or directory (os error 2)
|
||||
```
|
||||
|
||||
That can be caused by the fact that you try to compile with `lto = "fat"`, but you didn't compile the sysroot with LTO.
|
||||
(Not sure if that's the reason since I cannot reproduce anymore. Maybe it happened when forgetting setting `FAT_LTO`.)
|
||||
|
||||
### ld: cannot find crtbegin.o
|
||||
|
||||
When compiling an executable with libgccijt, if setting the `*LIBRARY_PATH` variables to the install directory, you will get the following errors:
|
||||
|
||||
```
|
||||
ld: cannot find crtbegin.o: No such file or directory
|
||||
ld: cannot find -lgcc: No such file or directory
|
||||
ld: cannot find -lgcc: No such file or directory
|
||||
libgccjit.so: error: error invoking gcc driver
|
||||
```
|
||||
|
||||
To fix this, set the variables to `gcc-build/build/gcc`.
|
Loading…
Add table
Add a link
Reference in a new issue