Page 1 of 1

make all-target-libgcc error

Posted: Tue Dec 28, 2021 2:02 am
by buridan
I try to make gcc, from this tutorial: https://wiki.osdev.org/GCC_Cross-Compiler
p.s in "GCC" stage

But when I run 'make all-target-libgcc' it's failed with this error:

Code: Select all

conftest.c:9:10: fatal error: stdio.h: No such file or directory
    9 | #include <stdio.h>
      |          ^~~~~~~~~

Re: make all-target-libgcc error

Posted: Wed Dec 29, 2021 7:17 pm
by Octocontrabass
What OS are you using? How did you set up your build environment? What are the exact commands you ran leading up to this point?

Re: make all-target-libgcc error

Posted: Mon Jan 17, 2022 1:24 pm
by kotovalexarian
Maybe you target triplet is different from i686-elf? Autotools may consider this as a sign of hosted environment. I met similar error because of invalid target triplet, however during compilation of my project, not the cross-compiler itself. Don't you compile your cross-compiler with other cross-compiler for freestanding environment?