Compilng libgcc xgcc error
Here's the problem: Before you attempted to build libgcc
as you described, you built an extreme bare-bones cross compiler. Now, part of the standard tests that the configure script runs is to test the compiler to see if it will produce a working executable file under normal conditions. Your bare bones compiler can't. Fortunately, for libgcc
, you don't need to produce an executable, just a static library libgcc.a
. The problem is that the stupid GNU autoconf
-generated script doesn't realize that.
I encountered this same problem and devised a very ugly workaround. You need to comment out a section of the libgcc/configure file in your gcc source directory. Here's the section I commented out for my version; do something similar to yours:
At line 3484:
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
# BEGIN PHILLIP EDIT
# if test -z "$ac_file"; then :
# $as_echo "$as_me: failed program was:" >&5
# sed 's/^/| /' conftest.$ac_ext >&5
# { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
# $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
# { as_fn_set_status 77
# as_fn_error "C compiler cannot create executables
# See \`config.log' for more details." "$LINENO" 5; }; }
# fi
ac_file='a.out'
# END PHILLIP EDIT
ac_exeext=$ac_cv_exeext
Hope this helps.
LibGCC compilation Failed with an error: cannot compute suffix of object files: cannot compile
Self Resolved
- Manually build binutils from source with
--target=x86_64-elf
option.
That's all.
Related Topics
Receiving Udp Broadcast Packets on Linux
Bash - Surround All Array Elements or Arguments with Quotes
Why Is Pr_Debug of the Linux Kernel Not Giving Any Output
What Is Export_Symbol_Gpl in Linux Kernel Code
Can Gdb Change the Assembly Code of a Running Program
How to Do Foreach *.Mp3 File Recursively in a Bash Script
Automated Test Tools for Linux/Ncurses
Dynamically Determining Where a Rogue Avx-512 Instruction Is Executing
How Are Threads/Processes Parked and Woken in Linux, Prior to Futex
Finding Contents of One File in Another File
Linux 3/1 Virtual Address Split
Check If a Program in a Specific Path Is Running
Svn: Ignoring an Already Committed File
How to Create Tar for Files Older Than 7 Days Using Linux Shell Scripting
Elasticsearch Process Memory Locking Failed
How to Change the Size of a Named Pipe on Linux
Use Sed with Ignore Case While Adding Text Before Some Pattern