File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,19 @@ error: failed to build archive: failed to open object file: No such file or dire
205
205
That can be caused by the fact that you try to compile with `lto = "fat"`, but you didn't compile the sysroot with LTO.
206
206
(Not sure if that's the reason since I cannot reproduce anymore. Maybe it happened when forgetting setting `FAT_LTO`.)
207
207
208
+ ### ld: cannot find crtbegin.o
209
+
210
+ When compiling an executable with libgccijt, if setting the `*LIBRARY_PATH` variables to the install directory, you will get the following errors:
211
+
212
+ ```
213
+ ld: cannot find crtbegin.o: No such file or directory
214
+ ld: cannot find -lgcc: No such file or directory
215
+ ld: cannot find -lgcc: No such file or directory
216
+ libgccjit.so: error: error invoking gcc driver
217
+ ```
218
+
219
+ To fix this, set the variables to `gcc-build/build/gcc`.
220
+
208
221
### How to debug GCC LTO
209
222
210
223
Run do the command with `-v -save-temps` and then extract the `lto1` line from the output and run that under the debugger.
You can’t perform that action at this time.
0 commit comments