Page 1 of 1

Error building i686-elf-gcc

Posted: Fri Dec 10, 2021 4:30 am
by solarmist
When I try to build i686-elf-gcc (gcc-11.2.0, binutils-2.3.7), I get this error:

checking for suffix of object files... configure: error: in `/tmp/src/gcc-build/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make: *** [Makefile:13430: configure-target-libgcc] Error 1

when I run the "make all-target-libgcc" command
Does anyone know what I have done wrong/how to fix this problem?

Re: Error building i686-elf-gcc

Posted: Fri Dec 10, 2021 9:24 pm
by Octocontrabass
solarmist wrote:binutils-2.3.7
You're using binutils-2.37, right? There's no way 2.3.7 will work.
solarmist wrote:See `config.log' for more details
What does config.log say?

Re: Error building i686-elf-gcc

Posted: Sat Dec 11, 2021 2:54 pm
by thewrongchristian
solarmist wrote:When I try to build i686-elf-gcc (gcc-11.2.0, binutils-2.3.7), I get this error:

checking for suffix of object files... configure: error: in `/tmp/src/gcc-build/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make: *** [Makefile:13430: configure-target-libgcc] Error 1

when I run the "make all-target-libgcc" command
Does anyone know what I have done wrong/how to fix this problem?
I had this exact problem, and it infuriated me for months, because the config.log didn't really indicate what was wrong.

I finally resolved the issue by configuring, compiling *and* installing binutils before configuring gcc, whereas before, I was configuring binutils, then configuring gcc, then compiling/installing binutils before finally compiling/installing gcc.

Re: Error building i686-elf-gcc

Posted: Sat Jan 22, 2022 9:30 am
by nexos
Not to bump this thread, but I wanted to mention that I had the same issue when running configure like this:

Code: Select all

$PWD/configure
In other word, use relative paths, not absolute ones